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

:root {
  --ink: #0F1C14;
  --forest: #1A4731;
  --green: #2D7A50;
  --mint: #E6F4ED;
  --gold: #C8973A;
  --gold-light: #FDF3E3;
  --white: #FFFFFF;
  --grey: #F5F6F4;
  --muted: #6B7B72;
  --border: #D8E4DC;
  --danger: #C0392B;
  --blue: #1A47A0;
  --blue-light: #E8EEFB;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(15,28,20,0.08);
  --shadow-lg: 0 8px 48px rgba(15,28,20,0.12);
}

body { font-family: 'Inter', sans-serif; background: var(--white); color: var(--ink); min-height: 100vh; }
h1,h2,h3,h4,h5 { font-family: 'Sora', sans-serif; }
a { text-decoration: none; color: inherit; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 14px; padding: 12px 24px; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--green); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d9a440; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: #1538a0; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--ink); }
.btn-full { width: 100%; }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: 'Inter', sans-serif; color: var(--ink); background: var(--white); outline: none; transition: border 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green); }
.form-group textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.answer-textarea { width: 100%; min-height: 220px; padding: 16px; font-size: 15px; font-family: 'Inter', sans-serif; line-height: 1.7; border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--white); outline: none; resize: vertical; transition: border 0.2s; }
.answer-textarea:focus { border-color: var(--green); }
@media (max-width: 640px) { .answer-textarea { min-height: 260px; font-size: 16px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* BADGES */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.badge-green { background: var(--mint); color: var(--green); }
.badge-gold { background: var(--gold-light); color: #a0620a; border: 1px solid #eed8a8; }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-grey { background: var(--grey); color: var(--muted); }
.badge-red { background: #fdecea; color: var(--danger); }

/* NAV */
.nav { background: var(--forest); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.nav-logo { height: 40px; width: auto; object-fit: contain; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { color: rgba(255,255,255,0.7); font-size: 13px; padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.12); color: white; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; position: relative; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nav-avatar::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--forest) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') center/9px no-repeat; border: 1.5px solid white; }
.nav-type-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; }
.nav-type-seeker { background: rgba(45,122,80,0.25); color: #7dd4a8; }
.nav-type-employer { background: rgba(26,71,160,0.25); color: #8aabf0; }
.btn-nav { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); font-size: 12px; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.btn-nav:hover { background: rgba(255,255,255,0.2); color: white; }

/* PAGE */
.page { min-height: calc(100vh - 68px); }
.page-grey { background: var(--grey); }
.container { max-width: 720px; width: 100%; margin: 0 auto; padding: 32px 24px; }
.container-wide { max-width: 1000px; width: 100%; margin: 0 auto; padding: 32px 24px; }
.page-header { margin-bottom: 28px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.page-subtitle { font-size: 14px; color: var(--muted); line-height: 1.6; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

/* STATS */
.stats-grid { display: grid; gap: 12px; margin-bottom: 28px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 16px; text-align: center; border: 1px solid var(--border); }
.stat-card .s-num { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; color: var(--green); }
.stat-card .s-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* LIST ITEMS */
.list-stack { display: flex; flex-direction: column; gap: 10px; }
.list-item { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 16px 18px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.list-item:hover { box-shadow: var(--shadow); border-color: var(--green); }
.list-item-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.list-item-meta { font-size: 12px; color: var(--muted); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .e-icon { font-size: 42px; margin-bottom: 14px; }
.empty-state h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

/* TABS */
.tabs { display: flex; gap: 4px; background: var(--grey); border-radius: var(--radius); padding: 4px; margin-bottom: 24px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all 0.2s; border: none; background: transparent; font-family: 'Inter', sans-serif; }
.tab.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,28,20,0.7); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal { background: var(--white); border-radius: var(--radius-lg); max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,0.3); }
.modal-header { padding: 24px 24px 0; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-body { padding: 0 24px 20px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; }
.btn-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-success { background: var(--mint); color: var(--green); }
.alert-info { background: var(--blue-light); color: var(--blue); }
.alert-gold { background: var(--gold-light); color: #a0620a; }

/* LOADING */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.spinner-lg { width: 52px; height: 52px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--grey); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; text-align: center; }
.loading-screen p { color: var(--muted); font-size: 14px; }

/* TIPS */
.tip-card { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; border-left: 4px solid; }
.tip-card-green { background: var(--mint); border-color: var(--green); }
.tip-card-gold { background: var(--gold-light); border-color: var(--gold); }
.tip-card-blue { background: var(--blue-light); border-color: var(--blue); }
.tip-card-red { background: #fdecea; border-color: var(--danger); }
.tip-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.tip-card p, .tip-card li { font-size: 13px; line-height: 1.7; color: #3a4a40; }
.tip-card ul { padding-left: 16px; }
.tip-card li { margin-bottom: 4px; }

/* JOB CARDS */
.job-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: all 0.2s; }
.job-card:hover { box-shadow: var(--shadow); border-color: var(--green); }
.job-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.job-card-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.job-card-company { font-size: 13px; color: var(--muted); }
.job-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.job-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-grid { display: grid; gap: 14px; }

/* INTERVIEW ROOM */
.interview-nav { background: var(--forest); color: var(--white); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.q-counter { background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.timer-bar { height: 3px; background: rgba(255,255,255,0.1); }
.timer-fill { height: 100%; background: var(--gold); transition: width 1s linear; }
.timer-fill.warning { background: #e87461; }
.q-block { background: var(--mint); border-left: 4px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px; }
.q-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.q-text { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.q-type-tag { font-size: 11px; background: rgba(45,122,80,0.12); color: var(--green); padding: 3px 10px; border-radius: 100px; font-weight: 500; }
.cv-tag { font-size: 11px; background: rgba(200,151,58,0.15); color: var(--gold); border: 1px solid rgba(200,151,58,0.3); padding: 3px 10px; border-radius: 100px; font-weight: 600; margin-left: 6px; }
.answer-box { background: var(--grey); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #3a4a40; line-height: 1.65; font-style: italic; }

/* CERTIFICATE */
.cert-overlay { position: fixed; inset: 0; background: rgba(15,28,20,0.85); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.cert-overlay.show { display: flex; }
.cert-box { background: var(--white); border-radius: 20px; max-width: 640px; width: 100%; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.4); }
.cert-header { background: linear-gradient(135deg, #1A4731, #2D7A50); padding: 40px; text-align: center; position: relative; }
.cert-header::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(200,151,58,0.4); border-radius: 14px; pointer-events: none; }
.cert-body { padding: 28px 32px; text-align: center; }
.cert-name { font-size: 32px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.cert-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.cert-detail { background: var(--grey); border-radius: 10px; padding: 12px; }
.cert-detail .d-val { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; color: var(--green); }
.cert-detail .d-lbl { font-size: 10px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.cert-footer { border-top: 1px solid var(--border); padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ASSESSMENT LINK */
.assess-link-box { background: var(--mint); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-family: monospace; font-size: 13px; color: var(--forest); word-break: break-all; margin-bottom: 10px; }

/* QUESTION BUILDER */
.qb-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.qb-item:hover { border-color: var(--green); }
.qb-handle { color: var(--muted); cursor: grab; font-size: 16px; }
.qb-text { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.5; }
.qb-check { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }

/* SCORING RUBRIC */
.rubric-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rubric-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.rubric-score-input { width: 48px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; text-align: center; outline: none; }
.rubric-score-input:focus { border-color: var(--green); }

/* RESPONSIVE */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-3, .stats-4 { grid-template-columns: 1fr 1fr; }
  .container, .container-wide { padding: 20px 16px; }
  .nav-links { display: none; }
  .cert-body { padding: 20px 16px; }
  .cert-footer { flex-direction: column; }
  .cert-details-grid { grid-template-columns: 1fr 1fr; }
  .q-text { font-size: 16px; }
  .rubric-row { grid-template-columns: 1fr; }
}

/* LUCIDE ICONS */
[data-lucide] { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; stroke-width: 2; }
.icon-lg [data-lucide] { width: 28px; height: 28px; stroke-width: 1.75; color: var(--forest, #1A4731); margin-right: 0; vertical-align: 0; }
.icon-xl [data-lucide] { width: 40px; height: 40px; stroke-width: 1.5; margin-right: 0; vertical-align: 0; }
.icon-sm [data-lucide] { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; stroke-width: 2; }
.icon-status [data-lucide] { width: 20px; height: 20px; stroke-width: 2; margin-right: 0; }
.icon-status.done [data-lucide] { color: var(--green, #2D7A50); }
.icon-status.pending [data-lucide] { color: var(--muted, #9AA39C); }
