/* ==========================================================================
   Wind UI for the sign-in and password screens (JSP kept, skin only).
   Pages: login.jsp (/login), forgotpassw.jsp (/forgot-passw), passwchangesent.jsp (/passw-change-sent),
   passwchange.jsp (/passw-change), passwchanged.jsp (/passw-changed).
   Every form, field, id, name, action and script on those pages is unchanged; this file only styles them.
   Light only, like the public website (tokens = css/wind-skin.css). See .agents/skills/wind_ui section 11.
   ========================================================================== */

:root {
  --wind-accent: #46178F;
  --wind-accent-hover: #3a1277;
  --wind-accent-soft: #efe7f7;
  --wind-accent-ink: #2d0f5c;
  --wind-surface: #ffffff;
  --wind-surface-2: #f7f8fb;
  --wind-page: #f4f6fa;
  --wind-line: #e5e8ef;
  --wind-line-strong: #cfd5e1;
  --wind-ink: #0f172a;
  --wind-ink-2: #475569;
  --wind-ink-3: #64748b;
  --wind-alert: #b42318;
  --wind-ok: #046b4c;
  --wind-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 32px -22px rgba(15, 23, 42, 0.28);
  --wind-shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.05), 0 24px 48px -28px rgba(15, 23, 42, 0.35);
  --radius-wind: 22px;
  --radius-wind-inner: 14px;
  color-scheme: light;
}

/* ── Page: soft violet glow, like the principal home's hero ── */
html { -webkit-text-size-adjust: 100%; }
body.wa-auth {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--wind-ink-2);
  background:
    radial-gradient(circle at 12% 8%, rgba(70, 23, 143, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(30, 136, 229, 0.09) 0%, transparent 42%),
    radial-gradient(circle at 50% 38%, rgba(70, 23, 143, 0.05) 0%, transparent 55%),
    var(--wind-page);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
.wa-auth *, .wa-auth *::before, .wa-auth *::after { box-sizing: border-box; }
.wa-auth ::selection { background: var(--wind-accent-soft); color: var(--wind-accent-ink); }

/* The old template's preloader (custom.js fades it out); the Wind pages paint at once. */
.wa-auth #loading { display: none !important; }

/* passwchangesent / passwchanged wrap header, main and footer in the old .site-wrapper */
.wa-auth > .site-wrapper { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100vh; width: 100%; }

.wa-auth__main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 48px;
}

/* ── The Vidyalay mark ── */
.wa-auth__mark { display: inline-flex; margin: 0 0 22px; border-radius: 12px; }
.wa-auth__mark img { display: block; height: 52px; width: auto; max-width: 100%; }

/* ── The card ── */
.wa-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--wind-surface);
  border: 1px solid var(--wind-line);
  border-radius: var(--radius-wind);
  box-shadow: var(--wind-shadow-lift);
  padding: 32px 28px 28px;
}
.wa-auth__card--center { text-align: center; }
.wa-auth__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--wind-ink);
}
.wa-auth__sub { margin: 0 0 22px; font-size: 13.5px; color: var(--wind-ink-3); }
.wa-auth__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-wind-inner);
  background: var(--wind-accent-soft);
  color: var(--wind-accent);
  font-size: 24px;
}
.wa-auth__icon--ok { background: color-mix(in srgb, var(--wind-ok) 12%, #fff); color: var(--wind-ok); }

/* ── Fields ── */
.wa-auth form { margin: 0; }
.wa-field { margin: 0 0 16px; }
.wa-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wind-ink);
}
.wa-label__req { color: var(--wind-ink-3); font-weight: 400; }
.wa-control { position: relative; display: block; }
.wa-auth input[type="text"],
.wa-auth input[type="email"],
.wa-auth input[type="password"] {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  font: 400 14px/1.4 'Poppins', system-ui, sans-serif;
  color: var(--wind-ink);
  background: var(--wind-surface);
  border: 1px solid var(--wind-line-strong);
  border-radius: var(--radius-wind-inner);
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wa-auth input::placeholder { color: #94a3b8; opacity: 1; }
.wa-auth input[type="text"]:hover,
.wa-auth input[type="email"]:hover,
.wa-auth input[type="password"]:hover { border-color: #b8c0d0; }
.wa-auth input[type="text"]:focus,
.wa-auth input[type="email"]:focus,
.wa-auth input[type="password"]:focus {
  border-color: var(--wind-accent);
  box-shadow: 0 0 0 3px var(--wind-accent-soft);
}
.wa-control--eye input { padding-right: 46px; }
/* login.jsp: the eye toggle (#showPasswordIcon, togglePasswordVisibility) sits inside the field */
.wa-auth #showPasswordIcon {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--wind-ink-3);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wa-auth #showPasswordIcon:hover { background: var(--wind-surface-2); color: var(--wind-accent); }

.wa-row { display: flex; justify-content: flex-end; margin: -6px 0 20px; font-size: 13px; }

/* ── Links ── */
.wa-auth a { color: var(--wind-accent); font-weight: 500; text-decoration: none; transition: color 0.15s ease; }
.wa-auth a:hover { color: var(--wind-accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.wa-auth a:focus-visible,
.wa-auth button:focus-visible,
.wa-auth #showPasswordIcon:focus-visible {
  outline: 2px solid var(--wind-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── Buttons ── */
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 20px;
  font: 600 15px/1 'Poppins', system-ui, sans-serif;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.wa-btn--primary { background: var(--wind-accent); color: #fff !important; border: 1px solid var(--wind-accent); }
.wa-btn--primary:hover { background: var(--wind-accent-hover); border-color: var(--wind-accent-hover); }
.wa-btn--primary:active { transform: scale(0.99); }
.wa-btn--primary:focus-visible { box-shadow: 0 0 0 4px var(--wind-accent-soft); }
/* login.jsp onFormSubmitted() disables the button and sets an inline grey; keep it the accent, dimmed */
.wa-auth #login-btn:disabled {
  background: color-mix(in srgb, var(--wind-accent) 60%, #fff) !important;
  border-color: transparent;
  cursor: progress;
}
.wa-btn--ghost {
  background: var(--wind-surface);
  color: var(--wind-accent-ink) !important;
  border: 1px solid var(--wind-line-strong);
}
.wa-btn--ghost:hover { background: var(--wind-accent-soft); border-color: var(--wind-accent-soft); }
.wa-btn .mdc-button__label { pointer-events: none; }
.wa-btn .mdc-button__ripple { display: none; }

.wa-or {
  display: flex; align-items: center;
  margin: 20px 0;
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--wind-ink-3);
}
.wa-or::before, .wa-or::after { content: ""; flex: 1; height: 1px; background: var(--wind-line); }
.wa-or::before { margin-right: 12px; }
.wa-or::after { margin-left: 12px; }

.wa-auth__alt { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--wind-ink-3); }

/* ── Inline messages ── */
.wa-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  border-radius: var(--radius-wind-inner);
}
.wa-alert i { margin-top: 2px; flex: none; }
.wa-alert--error {
  color: color-mix(in srgb, var(--wind-alert) 80%, var(--wind-ink));
  background: color-mix(in srgb, var(--wind-alert) 8%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wind-alert) 28%, transparent);
}
.wa-alert--error i { color: var(--wind-alert); }
.wa-alert--ok {
  color: color-mix(in srgb, var(--wind-ok) 80%, var(--wind-ink));
  background: color-mix(in srgb, var(--wind-ok) 8%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wind-ok) 28%, transparent);
}
.wa-alert--ok i { color: var(--wind-ok); }
/* Messages a page's own script writes (forgotpassw #message, passwchange #mesg): hidden while empty */
.wa-alert:empty { display: none; }

/* ── Old site header kept on the two "done" pages (passwchangesent, passwchanged): a slim glass bar ── */
.wa-auth .site-header {
  position: sticky; top: 0; z-index: 20;
  width: 100%;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--wind-line);
}
.wa-auth .site-header .container-fluid { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wa-auth .site-navbar { display: flex; align-items: center; gap: 12px; min-height: 64px; position: relative; }
.wa-auth .brand-logo a { display: inline-flex; border-radius: 10px; }
.wa-auth .brand-logo img { display: block; height: 36px; width: auto; }
.wa-auth .site-navbar ul { list-style: none; margin: 0; padding: 0; }
.wa-auth .navbar-collapse { margin-left: auto; }
.wa-auth .navbar-collapse > .navbar-nav { display: flex; align-items: center; }
.wa-auth .main-menu { display: flex; align-items: center; gap: 2px; }
.wa-auth .main-menu .nav-item { position: relative; }
.wa-auth .main-menu .nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--wind-ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.wa-auth .main-menu .nav-link:hover { background: var(--wind-accent-soft); color: var(--wind-accent-ink); text-decoration: none; }
.wa-auth .dropdown-toggle::after {
  content: ""; width: 6px; height: 6px; margin-left: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.wa-auth .menu-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--wind-surface);
  border: 1px solid var(--wind-line);
  border-radius: var(--radius-wind-inner);
  box-shadow: var(--wind-shadow-lift);
  z-index: 30;
}
.wa-auth .menu-dropdown.show,
.wa-auth .nav-item.dropdown:hover > .menu-dropdown,
.wa-auth .nav-item.dropdown:focus-within > .menu-dropdown { display: block; }
.wa-auth .drop-menu-item a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--wind-ink); font-size: 13.5px;
}
.wa-auth .drop-menu-item a:hover { background: var(--wind-accent-soft); color: var(--wind-accent-ink); text-decoration: none; }
.wa-auth .header-btns .btn-header {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px;
  border-radius: 999px; background: var(--wind-accent); color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.wa-auth .header-btns .btn-header:hover { background: var(--wind-accent-hover); color: #fff; text-decoration: none; }
/* Bootstrap's collapse buttons: the close buttons belong to the phone menu, the burger opens it */
.wa-auth .site-navbar .btn-close { display: none; }
.wa-auth .navbar-toggler {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--wind-line);
  border-radius: 999px;
  color: var(--wind-ink);
  cursor: pointer;
}
.wa-auth .navbar-toggler .icon-close { display: none; }
.wa-auth .navbar-toggler[aria-expanded="true"] .icon-close { display: inline; }
.wa-auth .navbar-toggler[aria-expanded="true"] .icon-burger { display: none; }
.wa-auth .navbar-toggler .icon { font-style: normal; }
.wa-auth .navbar-toggler .icon-burger::before { content: "\2630"; font-size: 17px; }
.wa-auth .navbar-toggler .icon-close::before { content: "\2715"; font-size: 15px; }

@media (max-width: 760px) {
  .wa-auth .navbar-toggler { display: inline-flex; }
  .wa-auth .header-btns { margin-left: auto; }
  .wa-auth .navbar-collapse {
    display: none;
    position: absolute; top: calc(100% + 1px); left: -16px; right: -16px;
    margin: 0;
    padding: 8px 16px 14px;
    background: var(--wind-surface);
    border-bottom: 1px solid var(--wind-line);
    box-shadow: var(--wind-shadow);
  }
  .wa-auth .navbar-collapse.show,
  .wa-auth .navbar-collapse.collapsing { display: block; height: auto !important; }
  .wa-auth .navbar-collapse > .navbar-nav,
  .wa-auth .main-menu { flex-direction: column; align-items: stretch; }
  .wa-auth .main-menu .nav-link { width: 100%; }
  .wa-auth .menu-dropdown { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; }
}

/* ── Quiet footer (passwchanged) ── */
.wa-auth__footer {
  width: 100%;
  padding: 18px 16px 22px;
  border-top: 1px solid var(--wind-line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  color: var(--wind-ink-3);
}
.wa-auth__footer-in {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
}
.wa-auth__footer p { margin: 0; }
.wa-auth__footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.wa-auth__footer a { color: var(--wind-ink-2); font-weight: 500; }
.wa-auth__footer a:hover { color: var(--wind-accent); }

/* ── Phone ── */
@media (max-width: 480px) {
  .wa-auth__main { justify-content: flex-start; padding: 28px 16px 36px; }
  .wa-auth__mark img { height: 44px; }
  .wa-auth__card { padding: 26px 20px 22px; border-radius: 20px; }
  .wa-auth__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-auth *, .wa-auth *::before, .wa-auth *::after { transition: none !important; }
}
