@import url('/css/shared/production-surface.css');

/* =====================================================================
   Admin Login Desktop — Two-panel design
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --auth-blue-dark:  #0f2460;
  --auth-blue-mid:   #1a3a8f;
  --auth-blue-light: #2563d4;
  --auth-accent:     #3e8ef7;
  --auth-ink:        #1e2d4e;
  --auth-muted:      #7a8baa;
  --auth-line:       #dce6f5;
  --auth-input-bg:   #f0f5ff;
  --auth-font: 'Manrope', 'Segoe UI', sans-serif;
  --auth-success:    #16a34a;
  --auth-danger:     #dc2626;
  --auth-warning:    #b45309;
}

html, body {
  min-height: 100%;
  font-family: var(--auth-font);
  -webkit-text-size-adjust: 100%;
  background: radial-gradient(ellipse 80% 60% at 30% 20%, #1a3a8f 0%, #0b1d56 60%, #060e2e 100%);
}

/* Toast */
.al-toast-stack {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 440px);
  z-index: 9999;
  display: grid; gap: 7px;
  pointer-events: none;
}
.al-toast {
  border-radius: 9px; padding: 11px 16px;
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
}
.al-toast.is-success { background: var(--auth-success); }
.al-toast.is-error   { background: var(--auth-danger); }

/* Wrap */
.al-wrap {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Card */
.al-card-shell {
  display: grid;
  grid-template-columns: 340px 460px;
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 36px 72px rgba(0,0,0,.55);
  animation: al-fade-up .42s ease;
}

@keyframes al-fade-up {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ===== LEFT PANEL ===== */
.al-side-visual {
  position: relative;
  background: linear-gradient(175deg, #1b3f9a 0%, #112d80 45%, #0c2265 100%);
  display: flex; flex-direction: column;
  padding: 32px 28px 28px;
  overflow: hidden; color: #fff;
}
.al-side-visual::before {
  content: '';
  position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(100,160,255,.18) 0%, transparent 70%);
  top: -100px; left: -100px; pointer-events: none;
}
.al-side-visual::after {
  content: '';
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(60,120,255,.12) 0%, transparent 70%);
  bottom: -70px; right: -70px; pointer-events: none;
}

/* Brand */
.al-brand-row {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0;
}
.al-brand-dot {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  display: grid; place-items: center;
  font-size: 15px; color: #fff; flex-shrink: 0;
}
.al-brand-text {
  font-size: 13px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.92);
}

/* Cube */
.al-cube-wrap {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0;
}
.al-iso {
  width: 180px; height: 180px;
  position: relative;
}
.iso-block { position: absolute; }
.iso-top, .iso-left, .iso-right { position: absolute; }
.iso-top  { clip-path: polygon(50% 0%, 100% 25%, 50% 50%, 0% 25%); }
.iso-left { clip-path: polygon(0% 0%, 50% 25%, 50% 100%, 0% 75%); }
.iso-right{ clip-path: polygon(50% 0%, 100% 25%, 100% 100%, 50% 75%); }

.iso-b1 { top:20px; left:54px; width:80px; height:80px; }
.iso-b1 .iso-top  { width:80px; height:40px; top:0; left:0; background:#4a8af4; }
.iso-b1 .iso-left { width:40px; height:50px; top:20px; left:0; background:#1e4abc; }
.iso-b1 .iso-right{ width:40px; height:50px; top:20px; left:40px; background:#2a5fd4; }

.iso-b2 { top:64px; left:18px; width:62px; height:62px; }
.iso-b2 .iso-top  { width:62px; height:31px; top:0; left:0; background:#5b9cf6; }
.iso-b2 .iso-left { width:31px; height:38px; top:15.5px; left:0; background:#2348a8; }
.iso-b2 .iso-right{ width:31px; height:38px; top:15.5px; left:31px; background:#2e5cca; }

.iso-b3 { top:64px; left:80px; width:62px; height:62px; }
.iso-b3 .iso-top  { width:62px; height:31px; top:0; left:0; background:#4a8af4; }
.iso-b3 .iso-left { width:31px; height:38px; top:15.5px; left:0; background:#1e3fa0; }
.iso-b3 .iso-right{ width:31px; height:38px; top:15.5px; left:31px; background:#2753be; }

.iso-b4 { top:0px; left:66px; width:52px; height:52px; }
.iso-b4 .iso-top  { width:52px; height:26px; top:0; left:0; background:#74aeff; }
.iso-b4 .iso-left { width:26px; height:32px; top:13px; left:0; background:#2a53bd; }
.iso-b4 .iso-right{ width:26px; height:32px; top:13px; left:26px; background:#3466d6; }

.iso-b5 { top:104px; left:54px; width:44px; height:44px; }
.iso-b5 .iso-top  { width:44px; height:22px; top:0; left:0; background:#3c79e8; }
.iso-b5 .iso-left { width:22px; height:28px; top:11px; left:0; background:#162f82; }
.iso-b5 .iso-right{ width:22px; height:28px; top:11px; left:22px; background:#1f3ea0; }

/* Welcome text */
.al-hero-title {
  position: relative; z-index: 2;
  font-size: 13px; font-weight: 800;
  letter-spacing: .18em; color: rgba(255,255,255,.75);
  text-transform: uppercase; margin-bottom: 4px;
}
.al-company-name {
  position: relative; z-index: 2;
  font-size: 28px; font-weight: 800;
  line-height: 1.15; color: #fff;
  margin-bottom: 8px;
}
.al-hero-desc {
  position: relative; z-index: 2;
  font-size: 12px; line-height: 1.65;
  color: rgba(255,255,255,.66); max-width: 240px;
  margin-bottom: 14px;
}
.al-feature-list {
  position: relative; z-index: 2;
  list-style: none; margin-bottom: 16px;
}
.al-feature-list li {
  font-size: 11.5px; color: rgba(255,255,255,.78);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.al-feature-list li i { color: #7dd3a8; font-size: 11px; }

/* Network badge */
.al-net-badge {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 5px 11px;
  font-size: 11px; font-weight: 700;
  border: 1px solid currentColor;
  width: fit-content;
}
.al-net-badge i { font-size: 7px; }
.al-net-badge.is-online  { color: #7dd3a8; }
.al-net-badge.is-offline { color: #fca5a5; }

/* ===== RIGHT PANEL ===== */
.al-form-panel {
  background: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.al-form-card {
  flex: 1; display: flex; flex-direction: column;
  padding: 32px 32px 20px;
}

.al-form-card h2 {
  font-size: 22px; font-weight: 800;
  color: var(--auth-ink); line-height: 1.25;
  margin-bottom: 5px;
}
.al-subtitle {
  font-size: 12px; color: var(--auth-muted);
  line-height: 1.55; margin-bottom: 20px;
}

/* Caps lock */
.al-caps-hint {
  display: none; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 8px;
  background: #fffbeb; border: 1px solid #fcd34d;
  font-size: 12px; color: var(--auth-warning);
  margin-bottom: 10px;
}
.al-caps-hint.visible { display: flex; }

/* Alert */
.al-alert {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px; border-radius: 10px;
  margin-bottom: 14px; font-size: 12px; line-height: 1.45;
}
.al-alert-danger { background:#fff1f2; color:#991b1b; border:1px solid #fecaca; }
.al-alert-danger i { color: #dc2626; }

/* Form inner */
.al-form-inner { margin-bottom: 0; }

/* Tab nav */
.al-tab-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin: 14px 0 0;
}
.tab-btn {
  min-height: 36px; border-radius: 999px;
  border: 1.5px solid var(--auth-blue-light);
  background: transparent; color: var(--auth-blue-light);
  font-family: var(--auth-font);
  font-size: 12px; font-weight: 700;
  cursor: pointer; letter-spacing: .03em;
  transition: background .18s, color .18s, box-shadow .18s;
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--auth-blue-light), var(--auth-accent));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(37,99,212,.35);
}

/* Sections */
.form-section { display: none; }
.form-section.active { display: block; }

/* Fields */
.al-field { margin-bottom: 13px; }
.al-label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--auth-ink); margin-bottom: 5px; letter-spacing:.02em;
}
.al-input-wrap {
  position: relative; display: flex; align-items: center;
}
.al-input-icon {
  position: absolute; left: 13px; z-index: 1;
  color: var(--auth-muted); font-size: 13px;
  pointer-events: none;
}
.al-input {
  width: 100%; height: 44px; border-radius: 10px;
  border: 1.5px solid var(--auth-line);
  background: var(--auth-input-bg);
  padding: 0 42px 0 38px;
  font-family: var(--auth-font);
  font-size: 13px; color: var(--auth-ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.al-input::placeholder { color: #b0becc; }
.al-input:focus {
  border-color: var(--auth-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(62,142,247,.15);
}
.al-input.is-invalid { border-color: var(--auth-danger); }

/* Password toggle */
.al-pw-toggle {
  position: absolute; right: 11px;
  background: none; border: none; cursor: pointer;
  color: var(--auth-muted); font-size: 13px; padding: 4px;
}
.al-pw-toggle:hover { color: var(--auth-accent); }

/* Options row */
.al-options-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin: -2px 0 13px;
}
.al-remember {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--auth-muted); cursor: pointer;
}
.al-remember input[type="checkbox"] {
  width: 14px; height: 14px; border-radius: 3px;
  accent-color: var(--auth-blue-light); flex-shrink: 0;
}
.al-forgot {
  font-size: 11.5px; font-weight: 700;
  color: var(--auth-accent); text-decoration: none;
}
.al-forgot:hover { text-decoration: underline; }

/* Cloudflare Turnstile */
.al-recaptcha-wrap {
  margin-bottom: 10px;
  min-height: 58px;
  overflow: hidden;
}

.al-recaptcha-wrap .cf-turnstile {
  display: inline-block;
  transform: scale(0.88);
  transform-origin: left top;
}

/* Submit button */
.al-btn-submit {
  width: 100%; height: 46px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, var(--auth-blue-light) 0%, var(--auth-accent) 100%);
  color: #fff; font-family: var(--auth-font);
  font-size: 14px; font-weight: 800; letter-spacing:.04em;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 8px 22px rgba(37,99,212,.42);
  transition: opacity .18s, box-shadow .18s;
}
.al-btn-submit:hover { opacity:.92; box-shadow: 0 10px 30px rgba(37,99,212,.52); }
.al-btn-submit:active { opacity:.85; }

/* Validation */
.al-field-err, .invalid-feedback {
  display: none; font-size: 11px; color: var(--auth-danger); margin-top: 4px;
}
.al-input.is-invalid ~ .al-field-err,
.al-input.is-invalid ~ .invalid-feedback { display: block; }

/* Signup panel */
.al-signup-panel { margin-top: 4px; }
.al-signup-panel h3 { display: none; }
.al-signup-panel > p { display: none; }

/* OTP */
.al-phone-row { display: flex; gap: 8px; }
.al-phone-row .al-input-wrap { flex: 1; }
.al-btn-otp {
  flex-shrink: 0; padding: 0 14px; height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--auth-blue-light);
  background: transparent; color: var(--auth-blue-light);
  font-family: var(--auth-font); font-size: 11.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  transition: background .18s, color .18s;
}
.al-btn-otp:not([disabled]):hover { background: var(--auth-blue-light); color: #fff; }
.al-btn-otp[disabled] { opacity: .5; cursor: not-allowed; }
.otp-status { font-size: 11px; color: var(--auth-muted); margin-top: 4px; }
.otp-verified-badge {
  position: absolute; right: 10px;
  background: var(--auth-success); color: #fff;
  border-radius: 5px; font-size: 11px;
  padding: 2px 8px;
}

/* PW rules */
.al-pw-rules {
  list-style: none; margin: 6px 0 0;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.al-pw-rules li {
  font-size: 10px; padding: 2px 9px;
  border-radius: 999px;
  background: #f0f4ff; color: var(--auth-muted);
  border: 1px solid var(--auth-line);
}
.al-pw-rules li.valid  { background:#dcfce7; color:#166534; border-color:#86efac; }
.al-pw-rules li.invalid{ background:#fff1f2; color:#991b1b; border-color:#fca5a5; }

/* PW strength */
.al-pw-strength { margin-top: 7px; }
.al-pw-strength .strength-bars { display:flex; gap:4px; height:4px; margin-bottom:4px; }
.al-pw-strength .strength-bar { flex:1; border-radius:2px; background:var(--auth-line); transition:background .2s; }
.al-pw-strength .strength-text-signup { font-size:11px; color:var(--auth-muted); }
.al-pw-strength.strength-1 .strength-bar:nth-child(1) { background:#ef4444; }
.al-pw-strength.strength-2 .strength-bar:nth-child(-n+2) { background:#f97316; }
.al-pw-strength.strength-3 .strength-bar:nth-child(-n+3) { background:#eab308; }
.al-pw-strength.strength-4 .strength-bar { background:var(--auth-success); }

.al-btn-signup-submit { margin-top: 6px; }

/* Footer */
.al-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 32px 16px;
  font-size: 10.5px; color: var(--auth-muted);
  border-top: 1px solid var(--auth-line);
}
.al-footer i { color: var(--auth-accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .al-card-shell { grid-template-columns: 260px 1fr; }
}
@media (max-width: 680px) {
  .al-wrap { padding: 0; align-content: stretch; }
  .al-card-shell {
    grid-template-columns: 1fr;
    min-height: 100vh; border-radius: 0; box-shadow: none;
  }
  .al-side-visual { display: none; }
  .al-form-card { padding: 24px 20px 16px; }
  .al-footer { padding: 10px 20px 16px; }
}
