/* ═══════════════════════════════════════════════════
   Apex — Auth Stylesheet
   Extracted from auth.html prototype
═══════════════════════════════════════════════════ */

:root {
  --accent: #e85d04; --accent-soft: rgba(232,93,4,0.10); --accent-hover: #cf5200;
  --brand: #1a1a2e; --bg: #f5f3ef; --surface: #ffffff; --surface-2: #faf8f5;
  --border: #e4dfd8; --text: #1a1a1a; --text-muted: #6e6860; --text-light: #a09890;
  --green: #16a34a; --green-soft: rgba(22,163,74,0.09);
  --red: #dc2626; --red-soft: rgba(220,38,38,0.09);
  --yellow: #d97706; --yellow-soft: rgba(217,119,6,0.09);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --radius: 16px; --radius-sm: 10px; --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #12111a; --surface: #1e1d2b; --surface-2: #16151f;
  --border: rgba(255,255,255,0.09); --text: #f0eee8;
  --text-muted: #7c7a88; --text-light: #4e4c58;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100vh;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
}
h1, h2, h3 { font-family: 'Lora', serif; letter-spacing: -0.02em; }

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

/* ── Left Panel ── */
.auth-panel-left {
  background: var(--brand);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  position: relative;
  overflow: hidden;
}
.auth-panel-left::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,93,4,0.16) 0%, transparent 68%);
  bottom: -130px; right: -90px;
  pointer-events: none; z-index: 0;
}
.left-content { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.auth-logo-letter { font-family: 'Lora', serif; font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1; }
.auth-logo-word { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,0.88); }
.auth-brand-block { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 60px 0 40px; position: relative; z-index: 1; }
.auth-brand-headline { font-family: 'Lora', serif; font-size: 36px; font-weight: 700; color: #fff; line-height: 1.25; letter-spacing: -0.03em; margin-bottom: 18px; }
.auth-brand-headline em { font-style: italic; color: var(--accent); }
.auth-brand-sub { font-size: 14.5px; color: rgba(255,255,255,0.5); line-height: 1.7; max-width: 340px; }
.auth-testimonial {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  position: relative; z-index: 1;
}
.auth-test-quote { font-size: 13.5px; color: rgba(255,255,255,0.78); line-height: 1.65; margin-bottom: 12px; font-style: italic; }
.auth-test-author { display: flex; align-items: center; gap: 10px; }
.auth-test-av { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-test-av span { color: #fff; font-size: 11px; font-weight: 800; }
.auth-test-name { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.88); }
.auth-test-role { font-size: 11px; color: rgba(255,255,255,0.38); }

/* ── Right Panel ── */
.auth-panel-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  position: relative;
  background: var(--surface);
  transition: background var(--transition);
}
.theme-toggle-btn {
  position: absolute; top: 22px; right: 22px;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); color: var(--text-muted);
}
.theme-toggle-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle-btn .material-icons-round { font-size: 18px; }
.auth-form-wrap { width: 100%; max-width: 400px; }

/* ── Screens ── */
.auth-screen { display: none; animation: fadeUp .26s ease; }
.auth-screen.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Screen header ── */
.screen-header { margin-bottom: 26px; }
.screen-header h2 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.screen-header p { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }

/* ── Fields ── */
.field { margin-bottom: 15px; }
.field label, .field-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.field-row-between .field-label { margin-bottom: 0; }
.input-wrap { position: relative; }
.input-wrap .iicon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--text-light); pointer-events: none; transition: color var(--transition); }
.input-wrap:focus-within .iicon { color: var(--accent); }
.input-wrap input {
  width: 100%;
  font-family: 'Raleway', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px 11px 41px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.has-toggle input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-light); z-index: 2; transition: color var(--transition); }
.pw-toggle:hover { color: var(--text-muted); }
.pw-toggle .material-icons-round { font-size: 18px; display: block; }

/* ── Password strength ── */
.pw-strength { display: none; margin-top: -8px; margin-bottom: 14px; }
.pw-segs { display: flex; gap: 4px; margin-bottom: 5px; }
.pw-seg { flex: 1; height: 3px; border-radius: 2px; background: var(--border); transition: background .2s; }
.pw-label { font-size: 11px; font-weight: 700; color: var(--text-muted); }

/* ── Links + Buttons ── */
.auth-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; cursor: pointer; transition: opacity var(--transition); background: none; border: none; font-family: 'Raleway', sans-serif; }
.auth-link:hover { opacity: .75; }
.btn-submit {
  width: 100%; padding: 13px;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-family: 'Raleway', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .01em;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 4px; text-decoration: none;
}
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,93,4,.35); }
.btn-submit:active { transform: none; }
.btn-submit.loading { pointer-events: none; opacity: .78; }
.btn-submit .material-icons-round { font-size: 18px; }

/* ── Divider ── */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 11.5px; color: var(--text-light); font-weight: 600; white-space: nowrap; }

/* ── Footer row ── */
.auth-footer-row { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* ── Banners ── */
.auth-banner { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; font-weight: 600; line-height: 1.5; display: none; align-items: flex-start; gap: 9px; margin-bottom: 16px; }
.auth-banner.show { display: flex; }
.auth-banner .material-icons-round { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-banner.err { background: var(--red-soft); color: var(--red); border: 1px solid rgba(220,38,38,.18); }
.auth-banner.ok  { background: var(--green-soft); color: var(--green); border: 1px solid rgba(22,163,74,.18); }

/* ── Check email ── */
.ce-icon { width: 68px; height: 68px; border-radius: 17px; background: var(--accent-soft); border: 2px solid rgba(232,93,4,.18); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.ce-icon .material-icons-round { font-size: 32px; color: var(--accent); }
.ce-steps { background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin: 18px 0; display: flex; flex-direction: column; gap: 11px; }
.ce-step { display: flex; align-items: flex-start; gap: 11px; }
.ce-step-num { width: 21px; height: 21px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.ce-step-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.ce-step-text strong { color: var(--text); }
.resend-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }

/* ── Verify icons ── */
.vicon-wrap { width: 76px; height: 76px; border-radius: 19px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.vicon-wrap .material-icons-round { font-size: 36px; }
.vicon-ok  { background: var(--green-soft);  border: 2px solid rgba(22,163,74,.2); }
.vicon-ok  .material-icons-round { color: var(--green); }
.vicon-inv { background: var(--red-soft);    border: 2px solid rgba(220,38,38,.2); }
.vicon-inv .material-icons-round { color: var(--red); }
.vicon-exp { background: var(--yellow-soft); border: 2px solid rgba(217,119,6,.22); }
.vicon-exp .material-icons-round { color: var(--yellow); }

/* ── Back link ── */
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; margin-bottom: 24px; transition: color var(--transition); text-decoration: none; }
.back-link:hover { color: var(--text); }
.back-link .material-icons-round { font-size: 16px; }

/* ── Mobile logo ── */
.mobile-logo-row { display: none; align-items: center; gap: 10px; margin-bottom: 32px; }
.ml-letter { font-family: 'Lora', serif; font-size: 24px; font-weight: 700; color: var(--accent); }
.ml-word   { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { min-height: 100vh; padding: 48px 28px; justify-content: flex-start; padding-top: 64px; }
  .auth-form-wrap { max-width: 440px; }
  .mobile-logo-row { display: flex; }
}
@media (min-width: 821px) { .mobile-logo-row { display: none; } }
@media (max-width: 440px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .auth-panel-right { padding: 48px 18px; }
}

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