/* ════════════════════════════════════════════════════════
   Cedar Financial — Compliance Calls Notes Generator
   ════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  --bg:          #04040e;
  --card-bg:     rgba(255,255,255,0.042);
  --card-border: rgba(255,255,255,0.08);
  --card-hover:  rgba(255,255,255,0.06);

  --accent:      #6366f1;
  --accent-2:    #8b5cf6;
  --accent-glow: rgba(99,102,241,0.35);
  --cyan:        #06b6d4;
  --success:     #10b981;
  --warning:     #f59e0b;
  --error:       #ef4444;

  --text:        #f1f5f9;
  --text-sub:    #94a3b8;
  --text-muted:  #475569;

  --radius:      16px;
  --radius-sm:   10px;
  --transition:  0.28s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

/* Links never fall back to browser default blue/underline styling */
a { text-decoration: none; color: inherit; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Ambient background ─────────────────────────────────── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -150px; left: -150px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: 30%; right: -100px;
  animation: drift2 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: -80px; left: 30%;
  animation: drift3 16s ease-in-out infinite alternate;
}
.orb-4 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #1e3a5f, transparent 70%);
  bottom: 20%; left: -80px;
  animation: drift1 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift1 {
  from { transform: translate(0, 0)   scale(1); }
  to   { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes drift2 {
  from { transform: translate(0, 0)   scale(1.05); }
  to   { transform: translate(-80px, 60px) scale(0.95); }
}
@keyframes drift3 {
  from { transform: translate(0, 0)   scale(1); }
  to   { transform: translate(50px, -70px) scale(1.08); }
}

/* ── Page layout ────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  padding: 26px 0 0;
  border-bottom: 1px solid var(--card-border);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.logo-mark {
  width: 58%;
  height: 58%;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}

/* Legacy text logo (kept for backwards compatibility) */
.logo-letter { color: #fff; }
.logo-letter.accent { color: #60a5fa; }

.brand { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 15px; color: var(--text); }
.brand-tag  { font-size: 11px; color: var(--text-sub); letter-spacing: .4px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.operator-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  max-width: 180px;
}
.operator-chip svg { color: #a5b4fc; flex-shrink: 0; }
.operator-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}
.logout-btn:hover {
  background: rgba(239,68,68,0.16);
  color: #f87171;
  transform: translateY(-1px);
}

/* ── Header tabs (module switcher) ──────────────────────── */
/* Centered segmented control — the active module is a solid filled
   button, the inactive one sits muted on the track, so both read
   clearly as buttons. */
.header-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto 20px;
  padding: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 11px;
}

.header-tab {
  padding: 9px 26px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .1px;
  transition: all var(--transition);
}

.header-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.header-tab.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

/* ── Date range presets ─────────────────────────────────── */
.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.preset-btn {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.preset-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.preset-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Date range fields ──────────────────────────────────── */
/* Sized to their content — a date needs ~176px, not a full column. */
.date-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 176px));
  gap: 14px;
  margin-bottom: 16px;
}

.date-range-row .field {
  margin-bottom: 0;
}

.date-input {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.date-input:hover { border-color: rgba(255,255,255,0.16); }

.date-input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.date-input::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
  transition: opacity var(--transition);
}

.date-input:hover::-webkit-calendar-picker-indicator,
.date-input:focus::-webkit-calendar-picker-indicator { opacity: 0.9; }

.range-summary {
  font-size: 12.5px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}

.range-summary strong {
  color: var(--text);
  font-weight: 600;
}

.date-range-error {
  font-size: 12.5px;
  color: #fca5a5;
  margin: 0 0 20px;
}

@media (max-width: 480px) {
  .date-range-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Page title ─────────────────────────────────────────── */
.page-title-row {
  padding: 38px 0 26px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 7px;
}

.page-title-sub {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 4px 6px rgba(0,0,0,0.1),
    0 20px 40px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow:
    0 4px 6px rgba(0,0,0,0.1),
    0 28px 50px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.card-title { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.card-sub   { font-size: 13px; color: var(--text-sub); line-height: 1.5; }

/* ── Info banner ────────────────────────────────────────── */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #c7d2fe;
  margin-bottom: 22px;
  line-height: 1.5;
}

.info-icon { flex-shrink: 0; margin-top: 1px; color: #818cf8; }
.info-banner strong { color: #a5b4fc; }

/* ── Drop zone ──────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed rgba(99,102,241,0.3);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(99,102,241,0.03);
  position: relative;
  margin-bottom: 18px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1), inset 0 0 40px rgba(99,102,241,0.05);
}

.drop-icon-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: #818cf8;
  margin-bottom: 16px;
  transition: all var(--transition);
}

.drop-zone:hover .drop-icon-ring {
  transform: translateY(-4px);
}

.drop-primary { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.drop-secondary { font-size: 13px; color: var(--text-sub); margin-bottom: 14px; }
.drop-types { font-size: 11px; color: var(--text-muted); margin-top: 14px; letter-spacing: .4px; }

.browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}

.browse-btn:hover {
  background: #5457e5;
}

/* ── File preview ───────────────────────────────────────── */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.file-preview-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(16,185,129,0.2);
  color: #34d399;
  border-radius: 5px;
  letter-spacing: .5px;
  flex-shrink: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.file-size {
  font-size: 11px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  color: #f87171;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.clear-btn:hover {
  background: rgba(239,68,68,0.2);
  color: var(--error);
}

/* ── Process button ─────────────────────────────────────── */
.process-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: .3px;
}

.process-btn:hover:not(:disabled) {
  background: #5457e5;
}

.process-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Steps row ──────────────────────────────────────────── */
.steps-row {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 0 6px;
  border-radius: 2px;
  transition: background var(--transition);
  margin-bottom: 20px;
}

.step-connector.done  { background: var(--success); }
.step-connector.active { background: var(--accent);  }

.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  transition: all var(--transition);
}

.step-circle.active {
  background: rgba(99,102,241,0.2);
  border-color: var(--accent);
  color: #a5b4fc;
  box-shadow: 0 0 0 6px rgba(99,102,241,0.1), 0 0 20px rgba(99,102,241,0.3);
  animation: step-pulse 1.8s ease-in-out infinite;
}

.step-circle.done {
  background: rgba(16,185,129,0.15);
  border-color: var(--success);
  color: #34d399;
}

@keyframes step-pulse {
  0%,100% { box-shadow: 0 0 0 6px rgba(99,102,241,0.1), 0 0 20px rgba(99,102,241,0.3); }
  50%      { box-shadow: 0 0 0 10px rgba(99,102,241,0.05), 0 0 30px rgba(99,102,241,0.4); }
}

.step-icon { flex-shrink: 0; }

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  letter-spacing: .3px;
  transition: color var(--transition);
}

.step-item.active .step-label { color: #a5b4fc; }
.step-item.done   .step-label { color: #34d399; }

/* ── Progress bar ───────────────────────────────────────── */
.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.pct-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99,102,241,0.12);
  padding: 2px 8px;
  border-radius: 5px;
}

/* ── Terminal / log console ─────────────────────────────── */
.terminal {
  background: #020209;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.t-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.t-red    { background: #ef4444; }
.t-yellow { background: #f59e0b; }
.t-green  { background: #10b981; }

.t-title {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .5px;
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 16px 18px;
  height: 180px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,0.3) transparent;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 2px; }

.t-line { color: #7dd3fc; display: block; }
.t-line.info    { color: #7dd3fc; }
.t-line.success { color: #34d399; }
.t-line.warn    { color: #fbbf24; }
.t-line.error   { color: #f87171; }

.t-prompt { color: #6366f1; margin-right: 8px; user-select: none; }

/* ── Results card ───────────────────────────────────────── */
.results-card {
  text-align: center;
  padding: 40px 32px;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px; height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.2), rgba(16,185,129,0.05));
  border: 2px solid rgba(16,185,129,0.4);
  color: #34d399;
  margin-bottom: 18px;
  box-shadow: 0 0 40px rgba(16,185,129,0.2);
  animation: success-glow 2s ease-in-out infinite alternate;
}

@keyframes success-glow {
  from { box-shadow: 0 0 20px rgba(16,185,129,0.2); }
  to   { box-shadow: 0 0 50px rgba(16,185,129,0.4); }
}

.results-title { font-size: 22px; font-weight: 700; margin-bottom: 28px; }

.metrics-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
}

.metric-box { text-align: center; }
.metric-val {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric-val.accent-val {
  color: var(--accent);
}
.metric-lbl { font-size: 12px; color: var(--text-sub); margin-top: 4px; font-weight: 500; }
.metric-sep { width: 1px; height: 50px; background: rgba(255,255,255,0.1); }

.email-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 999px;
  font-size: 13px;
  color: #6ee7b7;
  margin-bottom: 28px;
}
.email-confirm strong { color: #34d399; }

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}

.dl-btn:hover {
  background: #5457e5;
}

.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition);
}

.reset-btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text);
}

/* ── Error card ─────────────────────────────────────────── */
.error-card { text-align: center; padding: 40px 32px; }

.error-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(245,158,11,0.1);
  border: 2px solid rgba(245,158,11,0.3);
  color: #fbbf24;
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(245,158,11,0.15);
  animation: sorry-pulse 3s ease-in-out infinite alternate;
}

@keyframes sorry-pulse {
  from { box-shadow: 0 0 20px rgba(245,158,11,0.15); }
  to   { box-shadow: 0 0 50px rgba(245,158,11,0.3);  }
}

.error-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: #fca5a5; }

.error-apology {
  font-size: 15px;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto 12px;
  line-height: 1.75;
}

.error-suggestion {
  font-size: 13px;
  color: var(--text-sub);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.7;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 24px 0 0;
}

/* ── Entrance animations ─────────────────────────────────── */
.card {
  animation: card-in 0.5s cubic-bezier(.4,0,.2,1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .card { padding: 20px; }
  .page-title { font-size: 21px; }
  .metrics-row { gap: 18px; padding: 18px; }
  .metric-val { font-size: 28px; }
  .steps-row { overflow-x: auto; padding-bottom: 4px; }
  .header-bar { flex-wrap: wrap; gap: 10px 12px; }
  .header-tab { padding: 9px 18px; font-size: 13px; }
  .page-title-row { padding: 30px 0 22px; }
  .operator-chip { max-width: 120px; }
  .logout-label { display: none; }
  .login-card { padding: 30px 22px 26px; }
}

/* ════════════════════════════════════════════════════════
   Login page
   ════════════════════════════════════════════════════════ */
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: card-in 0.5s cubic-bezier(.4,0,.2,1) both;
}

.login-logo {
  width: 52px; height: 52px;
  font-size: 20px;
}

.login-card {
  width: 100%;
  padding: 38px 34px 30px;
}

.login-head {
  text-align: center;
  margin-bottom: 26px;
}

.login-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 16px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
  margin-bottom: 18px;
}

.login-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13.5px;
  color: var(--text-sub);
}

/* Error banner */
.login-error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #fca5a5;
  margin-bottom: 20px;
  animation: card-in 0.3s ease both;
}
.login-error svg { flex-shrink: 0; color: #f87171; }

/* Fields */
.field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
  letter-spacing: .3px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.input-wrap input {
  width: 100%;
  padding: 14px 15px 14px 46px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14.5px;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}

.input-wrap input::placeholder { color: var(--text-muted); }

.input-wrap input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

.input-wrap input:focus + .toggle-pw,
.input-wrap input:focus ~ .input-icon { color: #a5b4fc; }

.input-wrap:focus-within .input-icon { color: #a5b4fc; }

.toggle-pw {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.toggle-pw:hover { color: var(--text-sub); background: rgba(255,255,255,0.05); }

/* Submit */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  padding: 15px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: .3px;
}

.login-btn:hover:not(:disabled) {
  background: #5457e5;
}

.login-btn:disabled { opacity: 0.75; cursor: not-allowed; }

.login-btn-label { display: inline-flex; align-items: center; gap: 9px; }

.login-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: .3px;
}
.login-secure svg { color: var(--success); }

.login-footer { padding: 4px 0 0; }

/* Shake on failed login */
.shake { animation: shake 0.45s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
