/* ── PassPoint Components ────────────────────────────────────── */

/* ─── CARDS ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title span { color: var(--cyan); }

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--cyan);
  color: #0d0f14;
  box-shadow: 0 0 20px rgba(0,212,180,0.2);
}
.btn-primary:hover {
  background: #00bba3;
  box-shadow: 0 0 28px rgba(0,212,180,0.3);
}
.btn-ghost {
  background: var(--raised);
  border: 1px solid var(--border2);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-danger {
  background: var(--red-dim);
  border: 1px solid rgba(255,94,94,0.3);
  color: var(--red);
}
.btn-danger:hover {
  background: rgba(255,94,94,0.2);
}
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-sm);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── INPUTS ─────────────────────────────────── */
.form-row { margin-bottom: 14px; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.input {
  width: 100%;
  padding: 10px 13px;
  background: var(--raised);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--cyan); }
.input::placeholder { color: var(--muted); }
.input.error { border-color: var(--red) !important; }
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 72px; }
.hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.field-error { font-size: 11px; color: var(--red); margin-top: 4px; }

/* ─── TAP SELECT BUTTONS ─────────────────────── */
.tap-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.tap-btn {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: var(--raised);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tap-btn:hover { border-color: var(--border2); color: var(--text); background: var(--faint); }
.tap-btn.sel { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

/* ─── OPTION CARDS ───────────────────────────── */
.opt-grid { display: grid; gap: 8px; }
.opt-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.opt-grid.cols2 { grid-template-columns: 1fr 1fr; }
.opt-card {
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--raised);
}
.opt-card:hover { border-color: var(--cyan); background: var(--cyan-dim); }
.opt-card.sel { border-color: var(--cyan); background: var(--cyan-dim); }
.opt-card .oi { font-size: 20px; margin-bottom: 4px; }
.opt-card .ol { font-size: 13px; font-weight: 600; color: var(--text); }
.opt-card .os { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ─── STARS ──────────────────────────────────── */
.stars { display: flex; gap: 5px; margin-top: 4px; }
.star { font-size: 22px; cursor: pointer; color: var(--faint); transition: color 0.1s, transform 0.1s; line-height: 1; }
.star:hover, .star.on { color: var(--amber); transform: scale(1.15); }

/* ─── PROGRESS BAR ───────────────────────────── */
.pbar-wrap { height: 6px; background: var(--faint); border-radius: 3px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* ─── SOURCE BADGES ──────────────────────────── */
.src-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.src-UWorld             { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.src-Archer             { background: rgba(251,146,60,0.15);  color: #f97316; }
.src-Remar\ Review     { background: rgba(167,139,250,0.15); color: #a78bfa; }
.src-Level\ Up\ RN    { background: rgba(34,197,94,0.15);   color: #22c55e; }
.src-Crush\ NCLEX      { background: rgba(239,68,68,0.15);   color: #ef4444; }
.src-Nursing\.com      { background: rgba(14,165,233,0.15);  color: #0ea5e9; }
.src-Simple\ Nursing   { background: rgba(236,72,153,0.15);  color: #ec4899; }
.src-High\ Yield\ Nursing { background: rgba(234,179,8,0.15); color: #eab308; }
.src-Bootcamp           { background: rgba(20,184,166,0.15);  color: #14b8a6; }

/* ─── CHIPS ──────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.chip-green  { background: var(--green-dim);  color: var(--green); }
.chip-amber  { background: var(--amber-dim);  color: var(--amber); }
.chip-red    { background: var(--red-dim);    color: var(--red); }
.chip-blue   { background: var(--blue-dim);   color: var(--blue); }
.chip-purple { background: var(--purple-dim); color: var(--purple); }
.chip-muted  { background: var(--faint);      color: var(--muted); }
.chip-cyan   { background: var(--cyan-dim);   color: var(--cyan); }

/* ─── TABLE ──────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--faint); }
.tbl-mono { font-family: var(--mono); }

/* ─── MODAL ──────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s ease;
}
@keyframes modalIn {
  from { transform: scale(0.96) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.modal-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.modal-close {
  background: var(--faint);
  border: none;
  border-radius: 6px;
  width: 28px; height: 28px;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); }

/* ─── TOAST ──────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow);
  white-space: nowrap;
  pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.toast-success { border-color: rgba(74,222,128,0.3); }
#toast.toast-error   { border-color: rgba(255,94,94,0.4); color: var(--red); }
#toast.toast-warning { border-color: rgba(255,181,71,0.4); color: var(--amber); }

/* ─── SKELETON / LOADING ─────────────────────── */
.skeleton {
  background: var(--faint);
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-block { height: 60px; }

/* ─── EMPTY STATE ────────────────────────────── */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* ─── DIVIDER ────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ─── GRID HELPERS ───────────────────────────── */
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* ─── KPI CARDS ──────────────────────────────── */
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.kpi:hover { border-color: var(--border2); }
.kpi-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.kpi-value { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1; }
.kpi-value.c-cyan   { color: var(--cyan); }
.kpi-value.c-green  { color: var(--green); }
.kpi-value.c-amber  { color: var(--amber); }
.kpi-value.c-red    { color: var(--red); }
.kpi-value.c-blue   { color: var(--blue); }
.kpi-value.c-purple { color: var(--purple); }
.kpi-value.c-muted  { color: var(--muted); }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }
.kpi-glow {
  position: absolute; top: -20px; right: -20px;
  width: 70px; height: 70px; border-radius: 50%;
  opacity: 0.07; pointer-events: none;
}

/* ─── HEAT MAP ───────────────────────────────── */
.heat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.hcell {
  border-radius: var(--r);
  padding: 13px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.hcell:hover { transform: translateY(-2px); }
.hcell.hcell--empty  { background: var(--faint); border: 1px dashed var(--border2); }
.hcell.hcell--empty:hover { border-color: var(--cyan); }
.hcell.hcell--strong { background: rgba(74,222,128,0.1);  border-color: rgba(74,222,128,0.2); }
.hcell.hcell--review { background: rgba(255,181,71,0.1);  border-color: rgba(255,181,71,0.2); }
.hcell.hcell--weak   { background: rgba(255,94,94,0.1);   border-color: rgba(255,94,94,0.2); }
.hcell-label { font-size: 11px; font-weight: 500; margin-bottom: 4px; }
.hcell--empty  .hcell-label { color: var(--muted); }
.hcell--strong .hcell-label { color: var(--green); }
.hcell--review .hcell-label { color: var(--amber); }
.hcell--weak   .hcell-label { color: var(--red); }
.hcell-score { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.hcell--empty  .hcell-score { color: var(--muted); font-size: 14px; }
.hcell--strong .hcell-score { color: var(--green); }
.hcell--review .hcell-score { color: var(--amber); }
.hcell--weak   .hcell-score { color: var(--red); }
.hcell-bar  { height: 3px; border-radius: 2px; margin-top: 8px; background: rgba(255,255,255,0.06); }
.hcell-fill { height: 100%; border-radius: 2px; transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1); }
.hcell--strong .hcell-fill { background: var(--green); }
.hcell--review .hcell-fill { background: var(--amber); }
.hcell--weak   .hcell-fill { background: var(--red); }
.hcell-weight { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ─── LIVE SCORE PREVIEW ─────────────────────── */
.score-live {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  margin-top: 5px;
  transition: color 0.3s;
  min-height: 22px;
}

/* ─── SOURCE ROW ─────────────────────────────── */
.source-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.source-row:last-child { border-bottom: none; }

/* ─── NGN ROW ────────────────────────────────── */
.ngn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.ngn-row:last-child { border-bottom: none; }
.ngn-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--faint);
}
.ngn-name { font-size: 13px; font-weight: 600; }
.ngn-desc { font-size: 11px; color: var(--muted); }
.ngn-score-val { font-family: var(--mono); font-size: 18px; font-weight: 500; min-width: 50px; text-align: right; }

/* ─── DOMAIN ROW ─────────────────────────────── */
.dom-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.dom-row:last-child { border-bottom: none; }
.dom-name { flex: 1; font-size: 13px; font-weight: 500; }
.dom-weight { font-size: 11px; color: var(--muted); min-width: 48px; text-align: right; }

/* ─── ERROR ROW ──────────────────────────────── */
.err-row { margin-bottom: 12px; }
.err-hd  { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.err-name { font-weight: 500; }
.err-pct  { font-family: var(--mono); }

/* ─── REPORT ─────────────────────────────────── */
.report-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.report-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
}
.verdict { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.verdict.pass       { color: var(--green); }
.verdict.borderline { color: var(--amber); }
.verdict.fail       { color: var(--red); }

/* ─── OFFLINE BANNER ─────────────────────────── */
#offline-banner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--amber);
  color: #0d0f14;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  z-index: 9999;
}
#offline-banner.show { display: block; }

/* ─── PLAN UPGRADE MODAL ─────────────────────── */
.upgrade-modal .modal { max-width: 420px; }
.plan-card {
  background: var(--raised);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.plan-price {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--cyan);
}
.plan-period { font-size: 13px; color: var(--muted); }
.plan-features { list-style: none; margin-top: 12px; }
.plan-features li { font-size: 13px; color: var(--muted); padding: 3px 0; }
.plan-features li::before { content: '✓ '; color: var(--green); }

/* ─── ANIMATION HELPERS ──────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { transform: scale(0) rotate(-10deg); }
  to   { transform: scale(1) rotate(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fade-up { animation: fadeUp 0.2s ease; }
.animate-pop { animation: pop 0.5s cubic-bezier(0.34,1.56,0.64,1); }

/* ─── HERO BANNER ────────────────────────────── */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.hero-title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.hero-title em { color: var(--cyan); font-style: normal; }
.hero-sub { font-size: 13px; color: var(--muted); max-width: 520px; }

/* ─── THEME TOGGLE ───────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: var(--raised);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--cyan); }

.heat-grid > div[style*="grid-column"] { margin-top: 4px; }
