/* TalentMatch - navy / white / teal design system */
:root {
  --navy-900: #0b1f3a;
  --navy-800: #102a4c;
  --navy-700: #173a66;
  --teal-500: #14b8a6;
  --teal-600: #0f9d8e;
  --teal-50: #e6f7f5;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e5eaf1;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 58, .06), 0 1px 3px rgba(15, 31, 58, .04);
  --shadow-md: 0 8px 24px rgba(15, 31, 58, .10);
  --sidebar-w: 264px;
  --bs-primary: var(--navy-800);
  --bs-primary-rgb: 16, 42, 76;
  --bs-link-color: var(--navy-700);
  --bs-link-hover-color: var(--teal-600);
  --bs-body-color: var(--ink);
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.text-teal { color: var(--teal-500) !important; }
.tiny { font-size: .75rem; }
.clamp-1, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-3 { -webkit-line-clamp: 3; }
:focus-visible { outline: 3px solid rgba(20, 184, 166, .45); outline-offset: 2px; }

/* Buttons & forms */
.btn { border-radius: 10px; font-weight: 500; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { --bs-btn-bg: var(--navy-800); --bs-btn-border-color: var(--navy-800); --bs-btn-hover-bg: var(--navy-900);
  --bs-btn-hover-border-color: var(--navy-900); --bs-btn-active-bg: var(--navy-900); --bs-btn-disabled-bg: var(--navy-700); }
.btn-outline-primary { --bs-btn-color: var(--navy-800); --bs-btn-border-color: #c3cfe0; --bs-btn-hover-bg: var(--navy-800);
  --bs-btn-hover-border-color: var(--navy-800); --bs-btn-active-bg: var(--navy-800); }
.btn-teal { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.btn-teal:hover, .btn-teal:focus { background: var(--teal-600); border-color: var(--teal-600); color: #fff; box-shadow: 0 6px 16px rgba(20, 184, 166, .3); }
.btn-teal:disabled { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.form-control, .form-select { border-radius: 10px; border-color: #d5deea; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--teal-500); box-shadow: 0 0 0 .22rem rgba(20, 184, 166, .18); }
.input-group-text { background: #f8fafc; border-color: #d5deea; color: var(--muted); }
.form-label { font-weight: 500; font-size: .875rem; }

/* Layout shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--navy-900); color: #cbd5e1;
  flex-direction: column; padding: 1.25rem 1rem; z-index: 1030; overflow-y: auto; }
.sidebar.sidebar-mobile { display: flex; z-index: 1045; max-width: 86vw; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; margin-bottom: 1.5rem; }
.brand:hover { color: #fff; }
.brand-dark { margin-bottom: 0; }
.nav-section { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; color: #7f93b0; margin: 1rem .75rem .5rem; }
.nav-item-link { display: flex; align-items: center; gap: .75rem; padding: .62rem .85rem; margin-bottom: .2rem; border-radius: 10px;
  color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: .93rem; transition: background .15s ease, color .15s ease, padding-left .15s ease; }
.nav-item-link i { font-size: 1.1rem; }
.nav-item-link:hover { background: rgba(255, 255, 255, .07); color: #fff; padding-left: 1rem; }
.nav-item-link.active { background: rgba(20, 184, 166, .16); color: #fff; box-shadow: inset 3px 0 0 var(--teal-500); }
.nav-item-link.active i { color: var(--teal-500); }
.sidebar-note { margin-top: auto; font-size: .75rem; color: #8ea2bf; background: rgba(255, 255, 255, .05); border-radius: 10px; padding: .75rem; display: flex; gap: .5rem; }
.sidebar-note i { color: var(--teal-500); }
.main { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .main { margin-left: var(--sidebar-w); } }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 600; font-size: 1.05rem; }
.content { padding: 1.5rem 1.25rem 3rem; max-width: 1320px; width: 100%; margin: 0 auto; }
@media (min-width: 992px) { .content { padding: 1.75rem 2rem 3rem; } }
.user-chip { display: flex; align-items: center; gap: .6rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .75rem .25rem .3rem; }
.user-chip:hover { background: #f8fafc; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }

/* Cards */
.card-lite { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.sticky-lg { position: static; }
@media (min-width: 992px) { .sticky-lg { position: sticky; top: 84px; } }
.welcome-card { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; box-shadow: var(--shadow-md); }
.welcome-stats { display: flex; gap: 1.5rem; }
.welcome-stats .num { font-size: 1.6rem; font-weight: 700; line-height: 1; color: #5eead4; }
.welcome-stats .lbl { font-size: .75rem; opacity: .7; margin-top: .25rem; }
.filter-bar { padding: 1rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease; height: 100%; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .6rem; font-size: 1.1rem; }
.tone-navy .stat-icon { background: #e8eef8; color: var(--navy-700); }
.tone-teal .stat-icon { background: var(--teal-50); color: var(--teal-600); }
.tone-slate .stat-icon { background: #eef2f6; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .8rem; }
.chart-box { position: relative; height: 220px; }

/* Job cards */
.job-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.job-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c9d6e8; }
.company-badge { width: 42px; height: 42px; border-radius: 11px; background: var(--navy-800); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.job-description { white-space: pre-line; line-height: 1.7; }
.skill-chip { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; background: #eef2f7; color: #334155; }
.skill-chip.skill-hit { background: var(--teal-50); color: #0b7a6e; font-weight: 600; }

/* Tables */
.table-modern { --bs-table-bg: transparent; }
.table-modern thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafc;
  border-bottom: 1px solid var(--line); padding: .8rem 1rem; font-weight: 600; white-space: nowrap; }
.table-modern td { padding: .85rem 1rem; border-color: var(--line); }
.table-modern tbody tr { transition: background .15s ease; }
.table-modern tbody tr:hover { background: #f8fbfd; }
.badge-soft { font-weight: 600; padding: .38em .7em; border-radius: 999px; }
.badge-soft-success { background: #dcf5ef; color: #0b7a6e; }
.badge-soft-info { background: #e3ecf9; color: var(--navy-700); }
.badge-soft-danger { background: #fde8e8; color: #b42318; }
.badge-soft-secondary { background: #eceff3; color: #475569; }
.status-select { min-width: 130px; padding-top: .3rem; padding-bottom: .3rem; }

/* Match score */
.score-cell { display: flex; align-items: center; gap: .6rem; }
.score-track { flex: 1; height: 8px; border-radius: 999px; background: #e8edf3; overflow: hidden; min-width: 70px; }
.score-fill { height: 100%; border-radius: 999px; animation: grow .9s ease-out both; transform-origin: left; }
.band-high { background: var(--teal-500); }
.band-mid { background: #f0a53a; }
.band-low { background: #94a3b8; }
.band-text-high { color: var(--teal-600); }
.band-text-mid { color: #b8741a; }
.band-text-low { color: var(--muted); }
.score-value { font-weight: 700; font-size: .88rem; min-width: 3.3rem; text-align: right; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.disclaimer { display: flex; gap: .75rem; background: #eef6fb; border: 1px solid #d3e6f4; color: #25496b; border-radius: 12px; padding: .8rem 1rem; font-size: .82rem; }
.disclaimer i { color: var(--navy-700); margin-top: .15rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--teal-50); color: var(--teal-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }

/* Drop zone */
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; border: 2px dashed #c3cfe0; border-radius: 12px;
  padding: 1.5rem 1rem; cursor: pointer; color: var(--navy-700); transition: border-color .2s ease, background .2s ease; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--teal-500); background: var(--teal-50); }
.drop-zone.has-file { border-style: solid; border-color: var(--teal-500); background: var(--teal-50); }

/* Activity */
.activity li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; border-radius: 10px; background: #eef2f7; color: var(--navy-700); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Toasts, overlay, progress */
.app-toast { border: 0; border-left: 4px solid; border-radius: 10px; box-shadow: var(--shadow-md); background: #fff; }
.toast-success { border-color: var(--teal-500); } .toast-success i { color: var(--teal-500); }
.toast-danger { border-color: #e5484d; } .toast-danger i { color: #e5484d; }
.toast-warning { border-color: #f0a53a; } .toast-warning i { color: #f0a53a; }
.toast-info { border-color: var(--navy-700); } .toast-info i { color: var(--navy-700); }
.loading-overlay { position: fixed; inset: 0; background: rgba(11, 31, 58, .55); backdrop-filter: blur(3px); z-index: 3000; display: flex; align-items: center; justify-content: center; }
.loading-overlay.d-none { display: none !important; }
.loading-card { background: #fff; padding: 2rem 2.5rem; border-radius: 16px; text-align: center; box-shadow: var(--shadow-md); }
.page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--teal-500); z-index: 4000; transition: width .4s ease, opacity .3s ease; }

/* Auth pages */
.auth-wrap { display: flex; min-height: 100vh; }
.auth-side { flex: 0 0 42%; background: var(--navy-900); color: #fff; padding: 2.5rem 3rem; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(circle at 85% 12%, rgba(20, 184, 166, .22), transparent 40%); }
.auth-points li { display: flex; gap: .6rem; margin-bottom: .6rem; } .auth-points i { color: var(--teal-500); }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 2rem; box-shadow: var(--shadow-md); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.role-option { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .8rem .5rem; border: 1px solid #d5deea; border-radius: 12px;
  cursor: pointer; font-size: .85rem; font-weight: 500; transition: all .15s ease; }
.role-option i { font-size: 1.3rem; color: var(--muted); }
.btn-check:checked + .role-option { border-color: var(--teal-500); background: var(--teal-50); color: #0b7a6e; box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.btn-check:checked + .role-option i { color: var(--teal-600); }
.btn-check:focus-visible + .role-option { outline: 3px solid rgba(20, 184, 166, .45); outline-offset: 2px; }
.strength { height: 5px; background: #e8edf3; border-radius: 999px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; transition: width .25s ease, background-color .25s ease; }

/* Landing */
.public-nav { background: var(--navy-900); padding: .9rem 0; }
.hero { background: var(--navy-900); color: #fff; padding: 4.5rem 0 5rem; background-image: radial-gradient(circle at 90% 0%, rgba(20, 184, 166, .22), transparent 45%); }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #5eead4; background: rgba(20, 184, 166, .12); padding: .35rem .8rem; border-radius: 999px; }
.hero-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 1.5rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.hero-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.hero-row .score-cell { width: 170px; }
.feature-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--navy-800); color: #5eead4; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1rem; }
.step-num { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; background: var(--teal-500); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.public-footer { background: var(--navy-900); color: #8ea2bf; padding: 1.5rem 0; text-align: center; }

/* Error page */
.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.error-code { font-size: 6rem; font-weight: 800; line-height: 1; color: var(--navy-800); }

/* Motion */
.fade-up { animation: fadeUp .5s ease both; }
.delay-1 { animation-delay: .1s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 575.98px) {
  .welcome-stats { width: 100%; justify-content: space-between; }
  .auth-card { padding: 1.5rem; }
  .hero { padding: 3rem 0; }
}

/* ---- v2: bookmarks, notifications, AI, recommendations ---- */
.card-actions { position: relative; z-index: 2; }
.btn-icon { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
.btn-icon:hover { color: var(--teal-600); border-color: var(--teal-500); background: var(--teal-50); }
.btn-icon.is-saved { color: var(--teal-600); background: var(--teal-50); border-color: var(--teal-500); }
.meta-pill { display: inline-flex; align-items: center; gap: .3rem; background: #f1f5f9; color: #334155; border-radius: 8px; padding: .2rem .55rem; font-size: .78rem; }
.ai-pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; color: #0b7a6e; background: var(--teal-50);
  border: 1px solid #b8ebe5; border-radius: 999px; padding: .2rem .6rem; }
.tip-banner { display: flex; align-items: center; gap: .7rem; background: #fff8e6; border: 1px solid #f6e3b0; color: #6b5316; border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1.1rem; font-size: .88rem; }
.recommend-wrap { position: relative; }
.recommend-wrap .job-card { border-color: #b8ebe5; box-shadow: 0 6px 20px rgba(20, 184, 166, .12); }
.recommend-score { position: absolute; top: -10px; left: 14px; z-index: 3; background: var(--teal-500); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(20, 184, 166, .4); }

.bell { border: 1px solid var(--line); background: #fff; width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff;
  font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.notif-menu { width: 340px; max-width: 92vw; border-radius: 14px; overflow: hidden; }
.notif-item { display: flex; gap: .6rem; align-items: flex-start; width: 100%; padding: .7rem 1rem; border: 0; border-bottom: 1px solid var(--line); background: #fff;
  font-size: .85rem; color: var(--ink); transition: background .15s ease; }
.notif-item:hover { background: #f8fbfd; }
.notif-item.unread { background: #f1faf8; font-weight: 500; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .4rem; background: transparent; flex: none; }
.notif-item.unread .notif-dot { background: var(--teal-500); }
.notif-wide { padding: .95rem 1.25rem; font-size: .92rem; align-items: center; }
form:last-child > .notif-wide { border-bottom: 0; }

.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.check-result { border-left: 4px solid var(--teal-500); }
.gap-box { background: #fff8f0; border: 1px solid #f7dfc4; border-radius: 10px; padding: .7rem .8rem; }
.gap-row { display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; margin-bottom: .45rem; }
.gap-track { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: #e8edf3; overflow: hidden; }
.gap-fill { height: 100%; background: #f0a53a; border-radius: 999px; }
.signals dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .65rem; }
.signals dd { margin-bottom: 0; font-size: .9rem; }
.resume-preview { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; max-height: 320px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; font-size: .8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ai-draft-box { background: linear-gradient(180deg, #f1faf8, #fff); border: 1px dashed #9fdcd3; border-radius: 12px; padding: .8rem 1rem; }
.import-card { border-left: 4px solid var(--teal-500); }
.activity .avatar { margin-right: 0; }
