/* ═══════════════════════════════════════════════════════
   ROYAL PUBLIC SCHOOL — Login Page
   Premium light aesthetic: frosted glass card, mesh
   background, layered depth, refined micro-details
   ═══════════════════════════════════════════════════════ */

/* ── BACKGROUND CANVAS ──────────────────────────────── */
.login-page {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px;
  overflow: hidden;

  background-color: #f0ebe0;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 20%,  rgba(200,150,62,.18) 0%,  transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 75%,  rgba(14,34,67,.12)   0%,  transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(200,150,62,.08) 0%, transparent 50%);
}

/* Subtle dot-grid texture */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(14,34,67,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Decorative large circle arc top-right */
.login-page::after {
  content: '';
  position: absolute;
  top: -180px;
  right: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(200,150,62,.15);
  box-shadow: inset 0 0 0 40px rgba(200,150,62,.04);
  pointer-events: none;
}

/* ── CARD ───────────────────────────────────────────── */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;

  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);

  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px;
  padding: 48px 44px 40px;

  box-shadow:
    0 2px 0 rgba(255,255,255,.6) inset,
    0 24px 64px rgba(14,34,67,.12),
    0  6px 20px rgba(14,34,67,.07);

  animation: cardIn .55s cubic-bezier(.22,1,.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* Gold accent top stripe */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 44px; right: 44px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 4px 4px;
}

/* ── LOGO BLOCK ─────────────────────────────────────── */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeUp .5s .1s cubic-bezier(.22,1,.36,1) both;
}

.login-logo-ring {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.login-logo img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow:
    0 0 0 3px var(--gold),
    0 8px 24px rgba(200,150,62,.25);
  display: block;
  margin: 0 auto;
}

/* Spinning dashed halo around logo */
.login-logo-ring::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px dashed rgba(200,150,62,.35);
  animation: haloSpin 18s linear infinite;
}

@keyframes haloSpin {
  to { transform: rotate(360deg); }
}

.login-logo h2 {
  font-size: 1.3rem;
  font-family: var(--serif);
  color: var(--navy);
  margin-bottom: 5px;
  font-weight: 700;
}

.login-logo p {
  font-size: .8rem;
  color: var(--muted);
  max-width: 100%;
  line-height: 1.5;
}

/* ── FORM ───────────────────────────────────────────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp .5s .2s cubic-bezier(.22,1,.36,1) both;
}

.login-form .form-group {
  position: relative;
  margin-bottom: 0;
  gap: 0;
}

.login-form .form-group label {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
  display: block;
}

.login-form input,
.login-form select {
  background: rgba(255,255,255,.7);
  border: 1.5px solid rgba(228,221,210,.8);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: .9rem;
  font-family: var(--sans);
  color: var(--text);
  transition: all .2s var(--ease);
  box-shadow: 0 1px 3px rgba(14,34,67,.04) inset;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.login-form input:focus,
.login-form select:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow:
    0 0 0 3px rgba(200,150,62,.12),
    0 1px 3px rgba(14,34,67,.04) inset;
}

.login-form input::placeholder { color: var(--light-text); }

/* Custom select chevron */
.login-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a0aec0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* ── LOGIN BUTTON ───────────────────────────────────── */
.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, #d4a44a 100%);
  color: var(--white);
  font-weight: 700;
  font-family: var(--sans);
  font-size: .92rem;
  letter-spacing: .03em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
  transition: all .25s var(--ease);

  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 4px 16px rgba(200,150,62,.3);
}

/* Glass sheen */
.login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.14) 0%, transparent 55%);
  pointer-events: none;
}

.login-btn:hover {
  background: linear-gradient(135deg, #d4a44a 0%, #b8852e 100%);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 10px 30px rgba(200,150,62,.4);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(200,150,62,.2);
}

/* ── DIVIDER ────────────────────────────────────────── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}

.login-divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid rgba(228,221,210,.8);
}

.login-divider span {
  font-size: .68rem;
  color: var(--light-text);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── BACK LINK ──────────────────────────────────────── */
.login-back {
  text-align: center;
  margin-top: 18px;
  font-size: .8rem;
  color: var(--muted);
  animation: fadeUp .5s .35s cubic-bezier(.22,1,.36,1) both;
}

.login-back a {
  color: var(--navy);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .2s, gap .2s;
}

.login-back a:hover { color: var(--gold); gap: 7px; }

/* ── DEMO NOTICE ────────────────────────────────────── */
.login-demo {
  margin-top: 16px;
  padding: 12px 15px;
  background: linear-gradient(135deg, rgba(200,150,62,.09) 0%, rgba(200,150,62,.04) 100%);
  border: 1px solid rgba(200,150,62,.22);
  border-radius: 10px;
  font-size: .74rem;
  color: #8a6520;
  text-align: center;
  line-height: 1.55;
  animation: fadeUp .5s .4s cubic-bezier(.22,1,.36,1) both;
}

/* ── ERROR ALERT ────────────────────────────────────── */
.alert-error {
  background: linear-gradient(135deg, rgba(220,38,38,.06) 0%, rgba(220,38,38,.03) 100%);
  border: 1.5px solid rgba(220,38,38,.2);
  color: #b91c1c;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: .84rem;
  display: none;
  margin-bottom: 4px;
}

.alert-error.show { display: flex; gap: 8px; align-items: center; }

/* ── SHARED ANIMATION ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 480px) {
  .login-card         { padding: 36px 26px 30px; border-radius: 16px; }
  .login-page::after  { display: none; }
  .login-card::before { left: 26px; right: 26px; }
}