#login-screen[hidden],
#app-shell[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 12% 10%, #1c4963 0, transparent 42%),
    linear-gradient(145deg, #071d31, #0b2942 55%, #123b59);
}

.login-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid #d8b85d55;
  border-radius: 25px;
  background: #ffffff;
  box-shadow: 0 24px 70px #0005;
}

.login-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  border: 2px solid var(--gold);
  border-radius: 17px;
  background: var(--navy);
  color: white;
  font: 700 20px "Playfair Display", Georgia, serif;
}

.login-card h1 {
  margin: 8px 0;
  color: var(--navy);
  font: 700 30px "Playfair Display", Georgia, serif;
}

.login-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #f8fafb;
  color: var(--ink);
  font: 14px "DM Sans", Arial, sans-serif;
}

.login-card input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #d8b85d25;
}

.password-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafb;
}

.password-field input {
  border: 0;
  background: transparent;
}

.password-field input:focus {
  box-shadow: none;
}

.password-field button {
  padding: 10px 13px;
  border: 0;
  background: none;
  color: var(--navy2);
  font: 700 11px "DM Sans", Arial, sans-serif;
  cursor: pointer;
}

.login-error {
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff0f1;
  color: #a63f4d !important;
  font-size: 12px;
  line-height: 1.5;
}

.login-error[hidden] {
  display: none;
}

.login-card .button {
  margin-top: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-button {
  padding: 8px 12px;
  border: 1px solid #ffffff50;
  border-radius: 20px;
  background: transparent;
  color: white;
  font: 600 11px "DM Sans", Arial, sans-serif;
  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.class-financials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.class-financial-card {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--muted);
  font-size: 11px;
}

.class-financial-card > strong {
  color: var(--navy);
  font: 700 16px "Playfair Display", Georgia, serif;
}

.class-financial-card span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.class-financial-card b {
  color: var(--ink);
  white-space: nowrap;
}

.student-financial-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.student-financial-values span {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}

.student-financial-values strong {
  color: var(--ink);
  font-size: 11px;
}

@media (max-width: 520px) {
  .login-screen {
    padding: 16px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .class-financial-card {
    padding: 12px 10px;
    font-size: 10px;
  }

  .student-financial-values {
    gap: 5px;
  }

  .student-financial-values strong {
    font-size: 10px;
  }

  .login-card input {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .topbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .brand strong {
    font-size: 13px;
    white-space: nowrap;
  }

  .brand small {
    overflow: hidden;
    font-size: 7px;
    letter-spacing: 0.7px;
    white-space: nowrap;
  }

  .header-actions {
    gap: 5px;
  }

  .committee {
    padding: 6px 8px;
    font-size: 10px;
  }

  .logout-button {
    padding: 7px 8px;
  }

  .class-financials {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .search,
  .modal input,
  .modal select {
    font-size: 16px;
  }

  .nav-item {
    min-width: 48px;
    min-height: 44px;
    justify-content: center;
  }
}
