* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background-image: url("school-bg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}



.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 20px;

  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);

  color: white;
  z-index: 1000;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 30px;
}

.school-name {
  font-weight: bold;
  font-size: 18px;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-controls button {
  margin-left: 8px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}


.window-controls button:hover {
  opacity: 0.8;
}


.window-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* icon-only controls */
.window-icon {
  font-size: 20px;
  cursor: pointer;
  user-select: none;
  color: white;
}

/* subtle hover effect */
.window-icon:hover {
  opacity: 0.7;
}

.welcome-header {
  text-align: center;
  margin-bottom: 25px;
  color: white;
}

.school-emblem {
  width: 100px;
  margin-bottom: 10px;
}

.welcome-header h1 {
  margin: 5px 0;
  font-weight: 500;
}

.welcome-header h2 {
  margin: 0;
  font-weight: normal;
}


/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 0;
}

.page {
  display: none;
  min-height: 100vh;

  flex-direction: column;   /* stack elements vertically */
  align-items: center;      /* center horizontally */
  justify-content: center;  /* center vertically */

  padding-top: 80px;
  position: relative;
  z-index: 1;
}

/* Only the active page is visible */
.page.active {
  display: flex;
}

.page.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 16px;
}

.card h1 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.signin-title {
  color: #000;          /* black text */
  text-align: center;   /* center the heading */
  font-weight: normal;  /* remove bold */
  margin-bottom: 20px;
}

.step {
  display: none;
}

.step.active-step {
  display: block;
}

.input-group {
  position: relative;
  margin-bottom: 10px;
}

.input-group input {
  width: 100%;
  padding: 18px 14px 14px 14px;
  border: 1px solid #bfc7d4;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.input-group input:focus {
  border-color: #1d2671;
}

.floating-label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: white;
  padding: 0 6px;
  font-size: 13px;
  color: #1d2671;
  font-weight: 600;
}

.password-hidden {
  display: none;
}

.password-visible {
  display: block;
}

.forgot-password-container {
  width: 100%;
  text-align: left;
  margin-top: 6px;
  justify-content: center;
}

.forgot-password {
  color: #1a73e8;          /* blue */
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.forgot-password:hover {
  opacity: 0.8;
}

.username-readonly {
  background: #f1f1f1;
  color: #777;
}

.username-readonly-fieldset {
  border-color: #cfcfcf;
  background: #f8f8f8;
}

.helper-text {
  font-size: 13px;
  color: #555;
  margin: 8px 0 12px 2px;
}

.tnc-link {
  color: #1a73e8;       /* blue */
  cursor: pointer;
  text-decoration: none;
}

.tnc-link:hover {
  opacity: 0.8;
}

.login-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
#loginUsername[readonly] {
  background: #f1f1f1;
  color: #666;
  cursor: not-allowed;
}
.primary-btn {
  width: auto;
  min-width: 110px;
  padding: 12px 22px;
  border: none;
  border-radius: 8px;
  background: #1d2671;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover {
  opacity: 0.95;
}

.error {
  color: #c62828;
  font-size: 14px;
  margin-top: 14px;
}

.form-field {
  margin-bottom: 12px;
}

.form-field fieldset {
  border: 1px solid #aab4c3;
  border-radius: 6px;
  padding: 4px 10px;
  background: #fff;
}

.form-field legend {
  font-size: 11px;
  padding: 0 6px;
  color: #000;
}

.form-field input,
.form-field select {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 13px;
  padding: 2px 0;
  height: 22px;
  margin: 0;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-field input:focus,
.form-field select:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.form-field fieldset:focus-within {
  border-color: #1d2671;
}

textarea,
button {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border-radius: 10px;
  font-size: 16px;
}

textarea {
  border: 1px solid #ccc;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  border: none;
  background: #1d2671;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  opacity: 0.95;
}

.error {
  color: #c62828;
  font-size: 14px;
  margin-top: 12px;
}

.chat-wrapper {
  width: 100%;
  max-width: 800px;
  height: 90vh;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.chat-header {
  background: #1d2671;
  color: white;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h2 {
  margin: 0 0 4px 0;
}

.chat-header p {
  margin: 0;
  font-size: 14px;
}

.logout-btn {
  width: auto;
  padding: 10px 16px;
  background: #ffffff;
  color: #1d2671;
}

.chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background: #f4f6fb;
}

.message {
  max-width: 75%;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.message p {
  margin: 0 0 6px 0;
}

.message span {
  font-size: 12px;
  color: #666;
}

.message.received {
  background: white;
}

.message.sent {
  background: #d8f5d0;
  margin-left: auto;
}

.chat-controls {
  padding: 18px;
  border-top: 1px solid #ddd;
  background: white;
}

.status {
  margin-top: 12px;
  font-size: 14px;
  color: #333;
}

/*assignment-panel*/

.assignment-panel {
  margin-top: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  border: 1px solid #ddd;
}

.assignment-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #000;
  font-weight: normal;
  text-align: center;
}

.assignment-panel select {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 4px 0;
  height: 24px;
  background: transparent;
}


.assignment-panel input {
  width: 100%;
  margin-bottom: 12px;
}

.assignment-card {
  width: 100%;
  max-width: 420px;
  margin: 20px auto 0 auto;
}

.assignment-card .signin-title {
  color: #000;
  text-align: center;
  font-weight: normal;
  margin-bottom: 20px;
}

.assignment-card .form-field {
  margin-bottom: 16px;
}

.assignment-card fieldset {
  border: 1px solid #aab4c3;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
}

.assignment-card legend {
  font-size: 12px;
  padding: 0 6px;
  color: #000;
}

.assignment-card input,
.assignment-card select {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 4px 0;
  height: 24px;
  background: transparent;
}

.assignment-card select {
  cursor: pointer;
}

.assignment-card .login-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.status-text {
  font-size: 14px;
  margin-top: 14px;
  text-align: center;
  color: #333;
}

/* Tablet */
@media (max-width: 768px) {
  .page {
    padding: 12px;
  }

  .card {
    padding: 24px;
  }

  .chat-wrapper {
    height: 95vh;
  }

  textarea,
  button {
    font-size: 15px;
  }
}

/* Phone */
@media (max-width: 480px) {
  .page {
    padding: 8px;
  }

  .card {
    padding: 20px;
    border-radius: 14px;
  }

  .chat-wrapper {
    height: 98vh;
    border-radius: 14px;
  }

  .chat-header {
    padding: 14px;
  }

  .chat-controls,
  .chat-body {
    padding: 14px;
  }

  .message {
    max-width: 88%;
  }

  textarea,
  button {
    font-size: 14px;
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .school-name {
    font-size: 14px;
  }

  .logo {
    height: 30px;
  }

  .school-emblem {
    width: 90px;
  }

  .welcome-header h1 {
    font-size: 20px;
  }

  .welcome-header h2 {
    font-size: 18px;
  }
}
  /* HEADER BAR */}