:root {
  --navy: #0B1F3A;
  --navy-2: #102B4F;
  --gold: #C9A227;
  --gold-2: #E7BE4C;
  --background: #F5F7FA;
  --ink: #0B1F3A;
  --muted: #64748B;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, rgba(201, 162, 39, .08), transparent 26%),
    radial-gradient(circle at 90% 18%, rgba(11, 31, 58, .08), transparent 26%),
    var(--background);
  color: var(--ink);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-shell {
  width: min(1120px, 100%);
  min-height: min(680px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 460px;
  overflow: hidden;
  border: 1px solid rgba(11, 31, 58, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(11, 31, 58, .18);
  animation: shellEnter .55s ease both;
}

.login-intel-panel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 31, 58, .98), rgba(13, 48, 86, .95)),
    var(--navy);
  color: #fff;
}

.mesh-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at 25% 30%, rgba(201,162,39,.22), transparent 28%),
    radial-gradient(circle at 74% 74%, rgba(88,151,255,.16), transparent 32%);
  background-size: 42px 42px, 42px 42px, 100% 100%, 100% 100%;
  opacity: .75;
  animation: meshDrift 16s linear infinite;
}

.road-ribbon {
  position: absolute;
  left: -14%;
  right: -12%;
  height: 12px;
  border-radius: 999px;
  filter: blur(.2px);
  opacity: .86;
  transform-origin: center;
}

.road-ribbon-gold {
  bottom: 26%;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.2), var(--gold), rgba(231,190,76,.92), transparent);
  transform: rotate(-18deg);
  box-shadow: 0 0 38px rgba(201, 162, 39, .34);
}

.road-ribbon-silver {
  bottom: 36%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), rgba(255,255,255,.62), rgba(255,255,255,.18), transparent);
  transform: rotate(18deg);
  opacity: .48;
}

.glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(28px);
}

.glow-one {
  right: -80px;
  top: -80px;
  background: rgba(201,162,39,.16);
}

.glow-two {
  left: 28%;
  bottom: 16%;
  background: rgba(255,255,255,.12);
}

.intel-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 42px 48px 28px;
}

.intel-grid {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: auto;
}

.glass-stat {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.18);
  backdrop-filter: blur(18px);
}

.glass-stat-wide {
  grid-column: span 2;
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(201,162,39,.15);
  color: var(--gold-2);
  border: 1px solid rgba(201,162,39,.36);
}

.intel-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.74);
  font-size: 12px;
}

.login-card-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.9)),
    radial-gradient(circle at 100% 0, rgba(201,162,39,.12), transparent 34%);
}

.login-card {
  width: min(380px, 100%);
  padding: 24px 26px;
  border: 1px solid rgba(11, 31, 58, .10);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow:
    0 24px 60px rgba(11,31,58,.14),
    0 1px 0 rgba(255,255,255,.9) inset;
  backdrop-filter: blur(16px);
}

.logo-frame {
  width: 205px;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 14px 6px;
  border-radius: 18px;
  background: #fff;
}

.login-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brand-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}

.brand-divider::before,
.brand-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.65));
}

.brand-divider::after {
  background: linear-gradient(90deg, rgba(201,162,39,.65), transparent);
}

.brand-divider span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(201,162,39,.10);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid #D8DEE8;
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-shell:focus-within {
  border-color: rgba(201,162,39,.82);
  box-shadow: 0 0 0 4px rgba(201,162,39,.13), 0 10px 24px rgba(11,31,58,.08);
  transform: translateY(-1px);
}

.input-shell.is-invalid {
  border-color: #DC2626;
  box-shadow: 0 0 0 4px rgba(220,38,38,.09);
}

.input-icon {
  position: absolute;
  left: 18px;
  color: #64748B;
  pointer-events: none;
}

.premium-input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  padding: 0 16px 0 68px !important;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.premium-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

.password-toggle {
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748B;
  transition: background .2s ease, color .2s ease;
}

.password-toggle:hover {
  background: #F1F5F9;
  color: var(--ink);
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #475569;
  font-weight: 600;
}

.remember-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border-color: #CBD5E1;
  color: var(--gold);
}

.forgot-link {
  color: #9B7516;
  font-weight: 800;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--ink);
}

.signin-button {
  position: relative;
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #F2C44F, #C99418);
  color: #071424;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(201,162,39,.27);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.signin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(201,162,39,.34);
  filter: saturate(1.05);
}

.signin-button:hover .button-arrow {
  transform: translateX(4px);
}

.signin-button:disabled {
  cursor: wait;
  opacity: .82;
}

.button-arrow {
  transition: transform .2s ease;
}

.button-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7,20,36,.26);
  border-top-color: #071424;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.signin-button.is-loading .button-arrow {
  display: none;
}

.signin-button.is-loading .button-loader {
  display: inline-block;
}

.field-error {
  margin-top: 7px;
  color: #DC2626;
  font-size: 12px;
  font-weight: 700;
}

.caps-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #9B7516;
  font-size: 12px;
  font-weight: 700;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #E5EAF2;
  color: #64748B;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.auth-alert-error {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #991B1B;
}

.auth-alert-info,
.auth-alert-success {
  border: 1px solid #BFDBFE;
  background: #EFF6FF;
  color: #1E40AF;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-shell {
  width: min(1040px, 100%);
  min-height: min(660px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  overflow: hidden;
  border: 1px solid rgba(11, 31, 58, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(11, 31, 58, .16);
}

.auth-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 31, 58, .98), rgba(13, 48, 86, .95)),
    var(--navy);
  color: #fff;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    radial-gradient(circle at 30% 30%, rgba(201,162,39,.20), transparent 28%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
}

.auth-visual::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 30%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), rgba(231,190,76,.85), transparent);
  transform: rotate(-18deg);
  box-shadow: 0 0 34px rgba(201, 162, 39, .32);
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 42px 46px 28px;
}

.auth-eyebrow {
  color: var(--gold-2);
}

.auth-gold-line {
  width: 52px;
  height: 2px;
  margin: 22px 0 16px;
  background: var(--gold);
}

.auth-features {
  margin-top: auto;
  display: grid;
  gap: 15px;
}

.auth-feature {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
}

.auth-feature-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201,162,39,.75);
  border-radius: 50%;
  color: var(--gold-2);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 26px;
  background: radial-gradient(circle at 100% 0, rgba(201,162,39,.10), transparent 34%), #fff;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.74);
  font-size: 12px;
}

.auth-card {
  width: min(400px, 100%);
  padding: 24px 26px;
  border: 1px solid rgba(11, 31, 58, .10);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 60px rgba(11,31,58,.14);
}

.auth-logo {
  width: 215px;
  max-width: 100%;
  margin: 0 auto 10px;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.65));
}

.auth-divider::after {
  background: linear-gradient(90deg, rgba(201,162,39,.65), transparent);
}

.auth-divider span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.auth-primary {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #F2C44F, #C99418);
  color: #071424;
  font-weight: 900;
  text-decoration: none;
}

.auth-secondary {
  width: 100%;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--navy);
  border-radius: 12px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.auth-mini-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  color: #64748B;
  font-size: 13px;
}

.auth-mini-divider::before,
.auth-mini-divider::after {
  content: "";
  height: 1px;
  background: #DBE1EB;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .material-symbols-outlined {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy);
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 68px !important;
  border: 1px solid #D8DEE8;
  border-radius: 14px;
}

.input-shell .input-icon,
.auth-input-wrap .material-symbols-outlined {
  left: 22px !important;
  width: 20px;
  min-width: 20px;
}

.input-shell::after,
.auth-input-wrap::after {
  content: "";
  position: absolute;
  left: 54px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: #E2E8F0;
  pointer-events: none;
}

.premium-input.pr-12 {
  padding-right: 54px !important;
}

.auth-label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.auth-success-icon {
  width: 72px;
  height: 72px;
  margin: 2px auto 18px;
  display: grid;
  place-items: center;
  border: 3px solid #3FB950;
  border-radius: 50%;
  color: #3FB950;
}

.auth-note {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #C8E6C9;
  background: #EDF8EE;
  color: #164F26;
  font-size: 13px;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

@keyframes shellEnter {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes meshDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 42px 42px, 42px 42px, 0 0, 0 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1040px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
  }

  .login-intel-panel {
    min-height: 260px;
  }

  .intel-content {
    padding: 36px;
  }

  .intel-grid,
  .intel-footer {
    display: none;
  }

  .login-card-panel {
    padding: 34px 24px;
  }
}

@media (max-width: 640px) {
  .login-page {
    padding: 0;
    align-items: stretch;
  }

  .login-shell {
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .login-intel-panel {
    display: none;
  }

  .login-card-panel {
    min-height: 100vh;
    padding: 22px 16px;
    background: var(--background);
  }

  .login-card {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .logo-frame {
    width: 230px;
  }
}
