/* ==========================================================================
   AdmitFlow AI — application shell (demo app.admitflowai.in replica)
   Dark "night blue" design system matching the reference product.
   ========================================================================== */

.af-body {
  background: #070d1e;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.af-body.af-no-scroll { overflow: hidden; }
.af-app { display: flex; flex-direction: column; min-height: 100vh; }
.af-icon { width: 16px; height: 16px; flex-shrink: 0; }
.af-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #94a3b8; cursor: pointer;
  padding: 4px; border-radius: 6px; transition: all .15s;
}
.af-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.af-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.af-text-right { text-align: right; }
.af-strong { font-weight: 700; }
.af-text-cyan { color: #22d3ee; }
.af-text-emerald { color: #34d399; }
.af-text-amber { color: #fbbf24; }
.af-text-rose { color: #fb7185; }
.af-text-slate { color: #94a3b8; }
.af-code { font-size: 10px; color: #64748b; font-family: ui-monospace, monospace; }

/* ---------- Navbar ---------- */
.af-navbar {
  position: sticky; top: 0; z-index: 40; width: 100%;
  background: rgba(8,17,38,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid #1c294a;
}
.af-navbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.af-brand { display: flex; align-items: center; gap: 12px; }
.af-brand-logo { width: 40px; height: 40px; object-fit: contain; }
.af-brand-row { display: flex; align-items: center; gap: 8px; }
.af-brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: #fff; }
.af-brand-ai { color: #22d3ee; font-weight: 800; }
.af-brand-badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 600; background: rgba(8,47,73,.8);
  color: #67e8f9; border: 1px solid rgba(8,145,178,.5);
}
.af-brand-tag { font-size: 11px; color: #94a3b8; display: none; }
@media (min-width: 768px) { .af-brand-tag { display: block; } }
.af-navbar-center { display: none; align-items: center; gap: 8px; }
@media (min-width: 1024px) { .af-navbar-center { display: flex; } }
.af-data-badge {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
}
.af-data-real { background: rgba(6,78,59,.5); border: 1px solid rgba(5,150,105,.4); color: #6ee7b7; }
.af-data-demo { background: rgba(69,26,3,.4); border: 1px solid rgba(146,64,14,.5); color: #fcd34d; }
.af-pulse-dot { width: 8px; height: 8px; border-radius: 999px; background: #34d399; animation: af-pulse 2s infinite; }
@keyframes af-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.af-navbar-right { display: flex; align-items: center; gap: 12px; }

/* ---------- Dropdowns ---------- */
.af-dropdown { position: relative; }
.af-dropdown-right .af-dropdown-menu,
.af-dropdown-menu.af-dropdown-right { right: 0; left: auto; }
.af-role-panel { display: flex; flex-direction: column; gap: 16px; }
.af-role-panel[hidden] { display: none; }
.af-role-btn, .af-profile-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 8px; background: #0e1b38; border: 1px solid rgba(8,145,178,.5);
  color: #e2e8f0; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background .15s;
}
.af-role-btn:hover, .af-profile-btn:hover { background: #14264e; }
.af-profile-btn { padding: 6px; }
.af-role-label { color: #94a3b8; font-size: 11px; }
.af-role-value { font-weight: 600; color: #67e8f9; }
.af-avatar {
  width: 28px; height: 28px; border-radius: 999px; background: #0e7490;
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.af-avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.af-profile-name { font-size: 12px; font-weight: 500; color: #e2e8f0; }
@media (max-width: 767px) { .af-profile-name { display: none; } }
.af-dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  width: 288px; border-radius: 12px; background: #0d1833;
  border: 1px solid #20335e; box-shadow: 0 20px 40px rgba(0,0,0,.5);
  padding: 8px; z-index: 50;
}
.af-dropdown-menu.is-open { display: block; }
.af-dropdown-head {
  padding: 6px 8px; font-size: 11px; font-weight: 600; color: #94a3b8;
  border-bottom: 1px solid #1b2b4f; margin-bottom: 4px;
}
.af-role-option {
  width: 100%; text-align: left; padding: 8px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; transition: background .15s;
}
.af-role-option:hover { background: #152449; }
.af-role-option-name { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.af-role-option-desc { font-size: 11px; color: #94a3b8; line-height: 1.3; }
.af-profile-head { padding: 8px 12px; border-bottom: 1px solid #1b2b4f; margin-bottom: 4px; }
.af-profile-title { font-size: 12px; font-weight: 600; color: #fff; }
.af-profile-email { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-profile-org { font-size: 10px; color: #22d3ee; font-weight: 500; margin-top: 4px; }
.af-menu-item {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 8px; background: transparent; border: none; color: #cbd5e1;
  font-size: 12px; cursor: pointer; transition: background .15s; text-align: left;
}
.af-menu-item:hover { background: #152449; }
.af-menu-amber { color: #fcd34d; }
.af-menu-rose { color: #fb7185; }
.af-menu-rose:hover { background: rgba(80,7,36,.4); }
.af-menu-divider { margin: 4px 0; border-top: 1px solid #1b2b4f; }

/* ---------- Tab bar ---------- */
.af-tabsbar { width: 100%; background: #0a1228; border-bottom: 1px solid #1c2a4d; position: sticky; top: 64px; z-index: 30; }
.af-tabsbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.af-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.af-tabs::-webkit-scrollbar { display: none; }
.af-tab {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: #94a3b8; background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: all .15s;
}
.af-tab:hover { color: #e2e8f0; background: #111d3d; }
.af-tab.is-active {
  background: rgba(8,47,73,.8); color: #67e8f9;
  border-color: rgba(8,145,178,.6); box-shadow: 0 1px 2px rgba(8,145,178,.3);
}
.af-tab-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid; font-weight: 700;
}
.af-badge-rose { background: rgba(76,5,25,.8); color: #fda4af; border-color: rgba(159,18,57,.5); }
.af-badge-amber { background: rgba(69,26,3,.8); color: #fcd34d; border-color: rgba(146,64,14,.5); }
.af-badge-cyan { background: rgba(8,47,73,.8); color: #67e8f9; border-color: rgba(8,145,178,.5); }
.af-leak-ticker {
  display: none; align-items: center; gap: 8px; padding-left: 16px;
  border-left: 1px solid #1d2a4a; font-size: 12px;
}
@media (min-width: 1024px) { .af-leak-ticker { display: flex; } }
.af-leak-label { display: flex; align-items: center; gap: 4px; color: #fb7185; font-weight: 600; }
.af-leak-value {
  font-family: ui-monospace, monospace; font-weight: 700; color: #fda4af;
  background: rgba(76,5,25,.5); padding: 2px 8px; border-radius: 4px;
  border: 1px solid rgba(159,18,57,.4);
}

/* ---------- Toast ---------- */
.af-toast {
  background: rgba(8,47,73,.9); border-bottom: 1px solid rgba(8,145,178,.6);
  color: #67e8f9; font-size: 12px; padding: 8px 16px; text-align: center; font-weight: 500;
}

/* ---------- Main ---------- */
.af-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
.af-panel { display: none; }
.af-panel.is-active { display: block; }
.af-panel-head { margin-bottom: 20px; }
.af-panel-title { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.af-panel-sub { font-size: 13px; color: #94a3b8; margin-top: 4px; }

/* ---------- Banner / perspective ---------- */
.af-banner {
  padding: 16px; border-radius: 12px; background: #09132b;
  border: 1px solid #1b2d58; display: flex; flex-direction: column;
  justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
@media (min-width: 768px) { .af-banner { flex-direction: row; align-items: center; } }
.af-banner-eyebrow { display: flex; align-items: center; gap: 8px; }
.af-banner-eyebrow span { font-size: 11px; font-weight: 700; color: #67e8f9; text-transform: uppercase; letter-spacing: .08em; }
.af-banner-title { font-size: 16px; font-weight: 800; color: #fff; margin-top: 2px; }
.af-banner-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; max-width: 48rem; line-height: 1.6; }
.af-banner-cta { flex-shrink: 0; }
.af-perspective {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: 16px; border-radius: 12px; background: #0e1936;
  border: 1px solid #1d2d54; margin-bottom: 24px;
}
@media (min-width: 640px) { .af-perspective { flex-direction: row; align-items: center; } }
.af-perspective-head { display: flex; align-items: center; gap: 8px; }
.af-perspective-label { font-size: 12px; font-weight: 600; color: #22d3ee; text-transform: uppercase; letter-spacing: .08em; }
.af-perspective-note { font-size: 12px; color: #94a3b8; }
.af-perspective-text { font-size: 14px; color: #cbd5e1; margin-top: 2px; }
.af-perspective-current { color: #fff; }
.af-perspective-options { display: flex; flex-wrap: wrap; gap: 6px; }
.af-persp-btn {
  padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 8px;
  background: #152347; color: #cbd5e1; border: 1px solid #233560; cursor: pointer;
  transition: all .15s;
}
.af-persp-btn:hover { background: #1a2c59; color: #fff; }
.af-persp-btn.is-active { background: #06b6d4; color: #0f172a; font-weight: 700; box-shadow: 0 2px 8px rgba(6,182,212,.2); border-color: transparent; }

/* ---------- Query cards ---------- */
.af-query-card {
  padding: 20px; border-radius: 16px; margin-bottom: 24px;
  background: linear-gradient(90deg, #0d1b3e, #102047, #0d1b3e);
  border: 1px solid rgba(8,145,178,.4); box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.af-query-card-manager { background: linear-gradient(90deg, #0e1d45, #122454, #0e1d45); border-color: rgba(8,145,178,.5); }
.af-query-card-counselor { background: linear-gradient(90deg, #0a1e3f, #0f2854, #0a1e3f); border-color: rgba(6,182,212,.5); }
.af-query-eyebrow { display: flex; align-items: center; gap: 8px; color: #22d3ee; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.af-query-title { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.af-query-sub { font-size: 13px; color: #cbd5e1; margin-top: 4px; max-width: 48rem; line-height: 1.6; }

/* ---------- KPI grid ---------- */
.af-kpi-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .af-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .af-kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.af-kpi {
  padding: 16px; border-radius: 12px; background: #0f1b3a;
  border: 1px solid #1f315c; display: flex; flex-direction: column;
  justify-content: space-between; gap: 12px;
}
.af-kpi-rose { background: #1b1528; border-color: rgba(159,18,57,.4); }
.af-kpi-amber { background: #161f30; border-color: rgba(146,64,14,.4); }
.af-kpi-label { font-size: 12px; font-weight: 500; color: #94a3b8; }
.af-kpi-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.af-kpi-value-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.af-kpi-value { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.af-kpi-sub { font-size: 12px; color: #94a3b8; }
.af-kpi-note { font-size: 11px; color: #94a3b8; margin-top: 8px; }
.af-kpi-foot { margin-top: 12px; }
.af-kpi-meta { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.af-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; border: 1px solid transparent;
}
.af-chip-rose { background: rgba(76,5,25,.8); color: #fda4af; border-color: rgba(159,18,57,.4); }
.af-chip-amber { background: rgba(69,26,3,.8); color: #fcd34d; border-color: rgba(146,64,14,.4); }
.af-chip-emerald { background: rgba(6,78,59,.8); color: #6ee7b7; border-color: rgba(5,150,105,.4); }
.af-chip-cyan { background: rgba(8,47,73,.8); color: #67e8f9; border-color: rgba(8,145,178,.4); }
.af-chip-slate { background: #1e293b; color: #cbd5e1; }
.af-progress { width: 100%; height: 8px; border-radius: 999px; background: #1e293b; overflow: hidden; }
.af-progress-sm { height: 8px; width: 80px; }
.af-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #06b6d4, #34d399); }
.af-fill-rose { background: #f43f5e; }
.af-fill-amber { background: #f59e0b; }
.af-fill-emerald { background: #10b981; }

/* ---------- Executive brief ---------- */
.af-brief {
  position: relative; overflow: hidden; padding: 20px; border-radius: 12px;
  background: #0c162f; border: 1px solid rgba(8,145,178,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.3); margin-bottom: 24px;
}
.af-brief-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.af-brief-icon { padding: 6px; border-radius: 8px; background: rgba(8,47,73,.8); color: #22d3ee; border: 1px solid rgba(8,145,178,.5); }
.af-brief-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .04em; }
.af-brief-sub { font-size: 11px; color: #67e8f9; }
.af-brief-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 12px; }
@media (min-width: 768px) { .af-brief-grid { grid-template-columns: repeat(2, 1fr); } }
.af-brief-card { padding: 14px; border-radius: 8px; background: #111f42; border: 1px solid #1c2e5a; }
.af-brief-card-cyan { border-color: rgba(6,182,212,.4); }
.af-brief-card-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.af-brief-card-text { font-size: 12px; color: #e2e8f0; line-height: 1.6; }

/* ---------- Two column / cards ---------- */
.af-two-col { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
@media (min-width: 1024px) { .af-two-col { grid-template-columns: repeat(2, 1fr); } }
.af-card { padding: 16px; border-radius: 12px; background: #0f1b3a; border: 1px solid #1f315c; margin-bottom: 20px; }
.af-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.af-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #cbd5e1; display: flex; align-items: center; gap: 8px; }
.af-card-amount { font-size: 12px; font-family: ui-monospace, monospace; font-weight: 700; }
.af-card-note { font-size: 11px; color: #94a3b8; }
.af-stack { display: flex; flex-direction: column; gap: 12px; }
.af-stack-item { padding: 12px; border-radius: 8px; background: #14234a; border: 1px solid #203463; }
.af-stack-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.af-stack-name { color: #e2e8f0; }
.af-stack-amount { font-family: ui-monospace, monospace; }
.af-stack-desc { font-size: 11px; color: #94a3b8; margin-top: 4px; line-height: 1.5; }
.af-source-list { display: flex; flex-direction: column; }
.af-source-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #1e293b; font-size: 12px; }
.af-source-row:last-child { border-bottom: none; }
.af-source-name { font-weight: 600; color: #fff; }
.af-source-count { color: #94a3b8; font-size: 11px; margin-left: 8px; }
.af-source-right { display: flex; align-items: center; gap: 16px; }
.af-source-revenue { color: #cbd5e1; font-family: ui-monospace, monospace; }

/* ---------- Manager plan ---------- */
.af-plan-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .af-plan-grid { grid-template-columns: repeat(2, 1fr); } }
.af-plan-card {
  padding: 16px; border-radius: 12px; background: #122147;
  border: 1px solid #213567; display: flex; flex-direction: column;
  justify-content: space-between; gap: 12px; transition: border-color .15s;
}
.af-plan-card:hover { border-color: rgba(6,182,212,.5); }
.af-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.af-plan-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; background: rgba(8,47,73,.8); color: #67e8f9; border: 1px solid rgba(8,145,178,.6); }
.af-plan-risk { font-size: 12px; font-family: ui-monospace, monospace; font-weight: 700; color: #fb7185; }
.af-plan-title { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.4; }
.af-plan-impact { font-size: 12px; color: #cbd5e1; margin-top: 6px; line-height: 1.6; }
.af-plan-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid #1e305d; }
.af-plan-action { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; font-weight: 600; color: #67e8f9; line-height: 1.5; }
.af-plan-meta { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; margin-top: 8px; }

/* ---------- Tables ---------- */
.af-table-wrap { overflow-x: auto; }
.af-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.af-table th {
  padding: 8px 12px; border-bottom: 1px solid #1e293b; color: #94a3b8;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.af-table td { padding: 10px 12px; border-bottom: 1px solid rgba(30,41,59,.5); color: #cbd5e1; vertical-align: middle; }
.af-table tbody tr { transition: background .15s; }
.af-table tbody tr:hover { background: #132247; }
.af-counselor-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.af-risk-cell { display: flex; align-items: center; gap: 8px; }
.af-table-foot { font-size: 11px; color: #64748b; margin-top: 10px; }

/* ---------- Filters ---------- */
.af-filters { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.af-search {
  flex: 1; min-width: 200px; max-width: 320px; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; background: #0e1b38;
  border: 1px solid #233560; color: #94a3b8;
}
.af-search input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 13px; }
.af-select, .af-input, .af-textarea {
  flex: 0 0 auto; min-width: 140px; max-width: 180px;
  padding: 8px 12px; border-radius: 8px; background: #0e1b38;
  border: 1px solid #233560; color: #e2e8f0; font-size: 12px; outline: none;
  font-family: inherit; transition: border-color .15s;
}
.af-select:focus, .af-input:focus, .af-textarea:focus { border-color: rgba(6,182,212,.6); }
.af-select option { background: #0d1833; }
.af-textarea { width: 100%; resize: vertical; }
.af-file { font-size: 12px; color: #94a3b8; }
.af-file::file-selector-button {
  padding: 6px 12px; border-radius: 6px; background: #152347; color: #cbd5e1;
  border: 1px solid #233560; font-size: 12px; cursor: pointer; margin-right: 10px;
}

/* ---------- Lead table tags ---------- */
.af-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px;
  font-weight: 700; background: #1e293b; color: #cbd5e1; margin: 1px 2px;
  white-space: nowrap;
}
.af-tag-stage { background: rgba(8,47,73,.8); color: #67e8f9; border: 1px solid rgba(8,145,178,.4); }
.af-tag-intent-high { background: rgba(76,5,25,.8); color: #fda4af; border: 1px solid rgba(159,18,57,.4); }
.af-tag-intent-medium { background: rgba(69,26,3,.8); color: #fcd34d; border: 1px solid rgba(146,64,14,.4); }
.af-tag-intent-low { background: #1e293b; color: #94a3b8; }
.af-tag-risk-high { background: rgba(76,5,25,.8); color: #fda4af; }
.af-tag-risk-medium { background: rgba(69,26,3,.8); color: #fcd34d; }
.af-tag-risk-low { background: rgba(6,78,59,.8); color: #6ee7b7; }
.af-tag-fup-overdue { background: rgba(76,5,25,.8); color: #fda4af; border: 1px solid rgba(159,18,57,.4); }
.af-tag-fup-due-today, .af-tag-fup-due_today, .af-tag-fup-due { background: rgba(69,26,3,.8); color: #fcd34d; }
.af-tag-fup-upcoming { background: rgba(8,47,73,.8); color: #67e8f9; }
.af-tag-fup-neglected { background: rgba(76,5,25,.8); color: #fda4af; }
.af-tag-fup-healthy { background: rgba(6,78,59,.8); color: #6ee7b7; }
.af-tag-fup-none { background: rgba(30,41,59,.8); color: #94a3b8; }
.af-cell-action { max-width: 260px; font-size: 11px; color: #94a3b8; }
.af-student { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: none; cursor: pointer; padding: 0; }
.af-student-name { font-weight: 700; color: #fff; font-size: 12px; }
.af-student-name:hover { color: #67e8f9; }
.af-student-email { font-size: 11px; color: #64748b; }
.af-row { cursor: default; }

/* ---------- Action queue ---------- */
.af-queue { display: flex; flex-direction: column; gap: 12px; }
.af-queue-item {
  display: flex; gap: 16px; padding: 16px; border-radius: 12px;
  background: #0e1b3d; border: 1px solid #1f3261; transition: border-color .15s;
}
.af-queue-item:hover { border-color: rgba(6,182,212,.5); }
.af-queue-rank {
  width: 28px; height: 28px; border-radius: 8px; background: rgba(8,47,73,.8);
  color: #67e8f9; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.af-queue-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.af-queue-name { background: none; border: none; font-weight: 700; color: #fff; font-size: 14px; cursor: pointer; padding: 0; text-align: left; }
.af-queue-name:hover { color: #67e8f9; }
.af-queue-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.af-queue-reason { font-size: 12px; color: #94a3b8; }
.af-queue-do { padding: 10px; border-radius: 8px; background: #14244e; border: 1px solid rgba(8,145,178,.4); }
.af-queue-do-label { display: block; font-size: 10px; font-weight: 700; color: #67e8f9; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.af-queue-do p { font-size: 12px; color: #e2e8f0; margin: 0; line-height: 1.5; }
.af-queue-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.af-queue-value { font-size: 16px; font-weight: 800; color: #fff; font-family: ui-monospace, monospace; }
.af-queue-priority { font-size: 10px; font-weight: 800; color: #fcd34d; letter-spacing: .04em; }
.af-queue-when { font-size: 10px; color: #64748b; }
.af-empty { padding: 40px; text-align: center; color: #64748b; font-size: 13px; border: 1px dashed #233560; border-radius: 12px; }

/* ---------- Counselor lead cards ---------- */
.af-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.af-section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #67e8f9; }
.af-lead-card {
  display: flex; flex-direction: column; gap: 16px; padding: 16px;
  border-radius: 12px; background: #0e1b3d; border: 1px solid #1f3261;
  margin-bottom: 12px; transition: border-color .15s;
}
@media (min-width: 768px) { .af-lead-card { flex-direction: row; justify-content: space-between; } }
.af-lead-card:hover { border-color: rgba(6,182,212,.5); }
.af-lead-card-main { max-width: 42rem; display: flex; flex-direction: column; gap: 8px; }
.af-lead-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.af-lead-name { background: none; border: none; font-weight: 700; color: #fff; font-size: 14px; cursor: pointer; padding: 0; }
.af-lead-name:hover { color: #67e8f9; }
.af-nba { padding: 12px; border-radius: 8px; background: #14244e; border: 1px solid rgba(8,145,178,.4); }
.af-nba-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: #67e8f9; margin-bottom: 6px; flex-wrap: wrap; }
.af-nba-title { display: flex; align-items: center; gap: 6px; }
.af-nba-when { font-size: 11px; color: #fcd34d; font-weight: 400; }
.af-nba-why { font-size: 12px; color: #e2e8f0; margin: 4px 0; line-height: 1.5; }
.af-script {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 8px; border-radius: 6px; background: #091229;
  border: 1px solid #1d2d52; margin-top: 8px;
}
.af-script-text { font-size: 12px; color: #cbd5e1; font-style: italic; line-height: 1.5; margin: 0; }
.af-lead-card-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border-top: 1px solid #1e293b; padding-top: 12px; flex-shrink: 0; }
@media (min-width: 768px) { .af-lead-card-side { align-items: flex-end; border-top: none; padding-top: 0; } }
.af-lead-status { text-align: right; }
.af-lead-status-label { display: block; font-size: 10px; color: #64748b; }
.af-lead-status-value { font-size: 12px; font-weight: 600; color: #22d3ee; }
.af-lead-actions { display: flex; gap: 8px; }

/* ---------- Recovery ---------- */
.af-recovery { padding: 16px; border-radius: 12px; background: #171f30; border: 1px solid rgba(146,64,14,.4); margin-top: 24px; }
.af-recovery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.af-recovery-title { display: flex; align-items: center; gap: 8px; }
.af-recovery-title h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fcd34d; margin: 0; }
.af-recovery-count { font-size: 12px; color: rgba(252,211,77,.8); font-family: ui-monospace, monospace; }
.af-recovery-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .af-recovery-grid { grid-template-columns: repeat(3, 1fr); } }
.af-recovery-card {
  padding: 12px; border-radius: 8px; background: #0e1628;
  border: 1px solid rgba(146,64,14,.4); cursor: pointer; text-align: left;
  transition: border-color .15s; color: inherit; font-family: inherit;
}
.af-recovery-card:hover { border-color: rgba(245,158,11,.5); }
.af-recovery-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.af-recovery-name { font-weight: 700; color: #fff; font-size: 12px; }
.af-recovery-reason { font-size: 11px; color: #cbd5e1; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.af-recovery-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #94a3b8; margin-top: 8px; padding-top: 8px; border-top: 1px solid #1e293b; }

/* ---------- Super admin ---------- */
.af-admin { padding: 24px; border-radius: 12px; background: #0e1938; border: 1px solid rgba(139,92,246,.4); }
.af-admin-head { margin-bottom: 16px; }
.af-admin-eyebrow { display: flex; align-items: center; gap: 8px; color: #c4b5fd; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.af-admin-title { font-size: 20px; font-weight: 800; color: #fff; margin-top: 4px; }
.af-admin-sub { font-size: 12px; color: #cbd5e1; margin-top: 4px; max-width: 40rem; }
.af-admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding-top: 8px; }
@media (min-width: 640px) { .af-admin-grid { grid-template-columns: repeat(3, 1fr); } }
.af-admin-card { padding: 12px; border-radius: 8px; background: #142247; border: 1px solid #233566; }
.af-admin-value { font-size: 14px; font-weight: 700; color: #fff; margin-top: 4px; }
.af-admin-meta { display: block; font-size: 11px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.af-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; font-family: inherit;
}
.af-btn-sm { padding: 4px 10px; font-size: 11px; }
.af-btn-primary {
  background: linear-gradient(90deg, #0891b2, #2563eb); color: #fff;
  box-shadow: 0 1px 2px rgba(8,145,178,.3);
}
.af-btn-primary:hover { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.af-btn-cyan { background: #122248; border-color: rgba(8,145,178,.5); color: #67e8f9; }
.af-btn-cyan:hover { background: #182c5d; }
.af-btn-slate { background: #1e293b; color: #e2e8f0; }
.af-btn-slate:hover { background: #334155; }
.af-btn-ghost { background: transparent; color: #94a3b8; border-color: #233560; }
.af-btn-ghost:hover { color: #e2e8f0; background: #152449; }
.af-btn-amber { background: rgba(69,26,3,.6); border-color: rgba(146,64,14,.5); color: #fcd34d; }
.af-btn-amber:hover { background: rgba(69,26,3,.9); }
.af-btn-rose { background: rgba(76,5,25,.6); border-color: rgba(159,18,57,.5); color: #fda4af; }
.af-btn-rose:hover { background: rgba(76,5,25,.9); }

/* ---------- Imports ---------- */
.af-import-notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: 10px; background: rgba(69,26,3,.25);
  border: 1px solid rgba(146,64,14,.4); color: #fcd34d;
  font-size: 12px; line-height: 1.6; margin-bottom: 20px;
}
.af-import-form { display: flex; flex-direction: column; gap: 14px; }
.af-form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .af-form-grid { grid-template-columns: repeat(2, 1fr); } }
.af-field { display: flex; flex-direction: column; gap: 6px; }
.af-field-label { font-size: 11px; font-weight: 600; color: #94a3b8; }
.af-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.af-import-result { margin-top: 14px; padding: 12px; border-radius: 8px; background: #091229; border: 1px solid #1d2d52; font-size: 12px; line-height: 1.6; }

/* ---------- Team ---------- */
.af-team-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
@media (min-width: 640px) { .af-team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .af-team-grid { grid-template-columns: repeat(3, 1fr); } }
.af-member-card { padding: 16px; border-radius: 12px; background: #0f1b3a; border: 1px solid #1f315c; }
.af-member-head { display: flex; align-items: center; gap: 12px; }
.af-member-head > div { flex: 1; min-width: 0; }
.af-member-name { font-size: 14px; font-weight: 700; color: #fff; }
.af-member-role { font-size: 11px; color: #67e8f9; }
.af-member-email { font-size: 11px; color: #64748b; margin: 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-member-stats { display: flex; gap: 8px; }
.af-member-stat {
  flex: 1; padding: 8px; border-radius: 8px; background: #0b1526;
  border: 1px solid #1a2a4a; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.af-member-stat-value { font-size: 14px; font-weight: 800; color: #fff; font-family: ui-monospace, monospace; }
.af-member-stat-label { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Settings ---------- */
.af-settings-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.af-settings-grid .af-card { align-self: start; }

/* ---------- Modals ---------- */
.af-modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(2,6,23,.75);
  backdrop-filter: blur(4px); display: flex; align-items: center;
  justify-content: center; padding: 16px; overflow-y: auto;
}
.af-modal {
  width: 100%; max-width: 480px; background: #0d1833;
  border: 1px solid #20335e; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6); max-height: 90vh;
  display: flex; flex-direction: column;
}
.af-modal-lg { max-width: 720px; }
.af-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 16px 20px; border-bottom: 1px solid #1b2b4f;
}
.af-modal-title { font-size: 18px; font-weight: 800; color: #fff; }
.af-modal-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.af-modal-body { padding: 20px; overflow-y: auto; }

/* ---------- Lead dossier ---------- */
.af-dossier-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.af-dossier-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .af-dossier-grid { grid-template-columns: repeat(2, 1fr); } }
.af-dossier-card { padding: 12px; border-radius: 8px; background: #111f42; border: 1px solid #1c2e5a; }
.af-dossier-card h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #67e8f9; margin-bottom: 8px; }
.af-dossier-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; }
.af-dossier-card dt { color: #64748b; }
.af-dossier-card dd { color: #e2e8f0; font-weight: 500; margin: 0; word-break: break-word; }
.af-dossier-section { margin-bottom: 16px; }
.af-dossier-section h3 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.af-notes { font-size: 12px; color: #cbd5e1; line-height: 1.6; padding: 12px; border-radius: 8px; background: #111f42; border: 1px solid #1c2e5a; }

/* ---------- Auth modal ---------- */
.af-auth-error { font-size: 12px; color: #fb7185; padding: 8px 12px; border-radius: 6px; background: rgba(76,5,25,.4); border: 1px solid rgba(159,18,57,.4); }
.af-auth-hint { margin-top: 16px; padding-top: 12px; border-top: 1px solid #1b2b4f; }
.af-auth-hint-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.af-auth-hint-text { font-size: 11px; color: #94a3b8; margin-top: 4px; line-height: 1.6; }

/* ---------- Footer ---------- */
.af-footer { border-top: 1px solid #152244; background: #070e20; padding: 24px 0; margin-top: auto; }
.af-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 16px; font-size: 12px; color: #64748b;
}
@media (min-width: 768px) { .af-footer-inner { flex-direction: row; } }
.af-footer-brand { font-weight: 700; color: #cbd5e1; }
.af-footer-sub { font-size: 11px; color: #475569; margin-top: 2px; }
.af-footer-right { text-align: center; font-size: 11px; color: #64748b; }
@media (min-width: 768px) { .af-footer-right { text-align: right; } }

/* ---------- Lead dossier (modal) ---------- */
.af-text-white { color: #fff; }
.af-dossier-contact { font-size: 12px; color: #cbd5e1; margin: -8px 0 16px; }
.af-icon-lg { width: 20px; height: 20px; }
.af-icon-xl { width: 32px; height: 32px; }
.af-spin { animation: af-spin 1s linear infinite; }
@keyframes af-spin { to { transform: rotate(360deg); } }
.af-overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .af-overview-grid { grid-template-columns: repeat(4, 1fr); } }
.af-overview-card { padding: 12px; border-radius: 8px; background: #0f1d40; border: 1px solid #1f3363; }
.af-overview-label { display: block; font-size: 10px; color: #94a3b8; margin-bottom: 4px; }
.af-overview-value { display: block; font-size: 14px; font-weight: 700; }
.af-recovery-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px;
  border-radius: 12px; background: rgba(69,26,3,.25);
  border: 1px solid rgba(146,64,14,.5); margin-bottom: 16px;
}
.af-recovery-banner-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.af-recovery-banner-head h4 { font-size: 12px; font-weight: 700; color: #fcd34d; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.af-recovery-banner-text { font-size: 12px; color: #e2e8f0; margin: 6px 0 0; line-height: 1.6; }
.af-nba-directive { padding: 20px; border-radius: 12px; background: #0c1838; border: 1px solid rgba(8,145,178,.4); margin-bottom: 16px; }
.af-nba-directive-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.af-nba-directive-head h3 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.af-nba-whatwhy { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) { .af-nba-whatwhy { grid-template-columns: repeat(2, 1fr); } }
.af-nba-whatwhy > div { padding: 12px; border-radius: 8px; background: #111f42; border: 1px solid #1e305e; }
.af-nba-whatwhy p { font-size: 12px; color: #e2e8f0; line-height: 1.6; margin: 4px 0 0; }
.af-nba-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.af-nba-when { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #94a3b8; margin-bottom: 12px; }
.af-script-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.af-script-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; }
.af-copy-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: #22d3ee; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.af-copy-btn:hover { color: #67e8f9; }
.af-lifecycle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid #1a2d59; margin-top: 4px; }
.af-lifecycle-label { font-size: 12px; color: #94a3b8; }
.af-lifecycle-btn { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #1e293b; color: #cbd5e1; border: none; cursor: pointer; transition: all .15s; }
.af-lifecycle-btn:hover { background: #334155; }
.af-lifecycle-btn.is-active { background: #06b6d4; color: #0f172a; font-weight: 700; }
.af-outcome-form { margin-top: 12px; padding: 16px; border-radius: 12px; background: #091228; border: 1px solid rgba(8,145,178,.6); }
.af-outcome-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.af-outcome-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) { .af-outcome-grid { grid-template-columns: repeat(2, 1fr); } }
.af-ai-card { padding: 16px; border-radius: 12px; background: #0e1a3b; border: 1px solid rgba(8,145,178,.4); margin-bottom: 16px; }
.af-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.af-ai-head h4 { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.af-ai-result { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.af-ai-block { padding: 12px; border-radius: 8px; background: #122147; border: 1px solid #1e3263; }
.af-ai-block p { font-size: 12px; color: #e2e8f0; line-height: 1.6; margin: 4px 0 0; }
.af-ai-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .af-ai-grid { grid-template-columns: repeat(2, 1fr); } }
.af-ai-points { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: #e2e8f0; line-height: 1.7; }
.af-audit { padding: 16px; border-radius: 12px; background: #0a1228; border: 1px solid #182647; }
.af-audit-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.af-audit-list { display: flex; flex-direction: column; gap: 8px; }
.af-audit-empty { font-size: 12px; color: #475569; font-style: italic; }
.af-audit-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 8px; background: #0e1836; border: 1px solid #1a2c59; font-size: 12px; }
.af-audit-action { font-weight: 600; color: #fff; }
.af-audit-notes { font-size: 11px; color: #94a3b8; margin: 2px 0 0; }
.af-audit-meta { text-align: right; font-size: 11px; color: #64748b; display: flex; flex-direction: column; gap: 2px; }
.af-btn-emerald { background: linear-gradient(90deg, #059669, #10b981); color: #fff; }
.af-btn-emerald:hover { background: linear-gradient(90deg, #10b981, #34d399); }

/* ---------- Auth modal ---------- */
.af-modal-auth { max-width: 448px; }
.af-auth-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #1c2e59; }
.af-auth-brand { display: flex; align-items: center; gap: 12px; }
.af-brand-logo-sm { width: 36px; height: 36px; }
.af-auth-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; line-height: 1.2; }
.af-auth-sub { font-size: 11px; color: #94a3b8; margin: 2px 0 0; }
.af-auth-error { font-size: 12px; color: #fb7185; padding: 10px 12px; border-radius: 8px; background: rgba(76,5,25,.5); border: 1px solid rgba(159,18,57,.4); margin-bottom: 12px; }
.af-auth-switch { padding-top: 12px; border-top: 1px solid #1c2e59; display: flex; justify-content: space-between; }
.af-link { background: none; border: none; color: #22d3ee; font-size: 12px; cursor: pointer; padding: 0; }
.af-link:hover { text-decoration: underline; }
.af-auth-demo { padding-top: 12px; border-top: 1px solid #1c2e59; margin-top: 12px; }
.af-auth-demo-label { display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.af-auth-demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.af-demo-login { padding: 6px 8px; border-radius: 6px; background: #111e40; border: 1px solid #213460; font-size: 11px; font-weight: 500; cursor: pointer; text-align: left; transition: background .15s; }
.af-demo-login:hover { background: #162752; }
.af-demo-amber { color: #fcd34d; }
.af-demo-cyan { color: #67e8f9; }
.af-demo-emerald { color: #6ee7b7; }
.af-demo-violet { color: #c4b5fd; }
.af-btn-auth { width: 100%; justify-content: center; padding: 10px; border-radius: 8px; background: #06b6d4; color: #0f172a; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(6,182,212,.2); margin-top: 8px; }
.af-btn-auth:hover { background: #22d3ee; }
.af-field-inline { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- Imports ---------- */
.af-import-banner { padding: 16px; border-radius: 12px; background: #0c1633; border: 1px solid #1e305e; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
@media (min-width: 768px) { .af-import-banner { flex-direction: row; align-items: center; } }
.af-import-banner .af-banner-title { font-size: 15px; }
.af-dropzone { padding: 32px; border-radius: 16px; background: #0a1228; border: 2px dashed #1f315e; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color .15s; margin-bottom: 20px; }
.af-dropzone.is-dragging { border-color: rgba(6,182,212,.6); }
.af-dropzone-icon { width: 64px; height: 64px; border-radius: 16px; background: rgba(8,47,73,.8); border: 1px solid rgba(8,145,178,.6); display: flex; align-items: center; justify-content: center; color: #22d3ee; }
.af-dropzone-title { font-size: 15px; font-weight: 700; color: #fff; }
.af-dropzone-sub { font-size: 12px; color: #94a3b8; }
.af-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.af-dropzone-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-top: 16px; margin-top: 8px; border-top: 1px solid #182647; font-size: 12px; }
.af-feature { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.af-mapping-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .af-mapping-grid { grid-template-columns: repeat(2, 1fr); } }
.af-map-field { padding: 12px; border-radius: 8px; background: #111f42; border: 1px solid #1e305e; }
.af-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.af-map-label { font-size: 12px; font-weight: 700; color: #fff; text-transform: capitalize; }
.af-map-aliases { font-size: 10px; color: #64748b; }
.af-mapping-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: 16px; border-top: 1px solid #1c2e59; }
.af-validation-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Auth modal - Updated to match React reference ---------- */
.af-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.af-modal-backdrop[hidden] { display: none; }

.af-modal-auth {
  max-width: 448px;
  width: 100%;
  border-radius: 16px;
  background: #0b142c;
  border: 1px solid #1e305e;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
  animation: af-fade-in 100ms ease-out;
}
@keyframes af-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.af-auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #1c2e59;
}
.af-auth-brand { display: flex; align-items: center; gap: 12px; }
.af-brand-logo-sm { width: 36px; height: 36px; object-fit: contain; }
.af-auth-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; line-height: 1.2; }
.af-brand-ai { color: #22d3ee; font-weight: 800; font-style: normal; }
.af-auth-sub { font-size: 11px; color: #94a3b8; margin: 2px 0 0; }

.af-auth-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.af-auth-close:hover { color: #fff; background: rgba(255,255,255,.05); }

.af-modal-body { padding: 20px; }

.af-auth-error {
  display: none;
  font-size: 12px;
  color: #fb7185;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(127,29,29,.5);
  border: 1px solid rgba(159,18,57,.4);
  margin-bottom: 12px;
}
.af-auth-error:not([hidden]) { display: block; }

#authForm { display: flex; flex-direction: column; gap: 12px; }

.af-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.af-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}
.af-input, .af-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111e40;
  border: 1px solid #213460;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.af-input::placeholder { color: #64748b; }
.af-input:focus, .af-select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,.15);
}

#signupFields[hidden] { display: none; }
#signupFields:not([hidden]) { display: flex; flex-direction: column; gap: 12px; }

.af-btn-auth {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #06b6d4;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(6,182,212,.2);
  border: none;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.af-btn-auth:hover { background: #22d3ee; }
.af-btn-auth:disabled { opacity: .6; cursor: not-allowed; }

.af-auth-switch {
  padding-top: 12px;
  border-top: 1px solid #1c2e59;
  margin-top: 8px;
}
.af-link {
  background: none;
  border: none;
  color: #22d3ee;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.af-link:hover { text-decoration: underline; }

.af-auth-demo {
  padding-top: 12px;
  border-top: 1px solid #1c2e59;
  margin-top: 12px;
}
.af-auth-demo-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.af-auth-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.af-demo-login {
  padding: 10px 12px;
  border-radius: 8px;
  background: #111e40;
  border: 1px solid #213460;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.af-demo-login:hover {
  background: #162752;
  border-color: #2a4a8a;
}
.af-demo-amber { color: #fcd34d; }
.af-demo-cyan { color: #67e8f9; }
.af-demo-emerald { color: #6ee7b7; }
.af-demo-violet { color: #c4b5fd; }

/* Ensure backdrop hides properly */
.af-no-scroll { overflow: hidden; }

/* ---------- Standalone Auth Page Layout ---------- */
.af-auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: #070d1e;
}

.af-auth-card {
  width: 100%;
  max-width: 420px;
  background: #0b142c;
  border: 1px solid #1e305e;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.af-auth-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.af-auth-welcome {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  margin: 0;
}

.af-auth-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0;
}

.af-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.af-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

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

.af-input-group .af-input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border-radius: 8px;
  background: #111e40;
  border: 1px solid #213460;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.af-input-group .af-input::placeholder { color: #64748b; }
.af-input-group .af-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,.15);
}

.af-input-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}

.af-input-toggle:hover {
  color: #22d3ee;
  background: rgba(8,145,178,.12);
}

.af-field-error {
  font-size: 12px;
  color: #fb7185;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(76,5,25,.4);
  border: 1px solid rgba(159,18,57,.4);
}

.af-auth-error {
  font-size: 12px;
  color: #fb7185;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(127,29,29,.5);
  border: 1px solid rgba(159,18,57,.4);
}

.af-auth-error:not([hidden]) { display: block; }

.af-auth-switch {
  padding-top: 8px;
  border-top: 1px solid #1c2e59;
  margin-top: 4px;
  text-align: center;
}

.af-auth-forgot {
  text-align: center;
  margin-top: -4px;
}

.af-link {
  background: none;
  border: none;
  color: #22d3ee;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.af-link:hover { text-decoration: underline; }

.af-btn-auth {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #06b6d4;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(6,182,212,.2);
  border: none;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.af-btn-auth:hover { background: #22d3ee; }
.af-btn-auth:disabled { opacity: .6; cursor: not-allowed; }

.af-auth-demo {
  padding-top: 12px;
  border-top: 1px solid #1c2e59;
  margin-top: 4px;
}

.af-auth-demo-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 480px) {
  .af-auth-card { padding: 24px 18px; }
  .af-auth-page { padding: 20px 12px; }
}
