:root{
  --bg-deep:#0b0e14; --edge:rgba(255,255,255,0.09); --card:rgba(255,255,255,0.045);
  --accent:#5eb4ff; --accent-2:#7dffb3; --op:#ffb454; --danger:#ff6b6b; --warn:#ffd166;
  --text:#eef2f6; --muted:#7a8496; --font-scale:1;
}
[data-theme="light"]{
  --bg-deep:#eef1f6; --edge:rgba(0,0,0,0.08); --card:rgba(255,255,255,0.7);
  --accent:#1a73e8; --accent-2:#0e9f6e; --text:#1a1f29; --muted:#5c6474;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; }
body{
  font-family:'Space Grotesk', 'Segoe UI', sans-serif; background:var(--bg-deep); color:var(--text);
  min-height:100vh; position:relative; font-size:calc(15px * var(--font-scale)); transition:background .3s, color .3s;
}
.mono{ font-family:'JetBrains Mono', monospace; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
input, select, textarea{ font-family:inherit; }

.aurora{ position:fixed; inset:-20%; z-index:0; filter:blur(90px) saturate(130%); opacity:.45;
  background:radial-gradient(38% 32% at 18% 22%, #1f4f7f 0%, transparent 60%), radial-gradient(35% 30% at 82% 18%, #2c1f6f 0%, transparent 60%), radial-gradient(45% 40% at 50% 85%, #1f6f52 0%, transparent 60%);
  animation:drift 20s ease-in-out infinite alternate; }
@keyframes drift{ 0%{transform:translate3d(0,0,0) scale(1);} 100%{transform:translate3d(2%,-3%,0) scale(1.08);} }
[data-theme="light"] .aurora{ opacity:.12; }

/* ===== Layout shells ===== */
.hidden{ display:none !important; }
.wrap{ position:relative; z-index:2; max-width:1280px; margin:0 auto; padding:0 16px 60px; }

/* ===== Auth screen ===== */
#authScreen{ min-height:100vh; display:flex; align-items:center; justify-content:center; position:relative; z-index:2; padding:20px; }
.auth-card{ width:420px; max-width:100%; background:linear-gradient(160deg,var(--card),rgba(255,255,255,0.01)); border:1px solid var(--edge); border-radius:24px; padding:32px; backdrop-filter:blur(18px); box-shadow:0 30px 60px -25px rgba(0,0,0,.6); }
.auth-logo{ text-align:center; font-size:28px; font-weight:800; margin-bottom:4px; }
.auth-logo span{ color:var(--accent); }
.auth-sub{ text-align:center; color:var(--muted); font-size:12.5px; margin-bottom:22px; font-family:'JetBrains Mono',monospace; }
.auth-tabs{ display:flex; gap:6px; background:rgba(0,0,0,.2); border:1px solid var(--edge); border-radius:12px; padding:4px; margin-bottom:20px; }
.auth-tabs button{ flex:1; padding:9px; border:0; border-radius:9px; background:transparent; color:var(--muted); cursor:pointer; font-size:13px; font-weight:600; }
.auth-tabs button.active{ background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#05070a; }
.role-pick{ display:flex; gap:8px; margin-bottom:14px; }
.role-pick button{ flex:1; padding:10px; border-radius:10px; border:1px solid var(--edge); background:rgba(255,255,255,.03); color:var(--muted); cursor:pointer; font-size:12.5px; }
.role-pick button.active{ border-color:var(--accent); color:var(--accent); background:rgba(94,180,255,.08); }
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12px; color:var(--muted); margin-bottom:5px; font-family:'JetBrains Mono',monospace; }
.field input, .field select, .field textarea{ width:100%; padding:11px 12px; border-radius:10px; background:rgba(0,0,0,.25); border:1px solid var(--edge); color:var(--text); font-size:14px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--accent); }
.field small{ color:var(--muted); font-size:11px; }
.btn-primary{ width:100%; padding:13px; border-radius:12px; border:0; cursor:pointer; background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#05070a; font-weight:700; font-size:14px; }
.btn-primary:hover{ filter:brightness(1.05); }
.btn-ghost{ padding:10px 16px; border-radius:10px; border:1px solid var(--edge); background:transparent; color:var(--text); cursor:pointer; font-size:13px; }
.btn-ghost:hover{ border-color:var(--accent); }
.btn-danger{ padding:8px 14px; border-radius:9px; border:1px solid rgba(255,107,107,.4); background:rgba(255,107,107,.08); color:var(--danger); cursor:pointer; font-size:12px; }
.auth-hint{ margin-top:16px; text-align:center; font-size:11px; color:var(--muted); font-family:'JetBrains Mono',monospace; line-height:1.6; }
.link-btn{ background:none; border:0; color:var(--accent); cursor:pointer; font-size:12.5px; text-decoration:underline; }

/* ===== App shell ===== */
#appScreen{ position:relative; z-index:2; }
header.topbar{ display:flex; align-items:center; justify-content:space-between; padding:16px; flex-wrap:wrap; gap:10px; max-width:1280px; margin:0 auto; }
.brand{ font-size:19px; font-weight:800; }
.brand span{ color:var(--accent); }
.role-badge{ font-family:'JetBrains Mono',monospace; font-size:10px; padding:3px 8px; border-radius:999px; background:rgba(94,180,255,.15); color:var(--accent); margin-left:8px; text-transform:uppercase; letter-spacing:.05em; }
.top-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.icon-pill{ background:var(--card); border:1px solid var(--edge); color:var(--text); font-family:'JetBrains Mono',monospace; font-size:11.5px; padding:8px 12px; border-radius:999px; cursor:pointer; display:flex; align-items:center; gap:6px; position:relative; }
.icon-pill:hover{ border-color:var(--accent); }
.notif-dot{ position:absolute; top:2px; right:2px; width:8px; height:8px; border-radius:50%; background:var(--danger); display:none; }
.notif-dot.show{ display:block; }

nav.tabs{ display:flex; gap:8px; flex-wrap:wrap; max-width:1280px; margin:0 auto; padding:0 16px 16px; }
.tab-btn{ background:var(--card); border:1px solid var(--edge); color:var(--muted); font-family:'JetBrains Mono',monospace; font-size:11.5px; padding:9px 14px; border-radius:999px; cursor:pointer; }
.tab-btn.active{ background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#05070a; font-weight:700; border-color:transparent; }

.view{ display:none; } .view.active{ display:block; }

/* ===== Cards / grids ===== */
.card{ background:linear-gradient(160deg,var(--card),rgba(255,255,255,0.01)); border:1px solid var(--edge); border-radius:20px; padding:20px; backdrop-filter:blur(16px); margin-bottom:16px; }
.card-title{ font-family:'JetBrains Mono',monospace; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); margin-bottom:14px; }
.grid2{ display:grid; grid-template-columns:1.3fr 1fr; gap:16px; align-items:start; }
.grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.grid4{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
@media (max-width:900px){ .grid2,.grid3,.grid4{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .grid2,.grid3,.grid4{ grid-template-columns:1fr; } }

.stat-box{ background:rgba(0,0,0,.25); border:1px solid var(--edge); border-radius:14px; padding:16px; }
.stat-box .num{ font-size:26px; font-weight:800; color:var(--accent); font-family:'JetBrains Mono',monospace; }
.stat-box .lbl{ font-size:11.5px; color:var(--muted); margin-top:3px; }

.row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
@media (max-width:600px){ .row2,.row3{ grid-template-columns:1fr; } }

.chip{ display:inline-flex; align-items:center; gap:5px; padding:5px 10px; border-radius:999px; background:rgba(94,180,255,.1); border:1px solid rgba(94,180,255,.25); font-size:11px; font-family:'JetBrains Mono',monospace; color:var(--accent); }
.chip.muted{ background:rgba(255,255,255,.05); border-color:var(--edge); color:var(--muted); }
.chip-row{ display:flex; flex-wrap:wrap; gap:6px; }
.tag-input-wrap{ display:flex; flex-wrap:wrap; gap:6px; padding:8px; border:1px solid var(--edge); border-radius:10px; background:rgba(0,0,0,.2); }
.tag-input-wrap input{ border:0; background:transparent; color:var(--text); outline:none; flex:1; min-width:120px; padding:4px; }
.tag-x{ cursor:pointer; margin-left:4px; }

.badge-status{ font-family:'JetBrains Mono',monospace; font-size:10.5px; padding:4px 10px; border-radius:999px; text-transform:uppercase; letter-spacing:.03em; }
.badge-status.applied{ background:rgba(94,180,255,.15); color:var(--accent); }
.badge-status.shortlisted{ background:rgba(255,209,102,.15); color:var(--warn); }
.badge-status.interview{ background:rgba(125,255,179,.15); color:var(--accent-2); }
.badge-status.selected{ background:rgba(125,255,179,.25); color:#3ddc84; }
.badge-status.rejected{ background:rgba(255,107,107,.15); color:var(--danger); }

.list-item{ background:rgba(0,0,0,.2); border:1px solid var(--edge); border-radius:14px; padding:14px; display:flex; justify-content:space-between; align-items:center; margin-bottom:9px; gap:10px; flex-wrap:wrap; }
.list-item .info{ font-size:13.5px; flex:1; min-width:200px; }
.list-item .info small{ display:block; color:var(--muted); font-size:11px; margin-top:3px; }
.list-item .actions{ display:flex; gap:6px; flex-wrap:wrap; }
.list-item button{ background:transparent; border:1px solid var(--edge); border-radius:8px; color:var(--muted); padding:6px 10px; cursor:pointer; font-size:11px; }
.list-item button:hover{ border-color:var(--accent); color:var(--accent); }
.empty-msg{ color:var(--muted); font-size:12.5px; font-family:'JetBrains Mono',monospace; padding:14px 0; text-align:center; }

.job-card{ background:rgba(0,0,0,.2); border:1px solid var(--edge); border-radius:16px; padding:16px; margin-bottom:10px; }
.job-card .jc-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.job-card h4{ font-size:15px; margin-bottom:3px; }
.job-card .company{ font-size:12px; color:var(--muted); }
.job-card .meta{ display:flex; gap:14px; margin:10px 0; font-size:11.5px; color:var(--muted); flex-wrap:wrap; font-family:'JetBrains Mono',monospace; }
.job-card .deadline{ color:var(--op); }
.job-card .actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.job-card .actions button{ padding:8px 14px; border-radius:9px; border:1px solid var(--edge); background:rgba(255,255,255,.03); color:var(--text); cursor:pointer; font-size:12px; }
.job-card .actions button.primary{ background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#05070a; border:0; font-weight:700; }
.match-badge{ font-family:'JetBrains Mono',monospace; font-size:11px; padding:4px 9px; border-radius:999px; background:rgba(125,255,179,.15); color:var(--accent-2); font-weight:700; }

/* ===== progress ring / bars ===== */
.progress-ring-wrap{ display:flex; align-items:center; gap:14px; }
.bars{ display:flex; align-items:flex-end; gap:6px; height:80px; margin-top:6px; }
.bars .bar{ flex:1; background:linear-gradient(180deg,var(--accent),var(--accent-2)); border-radius:4px 4px 0 0; min-height:3px; }
.bars-lbls{ display:flex; gap:6px; margin-top:4px; }
.bars-lbls span{ flex:1; text-align:center; font-size:9px; color:var(--muted); font-family:'JetBrains Mono',monospace; }
.progress-bar-track{ width:100%; height:8px; border-radius:99px; background:rgba(255,255,255,.08); overflow:hidden; }
.progress-bar-fill{ height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:99px; transition:width .4s ease; }

/* ===== timeline ===== */
.timeline{ position:relative; padding-left:22px; }
.timeline::before{ content:''; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:var(--edge); }
.timeline-item{ position:relative; margin-bottom:14px; }
.timeline-item::before{ content:''; position:absolute; left:-22px; top:3px; width:10px; height:10px; border-radius:50%; background:var(--accent); border:2px solid var(--bg-deep); }
.timeline-item .t-status{ font-weight:700; font-size:13px; }
.timeline-item .t-date{ font-size:11px; color:var(--muted); font-family:'JetBrains Mono',monospace; }

/* ===== sub tabs ===== */
.sub-tabs{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.sub-tab{ font-family:'JetBrains Mono',monospace; font-size:11px; padding:7px 13px; border-radius:9px; background:rgba(255,255,255,.03); border:1px solid var(--edge); color:var(--muted); cursor:pointer; }
.sub-tab.active{ background:var(--accent); color:#05070a; border-color:transparent; font-weight:700; }

/* ===== resume preview ===== */
.resume-preview{ background:#fff; color:#1a1a1a; border-radius:12px; padding:30px; font-family:'Georgia',serif; max-width:700px; margin:0 auto; }
.resume-preview h1{ font-size:26px; margin-bottom:2px; }
.resume-preview .r-contact{ font-size:12px; color:#555; margin-bottom:16px; }
.resume-preview h2{ font-size:14px; text-transform:uppercase; letter-spacing:.06em; border-bottom:2px solid #333; padding-bottom:4px; margin:16px 0 8px; color:#222; }
.resume-preview .r-entry{ margin-bottom:10px; font-size:13px; line-height:1.5; }
.resume-preview .r-entry b{ font-size:13.5px; }
.resume-preview .r-skills span{ display:inline-block; background:#eee; padding:2px 8px; border-radius:6px; margin:2px 4px 2px 0; font-size:11.5px; }

/* ===== signature pad ===== */
canvas.sig-pad{ width:100%; height:140px; background:rgba(255,255,255,.04); border:1px solid var(--edge); border-radius:10px; touch-action:none; cursor:crosshair; }

/* ===== quiz ===== */
.quiz-q{ font-size:15px; margin-bottom:14px; }
.quiz-opt{ display:block; width:100%; text-align:left; padding:12px 14px; border-radius:10px; border:1px solid var(--edge); background:rgba(255,255,255,.03); color:var(--text); cursor:pointer; margin-bottom:8px; font-size:13.5px; }
.quiz-opt:hover{ border-color:var(--accent); }
.quiz-opt.correct{ border-color:var(--accent-2); background:rgba(125,255,179,.1); }
.quiz-opt.wrong{ border-color:var(--danger); background:rgba(255,107,107,.1); }
.quiz-progress{ font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--muted); margin-bottom:10px; }

/* ===== chat ===== */
.chat-box{ height:340px; overflow-y:auto; border:1px solid var(--edge); border-radius:12px; padding:14px; background:rgba(0,0,0,.2); display:flex; flex-direction:column; gap:10px; }
.chat-msg{ max-width:80%; padding:10px 13px; border-radius:12px; font-size:13px; line-height:1.5; }
.chat-msg.bot{ align-self:flex-start; background:rgba(94,180,255,.12); border:1px solid rgba(94,180,255,.2); }
.chat-msg.me{ align-self:flex-end; background:rgba(125,255,179,.12); border:1px solid rgba(125,255,179,.2); }

/* ===== badges ===== */
.badge-item{ text-align:center; padding:14px 8px; border-radius:14px; border:1px solid var(--edge); background:rgba(0,0,0,.2); }
.badge-item .bi{ font-size:28px; }
.badge-item.locked{ opacity:.3; }
.badge-item .bn{ font-size:10.5px; margin-top:6px; color:var(--muted); }

/* ===== overlays / modals ===== */
.overlay{ position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:100; display:none; align-items:center; justify-content:center; padding:16px; }
.overlay.show{ display:flex; }
.overlay-panel{ width:520px; max-width:94vw; max-height:90vh; overflow-y:auto; background:var(--bg-deep); border:1px solid var(--edge); border-radius:20px; padding:22px; }
.overlay-panel.wide{ width:780px; }
.overlay-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.overlay-head h2{ font-size:15px; font-family:'JetBrains Mono',monospace; }
.close-x{ background:transparent; border:1px solid var(--edge); width:30px; height:30px; border-radius:8px; color:var(--muted); cursor:pointer; }

.toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:rgba(20,24,32,.96); border:1px solid var(--edge); padding:11px 18px; border-radius:999px; font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--accent-2); opacity:0; transition:all .25s; pointer-events:none; z-index:200; max-width:90vw; text-align:center; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

.mode-label{ font-family:'JetBrains Mono',monospace; font-size:11.5px; color:var(--muted); }
.help-text{ font-size:12px; color:var(--muted); line-height:1.7; }
.settings-item{ display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--edge); font-size:13px; }
.switch{ width:38px; height:21px; border-radius:999px; background:rgba(255,255,255,0.1); border:1px solid var(--edge); position:relative; cursor:pointer; flex-shrink:0; }
.switch.on{ background:var(--accent); }
.switch::after{ content:""; position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%; background:#fff; transition:left .18s; }
.switch.on::after{ left:19px; }

.avatar{ width:52px; height:52px; border-radius:50%; object-fit:cover; background:rgba(255,255,255,.06); border:1px solid var(--edge); }
.avatar-lg{ width:96px; height:96px; }

footer.site-footer{ text-align:center; padding:26px; color:var(--muted); font-size:11px; font-family:'JetBrains Mono',monospace; }

@media (max-width:480px){
  .overlay-panel{ padding:16px; }
}
