/* =====================================================================
   Cover The Gaps — Login Page Redesign
   A self-contained stylesheet including Aurora tokens, layouts,
   reusable button/input components, responsive grid and error styles.
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Neutrals */
  --bg:           #f4f5f8;
  --surface:      #ffffff;
  --surface-2:    #f8f9fc;
  --surface-3:    #f1f3f8;
  --border:       #e6e8ef;
  --border-2:     #d9dce6;
  --text:         #1a2030;
  --text-2:       #5b6577;
  --text-3:       #8b94a6;

  /* Accent */
  --primary:      #4f46e5;
  --primary-700:  #4338ca;
  --primary-50:   #eef0fe;
  --primary-100:  #e0e2fb;

  /* Status */
  --green:        #0a8f53;
  --green-bg:     #e6f6ee;
  --amber:        #b4690e;
  --amber-bg:     #fbf0dd;
  --rose:         #d61f49;
  --rose-bg:      #fdeaee;
  --sky:          #0e7490;
  --sky-bg:       #e0f2f7;

  /* Shape & Motion */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(20,28,48,.05), 0 1px 1px rgba(20,28,48,.04);
  --shadow:    0 2px 8px rgba(20,28,48,.06), 0 1px 2px rgba(20,28,48,.05);
  --shadow-md: 0 8px 28px rgba(20,28,48,.10), 0 2px 6px rgba(20,28,48,.06);
  --shadow-pop:0 18px 50px rgba(20,28,48,.22);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Resets ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Reusable Components ---------- */
/* Buttons */
.btn {
  --bw: 1px;
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 10px;
  border: var(--bw) solid var(--border-2); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: .15s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.35); }
.btn--primary:hover { background: var(--primary-700); border-color: var(--primary-700); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--sm { height: 34px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:disabled:active { transform: none; }

/* SSO Button */
.btn--sso {
  width: 100%; height: 48px; justify-content: center; font-size: 14.5px; font-weight: 700;
  border-radius: 12px; gap: 10px;
  background: #fff; border-color: var(--border-2); color: var(--text);
}
.btn--sso:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn--sso .g-mark { width: 19px; height: 19px; flex: none; }

/* Submit Button */
.btn--submit {
  width: 100%; height: 50px; justify-content: center; font-size: 15px; font-weight: 700;
  border-radius: 12px; gap: 9px;
}
.btn--submit svg { transition: transform .15s var(--ease); }
.btn--submit:hover svg { transform: translateX(3px); }

/* ---------- Layout Shell ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ===== Left — brand panel ===== */
.auth__brandpane {
  position: relative;
  overflow: hidden;
  background: #0f1322;
  color: #e7e9f1;
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
}
/* aurora glows */
.auth__brandpane::before,
.auth__brandpane::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}
.auth__brandpane::before {
  width: 480px; height: 480px;
  top: -140px; right: -120px;
  background: radial-gradient(circle at 30% 30%, #6d63f4, transparent 70%);
}
.auth__brandpane::after {
  width: 420px; height: 420px;
  bottom: -150px; left: -110px;
  background: radial-gradient(circle at 50% 50%, #0d9488, transparent 70%);
  opacity: .4;
}
.auth__brandpane > * { position: relative; z-index: 1; }

.auth__brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 800; letter-spacing: -.02em; font-size: 18px;
}
.auth__brand .brand__mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--primary), #7c74f3);
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.auth__brand .brand__mark svg { width: 19px; height: 19px; }

.auth__brandbody { margin: auto 0; max-width: 460px; }
.auth__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #aab3ff;
  background: rgba(124,116,243,.14);
  border: 1px solid rgba(124,116,243,.28);
  padding: 6px 12px; border-radius: 999px;
}
.auth__eyebrow svg { width: 14px; height: 14px; }
.auth__headline {
  margin: 22px 0 14px;
  font-size: 40px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em;
  text-wrap: balance;
}
.auth__headline .grad {
  background: linear-gradient(100deg, #a5b4ff, #7ee7d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth__lead { margin: 0; color: #aab2c9; font-size: 16px; line-height: 1.6; }

.auth__points { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.auth__points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: #cfd5e6; font-weight: 500; }
.auth__points .tick {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: rgba(124,116,243,.18); color: #b8c0ff;
}
.auth__points .tick svg { width: 15px; height: 15px; }

.auth__quote {
  margin-top: 42px; padding: 18px 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  font-size: 14.5px; line-height: 1.6; color: #d7dbe8;
}
.auth__quote .who { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.auth__quote .who .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg,#f0a04b,#e76f51);
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800;
}
.auth__quote .who b { font-size: 13px; font-weight: 700; color: #fff; }
.auth__quote .who span { font-size: 12px; color: #8b93a8; }

.auth__footnote { margin-top: auto; padding-top: 32px; font-size: 12.5px; color: #6f7891; }
.auth__footnote a { color: #9aa3bd; text-decoration: underline; text-underline-offset: 2px; }

/* ===== Right — form panel ===== */
.auth__formpane {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
}
.authcard { width: 100%; max-width: 392px; }

.authcard__head { margin-bottom: 26px; }
.authcard__title { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.authcard__sub { margin: 7px 0 0; color: var(--text-2); font-size: 14.5px; }
.authcard__sub a { color: var(--primary); font-weight: 650; }
.authcard__sub a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* divider */
.auth__or {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  color: var(--text-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* fields */
.field { margin-bottom: 16px; }
.field__top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field__link { font-size: 12.5px; font-weight: 650; color: var(--primary); }
.field__link:hover { text-decoration: underline; text-underline-offset: 2px; }

.inp {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px;
  transition: .15s var(--ease);
}
.inp:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); background: #fff; }
.inp > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.inp input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-family: inherit; font-size: 15px; color: var(--text); font-weight: 500;
}
.inp input::placeholder { color: var(--text-3); font-weight: 400; }
.inp__toggle {
  border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 6px;
  display: grid; place-items: center; flex: none;
}
.inp__toggle:hover { color: var(--text-2); background: var(--surface-3); }
.inp__toggle svg { width: 18px; height: 18px; }

.field__row {
  display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 22px;
}
.remember { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); font-weight: 600; cursor: pointer; }
.remember input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--border-2);
  background: #fff; cursor: pointer; flex: none; transition: .14s var(--ease); position: relative;
}
.remember input:checked { background: var(--primary); border-color: var(--primary); }
.remember input:checked::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.remember input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-50); }

.authcard__foot {
  margin-top: 26px; text-align: center; font-size: 14px; color: var(--text-2);
}
.authcard__foot a { color: var(--primary); font-weight: 700; }
.authcard__foot a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Mobile Brand Chip (hidden on desktop) */
.auth__mobilebrand { display: none; }

/* ---------- Custom Validation Error Styles ---------- */
.auth__error-alert {
  background: var(--rose-bg);
  border: 1px solid rgba(214, 31, 73, 0.2);
  color: var(--rose);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
}
.auth__error-alert p, .field__error p {
  margin: 0;
}
.field__error {
  color: var(--rose);
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 2px;
}
.inp.is-invalid {
  border-color: var(--rose);
}
.inp.is-invalid:focus-within {
  box-shadow: 0 0 0 3px rgba(214, 31, 73, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brandpane { display: none; }
  .auth__formpane { padding: 32px 22px; align-items: flex-start; }
  .auth__mobilebrand {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    margin-bottom: 30px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; color: var(--text);
  }
  .auth__mobilebrand .brand__mark {
    width: 32px; height: 32px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--primary), #7c74f3);
    display: grid; place-items: center; color: #fff;
  }
  .auth__mobilebrand .brand__mark svg { width: 18px; height: 18px; }
  .authcard { margin: 0 auto; }
}
