/* Clean Functional Minimalist — light-only by design. White-first: white surfaces on a soft slate canvas, charcoal
   text, TopCV-style green (#00B14F) as the only brand color — fills for primary buttons, selected state, logo,
   progress; a darker green (#00873D, 4.6:1 on white) for any green text, link, icon or focus ring.
   Layout: sticky top navbar (logo · links · actions) → centered content column ≤1280px. 8px grid. */
:root {
  color-scheme: light;
  --bg: #F8FAFC; --surface: #FFFFFF; --surface-2: #F8FAFC; --sunken: #F1F5F9;
  --line: #E2E8F0; --line-strong: #CBD5E1;
  --fg: #0F172A; --fg-2: #475569; --fg-3: #64748B;
  --accent: #00B14F; --accent-hover: #009643; --accent-soft: #EAF8F0; --accent-fg: #FFFFFF; --accent-text: #00873D;
  --gold: #B45309; --gold-soft: #FFFBEB;
  /* Verification tiers: Basic slate → Experience blue → Expert amber. Only for verify badges and avatar rings. */
  --v1: #64748B; --v1-text: #475569; --v1-soft: #F8FAFC; --v1-line: #CBD5E1;
  --v2: #0284C7; --v2-text: #0369A1; --v2-soft: #F0F9FF; --v2-line: #BAE6FD;
  --v3: #D97706; --v3-text: #B45309; --v3-soft: #FFFBEB; --v3-line: #FDE68A;
  --info: #0369A1; --info-soft: #F0F9FF;
  --ok: #00873D; --ok-soft: #EAF8F0; /* status "đạt" shares the TopCV green family (same as --accent-text) */
  --warn: #C2410C; --warn-soft: #FFF7ED;
  --danger: #DC2626; --danger-soft: #FEF2F2;
  --av-s: 32%; --av-l: 93%; --av-fg: 30%;
  --shadow-c: rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, .12);
  --scrim: rgba(15, 23, 42, .32);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --proto-h: 60px; /* height of the sticky top navbar; sticky panels offset by it */
  --ease: cubic-bezier(.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { color: var(--fg); }
button, [data-go], [data-chip], [data-pick], [data-tab], summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; font-variant-numeric: tabular-nums; }

/* ---------- Top navbar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--surface); }
.topnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.topnav-in { max-width: 1280px; margin: 0 auto; min-height: var(--proto-h); display: flex; align-items: center; gap: 24px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--fg); font-weight: 600; font-size: 15px; letter-spacing: -.02em; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: -.02em; flex: none; }
.brand .app { font-weight: 500; color: var(--fg-3); padding-left: 10px; border-left: 1px solid var(--line); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; justify-content: safe center; overflow-x: auto; scrollbar-width: none; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r); border: 0; background: transparent; color: var(--fg-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.nav-link:hover { background: var(--sunken); color: var(--fg); }
.nav-link.is-active { color: var(--accent-text); background: var(--accent-soft); }
.nav-link .cnt { font-size: 11.5px; font-weight: 600; color: var(--fg-2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; line-height: 18px; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); border: 0; background: transparent; color: var(--fg-2); position: relative; flex: none; transition: background .15s var(--ease); }
.icon-btn:hover { background: var(--sunken); color: var(--fg); }
.icon-btn .pip { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }

/* Profile switcher (candidate app) */
.menu { position: relative; }
.menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--fg); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { border-color: var(--line-strong); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 280px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 45; }
.menu-label { font-size: 12px; color: var(--fg-3); padding: 8px 10px 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r); background: transparent; text-align: left; }
.menu-item:hover { background: var(--sunken); }
.menu-item .t { display: block; font-size: 13.5px; font-weight: 500; color: var(--fg); }
.menu-item .s { display: block; font-size: 12px; color: var(--fg-3); }
.menu-item .ic { color: var(--accent-text); margin-left: auto; }

/* ---------- Content ---------- */
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding-block: 32px 64px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg-3); margin-bottom: 16px; border: 0; background: none; padding: 0; }
.back-link:hover { color: var(--fg); }

/* ---------- Hub ---------- */
.hub { padding-block: 48px 80px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hub-in { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }

@media (max-width: 900px) {
  .topnav-in { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; }
  .brand .app { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-links { order: 3; flex: 0 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .nav-actions .hide-sm { display: none; }
  .content { padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .input, .select, .textarea, .input-group input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
