/* =========================================================================
 *  AI Interview System — Design System v2 (candidate + admin)
 *  Tokens → base → components → candidate → admin → motion → responsive
 * ========================================================================= */

/* ------------------------------------------------ tokens */
:root {
  --brand: #22bf8d;
  --brand-2: #25ce7a;
  --brand-3: #26a98d;
  --brand-dark: #1b4b3d;
  --brand-50: #f2fdfa;
  --brand-100: #e1fbf1;
  --brand-200: #b6f5dc;
  --grad: linear-gradient(135deg, #22bf8d 0%, #25ce7a 55%, #28adbc 100%);
  --grad-soft: linear-gradient(135deg, #f3fdf8 0%, #f2fdfc 100%);

  --bg: #f6fbfa;
  --surface: #ffffff;
  --surface-2: #fafdfd;
  --text: #0f2927;
  --text-2: #2b4443;
  --muted: #435858;
  --line: #e2efed;
  --line-2: #c7ddd9;

  --ok: #12a150;
  --ok-2: #047857;
  --ok-bg: #e7f8ee;
  --warn: #d97706;
  --warn-bg: #fff6e5;
  --bad: #e11d48;
  --bad-bg: #ffe9ee;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-xs: 0 1px 2px rgba(16, 52, 44, .05);
  --shadow-sm: 0 1px 2px rgba(16, 52, 44, .04), 0 2px 8px rgba(16, 52, 44, .05);
  --shadow: 0 1px 2px rgba(16, 52, 44, .04), 0 10px 30px -8px rgba(16, 52, 44, .12);
  --shadow-lg: 0 24px 60px -12px rgba(27, 75, 61, .28);
  --ring: 0 0 0 4px rgba(34, 191, 141, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text); }
h2 { font-size: 24px; font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--brand-100); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.spacer { flex: 1; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* animated ambient background */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(34, 191, 141, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
.bg-fx span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}
.bg-fx span:nth-child(1) { width: 520px; height: 520px; background: #aff5dd; top: -180px; left: -120px; }
.bg-fx span:nth-child(2) { width: 460px; height: 460px; background: #b4e9e9; top: -140px; right: -140px; animation-delay: -6s; }
.bg-fx span:nth-child(3) { width: 420px; height: 420px; background: #c9e8ff; bottom: -220px; left: 30%; animation-delay: -12s; opacity: .4; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(.95); }
}

/* ------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 239, 237, .8);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 16px; letter-spacing: -.01em; min-width: 0; }
.brand > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: var(--grad); color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 6px 16px -4px rgba(34, 191, 141, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.logo::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  background-size: 250% 100%; animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.topbar-right { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; font-weight: 500; }

.container { max-width: 1000px; margin: 0 auto; padding: 28px 16px 72px; }

/* ------------------------------------------------ screens */
.screen { display: none; }
.screen.active { display: block; animation: screenIn .5s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.card.narrow { max-width: 560px; margin: 48px auto; padding: 44px 32px; box-shadow: var(--shadow); }
.center-box { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 14px; }
.big-icon { font-size: 46px; margin-bottom: 10px; display: inline-block; animation: pop .6s var(--ease-spring) both; }
.big-icon.success {
  position: relative; display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #059669); color: #fff; font-weight: 800; font-size: 40px;
  box-shadow: 0 16px 36px -10px rgba(5, 150, 105, .6);
}
.big-icon.success::before, .big-icon.success::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(34, 197, 94, .35);
  animation: ripple 2.4s ease-out infinite;
}
.big-icon.success::after { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* hero */
.hero { text-align: center; margin: 18px auto 30px; max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--brand-100); color: var(--brand);
  font-size: 13px; font-weight: 650; margin-bottom: 18px; box-shadow: var(--shadow-xs);
  animation: rise .6s var(--ease) both;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); animation: blinkDot 1.6s infinite; }
@keyframes blinkDot { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.hero h1 {
  font-size: clamp(30px, 5.2vw, 50px); font-weight: 820; letter-spacing: -.035em; line-height: 1.08;
  margin-bottom: 14px; animation: rise .7s .05s var(--ease) both;
}
.hero p { font-size: clamp(15px, 1.8vw, 17px); max-width: 560px; margin: 0 auto; animation: rise .7s .12s var(--ease) both; }
.grad {
  background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradMove 6s ease infinite;
}
@keyframes gradMove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; animation: rise .7s .2s var(--ease) both; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); box-shadow: var(--shadow-xs);
}

/* ------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; overflow: hidden;
  font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.btn.primary {
  background: var(--grad); background-size: 150% 150%; color: #fff;
  box-shadow: 0 8px 20px -8px rgba(34, 191, 141, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 28px -10px rgba(34, 191, 141, .75), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.primary::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn.primary:hover:not(:disabled)::after { transform: translateX(120%); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: var(--shadow-xs); }
.btn.ghost:hover:not(:disabled) { border-color: var(--brand-200); color: var(--brand); background: var(--brand-50); transform: translateY(-1px); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.success { background: var(--ok-bg); color: var(--ok-2); }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 600; padding: 0 0 0 6px; }
.link:hover { text-decoration: underline; }

/* ------------------------------------------------ form */
.form-card { max-width: 840px; margin: 0 auto; padding: 28px; box-shadow: var(--shadow); animation: rise .7s .25s var(--ease) both; }
.stepper { position: relative; display: flex; list-style: none; padding: 0; margin: 0 0 28px; gap: 10px; }
.stepper li {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-weight: 650; font-size: 14px;
  transition: all .35s var(--ease);
}
.stepper li span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: #eaf4f2; font-size: 12px; font-weight: 750; transition: all .35s var(--ease);
}
.stepper li.active { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand); box-shadow: 0 6px 16px -10px rgba(34, 191, 141, .6); }
.stepper li.active span { background: var(--grad); color: #fff; transform: scale(1.08); box-shadow: 0 4px 10px -2px rgba(34, 191, 141, .5); }
.stepper li.done { color: var(--ok-2); border-color: #c9eed8; background: #f3fbf6; }
.stepper li.done span { background: var(--ok); color: #fff; font-size: 0; }
.stepper li.done span::before { content: '✓'; font-size: 13px; }

.step { display: none; }
.step.active { display: block; animation: stepIn .45s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .input {
  font: inherit; font-weight: 450; font-size: 15px; color: var(--text);
  padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.field select, select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23435858' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: #6e9797; }
.field input:hover, .field select:hover, .field textarea:hover, .input:hover { border-color: #a7c5c0; }
.field textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring); background: #fff;
}
.pos-desc { font-weight: 450; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pos-desc:not(:empty) { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border: 1px dashed var(--line-2); animation: rise .35s var(--ease) both; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.form-error { color: var(--bad); font-weight: 600; font-size: 14px; margin-top: 14px; min-height: 20px; }
.form-error:not(:empty) { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 8px; cursor: pointer;
  border: 2px dashed var(--brand-200); border-radius: var(--radius); background: var(--grad-soft); padding: 46px 22px;
  transition: all .25s var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-50); transform: scale(1.01); box-shadow: var(--ring); }
.dz-icon {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; font-size: 32px;
  background: #fff; box-shadow: var(--shadow); margin-bottom: 4px; animation: bob 3s ease-in-out infinite;
}
.dropzone.drag .dz-icon { animation: bob .6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.dz-title { font-weight: 650; color: var(--text); }
.file-info {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding: 13px 16px; border-radius: 12px;
  background: var(--ok-bg); border: 1px solid #bde9cf; animation: rise .4s var(--ease) both;
}

.instructions { background: var(--grad-soft); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.instructions h3 { font-size: 16px; }
.instructions ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.instructions li {
  padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9);
  animation: rise .5s var(--ease) both;
}
.instructions li:nth-child(1) { animation-delay: .03s; } .instructions li:nth-child(2) { animation-delay: .07s; }
.instructions li:nth-child(3) { animation-delay: .11s; } .instructions li:nth-child(4) { animation-delay: .15s; }
.instructions li:nth-child(5) { animation-delay: .19s; } .instructions li:nth-child(6) { animation-delay: .23s; }
.instructions li:nth-child(7) { animation-delay: .27s; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: 14px; cursor: pointer; color: var(--text-2); }
.check input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); cursor: pointer; }

/* ------------------------------------------------ interview */
.iv { display: grid; gap: 16px; }
.iv-head { display: flex; align-items: center; gap: 18px; padding: 16px 20px; position: sticky; top: 72px; z-index: 5; box-shadow: var(--shadow); }
.iv-title { flex: 1; min-width: 0; }
.iv-progress-text { font-size: 15px; margin: 2px 0 9px; }
.progress { height: 8px; background: var(--brand-50); border-radius: 99px; overflow: hidden; }
.progress-bar {
  position: relative; height: 100%; width: 0; background: var(--grad); border-radius: 99px;
  transition: width .7s var(--ease); overflow: hidden;
}
.progress-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: sweep 1.8s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* AI avatar orb */
.ai-orb {
  position: relative; width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: 0 10px 24px -8px rgba(34, 191, 141, .7), inset 0 2px 6px rgba(255, 255, 255, .3);
}
.ai-orb::before, .ai-orb::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(37, 206, 122, .45); opacity: 0;
}
.ai-orb.thinking::before { opacity: 1; border-color: transparent; border-top-color: var(--brand); border-right-color: var(--brand-2); animation: spin 1s linear infinite; }
.ai-orb.speaking::before, .ai-orb.speaking::after { animation: ripple 1.6s ease-out infinite; }
.ai-orb.speaking::after { animation-delay: .8s; }
.ai-orb .bars { display: none; gap: 3px; align-items: center; height: 18px; }
.ai-orb.speaking .bars { display: flex; }
.ai-orb.speaking .lbl { display: none; }
.ai-orb .bars i { width: 3px; background: #fff; border-radius: 3px; animation: eq .9s ease-in-out infinite; }
.ai-orb .bars i:nth-child(2) { animation-delay: .15s; } .ai-orb .bars i:nth-child(3) { animation-delay: .3s; } .ai-orb .bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

.timer { position: relative; width: 66px; height: 66px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.t-bg { stroke: var(--brand-50); }
.t-fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.timer.warn .t-fg { stroke: var(--bad); }
.timer.warn span { color: var(--bad); animation: pulse 1s infinite; }
.timer.warn { animation: shakeSoft 1s infinite; }
@keyframes shakeSoft { 0%, 90%, 100% { transform: none; } 93% { transform: rotate(-6deg); } 97% { transform: rotate(6deg); } }
@keyframes pulse { 50% { opacity: .45; } }

.chat {
  min-height: 280px; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 22px; user-select: none; -webkit-user-select: none; scroll-behavior: smooth;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 191, 141, .05), transparent 40%),
    var(--surface);
}
.chat::-webkit-scrollbar, .drawer::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.chat::-webkit-scrollbar-thumb, .drawer::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb { background: #c1d9d5; border-radius: 8px; }
.bubble {
  max-width: 84%; padding: 13px 16px; border-radius: 18px; font-size: 15px; word-wrap: break-word; line-height: 1.6;
  animation: bubbleIn .45s var(--ease-spring) both;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.bubble .who { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 5px; }
.bubble.ai {
  background: var(--brand-50); border: 1px solid var(--brand-100); border-top-left-radius: 6px;
  align-self: flex-start; font-weight: 500; color: var(--text); transform-origin: top left;
}
.bubble.me {
  background: var(--grad); color: #fff; border-top-right-radius: 6px; align-self: flex-end; transform-origin: top right;
  box-shadow: 0 8px 18px -10px rgba(34, 191, 141, .8);
}
.bubble.typing-wrap { background: var(--surface-2); border-color: var(--line); }
.typing { display: inline-flex; gap: 4px; vertical-align: middle; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.composer { padding: 16px 18px; transition: box-shadow .25s; }
.composer:focus-within { box-shadow: var(--shadow), var(--ring); border-color: var(--brand-200); }
.composer-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 650; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: all .2s var(--ease);
}
.tool-btn:hover:not(:disabled) { border-color: var(--brand-200); color: var(--brand); background: var(--brand-50); transform: translateY(-1px); }
.tool-btn:disabled { opacity: .5; cursor: not-allowed; }
.tool-btn.recording { background: var(--bad-bg); border-color: #fecdd6; color: var(--bad); box-shadow: 0 0 0 0 rgba(225, 29, 72, .4); animation: recPulse 1.4s infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .35); } 100% { box-shadow: 0 0 0 12px rgba(225, 29, 72, 0); } }
.tool-btn.disabled-soft { opacity: .55; }
.composer textarea {
  width: 100%; font: inherit; font-size: 15px; line-height: 1.6; padding: 13px 14px;
  border: 1.5px solid var(--line-2); border-radius: 12px; resize: vertical; min-height: 120px; transition: border-color .2s, box-shadow .2s;
}
.composer textarea:disabled { background: var(--surface-2); }
.composer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }

/* ------------------------------------------------ email task */
.task-card {
  position: relative; overflow: hidden; background: var(--grad-soft); border-color: var(--brand-100);
  font-weight: 500; font-size: 15.5px; line-height: 1.65; user-select: none; -webkit-user-select: none;
  animation: rise .5s var(--ease) both;
}
.task-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.task-card .who { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 8px; }
.mail-compose { padding: 0; overflow: hidden; box-shadow: var(--shadow); animation: rise .5s .08s var(--ease) both; transition: box-shadow .25s; }
.mail-compose:focus-within { box-shadow: var(--shadow), var(--ring); }
.mail-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); transition: background .2s; }
.mail-row label { width: 90px; flex: none; padding: 0 18px; font-size: 13px; font-weight: 650; color: var(--muted); }
.mail-row input { flex: 1; min-width: 0; border: 0; padding: 14px 18px 14px 0; font: inherit; font-size: 15px; background: transparent; }
.mail-row input:focus, .mail-compose textarea:focus { outline: none; box-shadow: none; }
.mail-row:focus-within { background: var(--brand-50); }
.mail-row:focus-within label { color: var(--brand); }
.mail-compose textarea {
  display: block; width: 100%; border: 0; padding: 18px; font: inherit; font-size: 15px; line-height: 1.7; resize: vertical; min-height: 300px;
}
.mail-compose .composer-actions { padding: 12px 18px; margin: 0; border-top: 1px solid var(--line); background: var(--surface-2); }

/* admin: email view */
.mail-view { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-xs); }
.mail-view .hdr { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 12px 16px; font-size: 14px; display: grid; gap: 4px; }
.mail-view .hdr span { display: inline-block; width: 72px; color: var(--muted); font-size: 13px; }
.mail-view .body { padding: 16px 18px; white-space: pre-wrap; line-height: 1.7; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; }
.task-given { background: var(--grad-soft); border: 1px solid var(--brand-100); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 12px; }

/* ------------------------------------------------ overlay / modal / toast */
.overlay, .modal {
  position: fixed; inset: 0; background: rgba(15, 41, 39, .45); display: grid; place-items: center; z-index: 100; padding: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay-box, .modal-box {
  background: #fff; border-radius: var(--radius-lg); padding: 32px 28px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg); animation: modalIn .45s var(--ease-spring) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.overlay-box p { margin: 16px 0 0; font-weight: 550; color: var(--text-2); }
.modal-box h3 { margin-top: 4px; }
.modal-box p { color: var(--text-2); }
.spinner {
  position: relative; width: 46px; height: 46px; margin: 0 auto; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--brand-2), var(--brand));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px) scale(.95); opacity: 0; pointer-events: none;
  background: #162e2c; color: #fff; padding: 13px 20px; border-radius: 14px; font-size: 14px; font-weight: 550;
  max-width: min(520px, 92vw); z-index: 200; transition: all .35s var(--ease-spring); box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.warn { background: #b45309; }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--ok-2); }

/* =========================================================================
 *  ADMIN
 * ========================================================================= */
.admin-page .container { max-width: 1320px; }
.login-card { max-width: 420px; margin: 72px auto; padding: 36px 32px; box-shadow: var(--shadow); animation: rise .6s var(--ease) both; }
.login-card .lock {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 16px; font-size: 24px;
  background: var(--grad); box-shadow: 0 12px 26px -10px rgba(34, 191, 141, .7); animation: pop .6s var(--ease-spring) both;
}
.login-card .field { margin: 18px 0 4px; }

.tabs {
  display: inline-flex; gap: 4px; margin-bottom: 22px; padding: 5px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-xs);
}
.tab {
  background: none; border: 0; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 650; color: var(--muted);
  cursor: pointer; border-radius: 10px; transition: all .25s var(--ease);
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: #fff; background: var(--grad); box-shadow: 0 6px 14px -6px rgba(34, 191, 141, .7); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: screenIn .45s var(--ease) both; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-xs); transition: transform .25s var(--ease), box-shadow .25s;
  animation: rise .5s var(--ease) both;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat::after { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--brand-50); }
.stat:nth-child(2) { animation-delay: .04s; } .stat:nth-child(3) { animation-delay: .08s; } .stat:nth-child(4) { animation-delay: .12s; }
.stat:nth-child(5) { animation-delay: .16s; } .stat:nth-child(6) { animation-delay: .2s; }
.stat .v { position: relative; z-index: 1; font-size: 30px; font-weight: 820; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .l { position: relative; z-index: 1; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 150px; padding: 9px 12px; font-size: 14px; border-radius: 11px; }
.toolbar select.input { padding-right: 36px; }
.toolbar .input.grow { flex: 1; min-width: 220px; }

.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); max-height: 70vh; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700;
  background: var(--surface-2); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none;
  transition: color .2s;
}
table.data th:hover { color: var(--brand); }
table.data td { padding: 12px 14px; border-bottom: 1px solid #f0f6f5; vertical-align: middle; transition: background .2s; }
table.data tbody tr { cursor: pointer; animation: rowIn .4s var(--ease) both; }
table.data tbody tr:nth-child(-n+12) { animation-delay: calc(var(--i, 0) * 1ms); }
table.data tbody tr:hover td { background: #f8fefb; }
table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.data tbody tr:last-child td { border-bottom: 0; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.empty { text-align: center; color: var(--muted); padding: 48px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-strong { background: #d6f5e6; color: #047857; }
.b-hire { background: var(--ok-bg); color: #15803d; }
.b-hold { background: var(--warn-bg); color: #b45309; }
.b-reject { background: var(--bad-bg); color: #be123c; }
.b-grey { background: #f0f6f5; color: #354c4b; }
.b-blue { background: var(--brand-50); color: var(--brand); }

.scorebar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.scorebar .track { flex: 1; height: 7px; background: #edf5f3; border-radius: 99px; overflow: hidden; }
.scorebar .fill { height: 100%; border-radius: 99px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.scorebar b { font-size: 13px; width: 26px; text-align: right; font-variant-numeric: tabular-nums; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 41, 39, .4); z-index: 60; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .3s ease both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(940px, 100%); background: var(--bg); z-index: 61;
  overflow-y: auto; box-shadow: -20px 0 60px rgba(15, 41, 39, .25); animation: slide .45s var(--ease) both;
}
@keyframes slide { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  position: sticky; top: 0; z-index: 2; color: #fff; padding: 20px 24px;
  background: linear-gradient(135deg, #1b4b3d 0%, #1d6347 60%, #2b8759 100%);
  display: flex; align-items: flex-start; gap: 14px; box-shadow: 0 8px 20px -10px rgba(27, 75, 61, .6);
}
.drawer-head h2 { margin: 0; font-size: 22px; color: #fff; }
.drawer-head .sub { opacity: .8; font-size: 14px; }
.drawer-head .x {
  margin-left: auto; background: rgba(255, 255, 255, .14); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 11px;
  font-size: 22px; cursor: pointer; flex: none; transition: all .2s var(--ease);
}
.drawer-head .x:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }
.drawer-body { padding: 20px 24px 48px; display: grid; gap: 16px; }
.drawer-body > * { animation: rise .5s var(--ease) both; }
.drawer-body > *:nth-child(2) { animation-delay: .04s; } .drawer-body > *:nth-child(3) { animation-delay: .08s; }
.drawer-body > *:nth-child(4) { animation-delay: .12s; } .drawer-body > *:nth-child(5) { animation-delay: .16s; }
.drawer-body > *:nth-child(n+6) { animation-delay: .2s; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.score-hero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.score-big {
  text-align: center; min-width: 150px; padding: 18px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--brand-100);
}
.score-big .n { font-size: 56px; font-weight: 850; line-height: 1; letter-spacing: -.04em; animation: pop .7s var(--ease-spring) both; }
.score-bars { flex: 1; min-width: 260px; display: grid; gap: 10px; }
.score-bars .row { display: grid; grid-template-columns: 180px 1fr 46px; gap: 12px; align-items: center; font-size: 13px; font-weight: 550; color: var(--text-2); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; }
.kv div { font-size: 14px; font-weight: 550; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.kv span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 750; margin-bottom: 2px; }

.sec-title { font-size: 15px; font-weight: 750; color: var(--brand-dark); margin: 0 0 12px; letter-spacing: -.01em; }
ul.clean { margin: 0; padding-left: 20px; }
ul.clean li { margin: 5px 0; }
ul.clean li::marker { color: var(--brand-2); }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.qa { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; transition: box-shadow .25s, border-color .25s; }
.qa:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-100); }
.qa + .qa { margin-top: 12px; }
.qa .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.qa .q { font-weight: 650; margin-bottom: 10px; }
.qa .a { background: var(--surface-2); border-left: 3px solid var(--brand); padding: 11px 14px; border-radius: 8px; white-space: pre-wrap; font-size: 14px; }
.qa .ideal { font-size: 13px; color: #065f46; margin-top: 10px; padding: 8px 12px; background: #effaf4; border-radius: 8px; }

.pos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pos-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow-xs);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; animation: rise .5s var(--ease) both;
}
.pos-card::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); opacity: 0; transition: opacity .25s; }
.pos-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.pos-card:hover::before { opacity: 1; }
.pos-card h4 { margin: 0; font-size: 16px; }
.pos-card .actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.help { font-weight: 450; color: var(--muted); font-size: 12px; }
.alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; animation: rise .4s var(--ease) both; }
.alert.warn { background: var(--warn-bg); border: 1px solid #fde3a7; color: #92400e; }
.alert.info { background: var(--brand-50); border: 1px solid var(--brand-100); color: #1d6d4f; }

/* ------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .bg-fx span { display: none; }
}

/* ------------------------------------------------ responsive */
@media (max-width: 900px) {
  .score-bars .row { grid-template-columns: 140px 1fr 44px; }
}
@media (max-width: 700px) {
  body { font-size: 14.5px; }
  .container { padding: 18px 14px 56px; }
  .topbar { padding: 10px 14px; }
  .grid-2, .settings-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 14px; }
  .form-card { padding: 18px; }
  .card.narrow { margin: 24px auto; padding: 32px 20px; }
  .stepper { gap: 6px; margin-bottom: 20px; }
  .stepper li { font-size: 12px; padding: 8px; gap: 6px; justify-content: center; }
  .stepper li span { width: 22px; height: 22px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
  .form-actions > span:empty { display: none; }
  .hero { margin: 6px auto 22px; }
  .chips { gap: 6px; }
  .chip { font-size: 12px; padding: 6px 10px; }
  .dropzone { padding: 34px 16px; }
  .iv-head { top: 60px; padding: 12px 14px; gap: 12px; }
  .ai-orb { width: 42px; height: 42px; font-size: 12px; }
  .timer { width: 56px; height: 56px; }
  .chat { max-height: 44vh; padding: 14px; }
  .bubble { max-width: 94%; font-size: 14.5px; }
  .hide-mobile { display: none; }
  .composer-actions .btn { width: 100%; }
  .mail-row label { width: 70px; padding: 0 12px; }
  .mail-compose textarea { min-height: 240px; }
  .score-bars .row { grid-template-columns: 110px 1fr 40px; }
  .score-big { min-width: 0; width: 100%; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; padding: 9px 8px; font-size: 13px; }
  .toolbar .input, .toolbar .input.grow { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .toolbar .input.grow { flex-basis: 100%; }
  .drawer-head { padding: 16px; }
  .drawer-body { padding: 16px 14px 40px; }
  .stat .v { font-size: 26px; }
  .login-card { margin: 32px auto; padding: 28px 22px; }
}

@media print {
  .topbar, .drawer-actions, .drawer-head .x, .tabs, .toolbar, .stats, .bg-fx { display: none !important; }
  .drawer { position: static; width: 100%; box-shadow: none; overflow: visible; animation: none; }
  .drawer-bg { display: none; }
  body.drawer-open .container { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  * { animation: none !important; }
}

/* =========================================================================
 *  V3 — VIBRANT LAYER: multi-colour palette, aurora, glass, gradient borders,
 *  spotlight, ripple, sparkles, confetti. (Overrides tokens & visuals only.)
 * ========================================================================= */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --brand: #19ce65;
  --brand-2: #237376;
  --brand-3: #26a98d;
  --c-cyan: #06b6d4;
  --c-amber: #f59e0b;
  --c-green: #10b981;
  --c-rose: #f43f5e;
  --brand-50: #f1fdf6;
  --brand-100: #d9fae9;
  --brand-200: #9ff3c4;
  --grad: linear-gradient(120deg, #19ce65 0%, #21a59f 45%, #26a98d 100%);
  --grad-wide: linear-gradient(90deg, #19ce65, #21a59f, #26a98d, #f59e0b, #06b6d4, #19ce65);
  --grad-cool: linear-gradient(135deg, #06b6d4 0%, #19ce65 100%);
  --grad-warm: linear-gradient(135deg, #f59e0b 0%, #26a98d 100%);
  --grad-fresh: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, #f2fdf7 0%, #f1fcfb 50%, #eefbff 100%);
  --grad-ring: conic-gradient(from var(--ang), #19ce65, #26a98d, #f59e0b, #06b6d4, #19ce65);
  --ring: 0 0 0 4px rgba(25, 206, 101, .14), 0 0 22px -4px rgba(38, 169, 141, .35);
  --bg: #f4fef9;
}

/* ---- aurora background */
body { background: linear-gradient(180deg, #f5fef9 0%, #f5fcfc 45%, #f1fbff 100%) fixed; }
.bg-fx::after {
  content: ''; position: absolute; inset: -40%;
  background: conic-gradient(from var(--ang), rgba(25, 206, 101,.18), rgba(38, 169, 141,.16), rgba(245,158,11,.12), rgba(6,182,212,.16), rgba(25, 206, 101,.18));
  filter: blur(80px); animation: auroraSpin 30s linear infinite; opacity: .9;
}
@keyframes auroraSpin { to { --ang: 360deg; } }
.bg-fx span { opacity: .7; filter: blur(80px); }
.bg-fx span:nth-child(1) { background: #7fefaa; }
.bg-fx span:nth-child(2) { background: #97f2e3; }
.bg-fx span:nth-child(3) { background: #9fe7f5; opacity: .55; }

/* ---- top bar */
.topbar { background: rgba(255, 255, 255, .6); border-bottom: 0; }
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad-wide); background-size: 200% 100%; animation: flow 8s linear infinite; opacity: .85;
}
@keyframes flow { to { background-position: 200% 0; } }
.logo { isolation: isolate; background: var(--grad-ring); animation: auroraSpin 8s linear infinite; }
.logo::before { content: ''; position: absolute; inset: 2px; border-radius: 9px; background: linear-gradient(135deg, #21a55e, #25757b); z-index: -1; }

/* ---- glass cards + spotlight */
.card, .stat, .pos-card, .qa, .table-wrap {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 32px -14px rgba(28, 90, 68, .22);
}
.card, .pos-card { position: relative; }
.iv-head { position: sticky; }
.fx-spot { --mx: 50%; --my: 50%; isolation: isolate; }
.fx-spot > .fx-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(33, 165, 159, .11), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.fx-spot:hover > .fx-glow { opacity: 1; }

/* animated gradient border (form card, interview head, composer, mail, login, done) */
.form-card, .iv-head, .composer, .mail-compose, .login-card, .card.narrow {
  border: 1.5px solid transparent;
  background: linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)) padding-box, var(--grad-ring) border-box;
  animation: auroraSpin 10s linear infinite;
}
.form-card { animation: auroraSpin 10s linear infinite, rise .7s .25s var(--ease) both; }
.login-card { animation: auroraSpin 10s linear infinite, rise .6s var(--ease) both; }
.mail-compose { animation: auroraSpin 10s linear infinite, rise .5s .08s var(--ease) both; }
.composer:focus-within, .mail-compose:focus-within { box-shadow: 0 0 0 4px rgba(33, 165, 159, .12), 0 18px 40px -16px rgba(33, 165, 159, .45); }

/* ---- hero */
.eyebrow { border: 1px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; }
.hero h1 { text-shadow: 0 10px 40px rgba(25, 206, 101, .12); }
.grad { background-image: var(--grad-wide); background-size: 300% 100%; animation: flow 6s linear infinite; }
.chips .chip { border: 0; color: #fff; font-weight: 650; box-shadow: 0 8px 18px -10px rgba(0,0,0,.35); transition: transform .25s var(--ease-spring); }
.chips .chip:hover { transform: translateY(-3px) scale(1.04); }
.chips .chip:nth-child(1) { background: var(--grad); }
.chips .chip:nth-child(2) { background: var(--grad-warm); }
.chips .chip:nth-child(3) { background: var(--grad-cool); }
.chips .chip:nth-child(4) { background: var(--grad-fresh); }
.hero { position: relative; }
.sparkles { position: absolute; inset: -20px -40px 0; pointer-events: none; overflow: hidden; z-index: -1; }
.sparkles i {
  position: absolute; bottom: -10px; width: 8px; height: 8px; border-radius: 50%; opacity: 0;
  background: var(--c, #21a59f); box-shadow: 0 0 12px var(--c, #21a59f);
  animation: sparkle 7s linear infinite;
}
.sparkles i:nth-child(1) { left: 6%;  --c: #19ce65; animation-delay: 0s; }
.sparkles i:nth-child(2) { left: 17%; --c: #26a98d; animation-delay: 1.2s; width: 6px; height: 6px; }
.sparkles i:nth-child(3) { left: 29%; --c: #f59e0b; animation-delay: 2.6s; }
.sparkles i:nth-child(4) { left: 42%; --c: #06b6d4; animation-delay: .6s; width: 5px; height: 5px; }
.sparkles i:nth-child(5) { left: 58%; --c: #21a59f; animation-delay: 3.4s; }
.sparkles i:nth-child(6) { left: 70%; --c: #10b981; animation-delay: 1.8s; width: 6px; height: 6px; }
.sparkles i:nth-child(7) { left: 82%; --c: #26a98d; animation-delay: 4.2s; }
.sparkles i:nth-child(8) { left: 93%; --c: #19ce65; animation-delay: 2.2s; width: 5px; height: 5px; }
@keyframes sparkle {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translateY(-340px) translateX(20px) scale(1.1); opacity: 0; }
}

/* ---- buttons */
.btn.primary {
  background: linear-gradient(120deg, #19ce65, #21a59f, #26a98d, #21a59f, #19ce65); background-size: 300% 100%;
  animation: flow 6s linear infinite;
  box-shadow: 0 10px 24px -10px rgba(33, 165, 159, .8), 0 4px 12px -6px rgba(38, 169, 141, .6), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn.primary:hover:not(:disabled) { box-shadow: 0 16px 34px -12px rgba(33, 165, 159, .9), 0 0 24px -6px rgba(38, 169, 141, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.ghost { background: rgba(255,255,255,.85); }
.btn.ghost:hover:not(:disabled), .tool-btn:hover:not(:disabled) {
  background: linear-gradient(#fff,#fff) padding-box, var(--grad) border-box; border-color: transparent; color: var(--brand);
}
.tool-btn, .tab { position: relative; overflow: hidden; }
.fx-ripple {
  position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0);
  background: rgba(255, 255, 255, .55); animation: rippleBtn .6s ease-out forwards;
}
.btn.ghost .fx-ripple, .tool-btn .fx-ripple, .tab:not(.active) .fx-ripple { background: rgba(33, 165, 159, .22); }
@keyframes rippleBtn { to { transform: scale(4); opacity: 0; } }

/* ---- form */
.stepper li.active { background: linear-gradient(120deg, #19ce65, #21a59f, #26a98d, #21a59f, #19ce65); background-size: 300% 100%; animation: flow 6s linear infinite; color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px rgba(33, 165, 159, .8); }
.stepper li.active span { background: #fff; color: var(--brand); }
.stepper li.done { background: linear-gradient(135deg, #ecfdf5, #e0f7fb); border-color: #b9ecd8; }
.stepper li.done span { background: var(--grad-fresh); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, textarea:focus { border-color: #21a59f; }
.pos-desc:not(:empty) { background: var(--grad-soft); border: 1px solid var(--brand-100); }
.dropzone {
  border: 2px dashed transparent;
  background: linear-gradient(135deg, #f8fefc, #f5fefd, #f0fcff) padding-box, var(--grad-ring) border-box;
  animation: auroraSpin 6s linear infinite;
}
.dropzone:hover, .dropzone.drag { background: linear-gradient(135deg, #effdf7, #ecfdfa, #e6faff) padding-box, var(--grad-ring) border-box; }
.dz-icon { background: var(--grad); box-shadow: 0 14px 28px -10px rgba(33, 165, 159, .7); }
.file-info { background: linear-gradient(135deg, #ecfdf5, #e6fbff); }
.instructions { background: linear-gradient(135deg, rgba(242, 253, 247,.9), rgba(241, 252, 251,.9), rgba(238,251,255,.9)); }
.instructions li { border-left: 4px solid #21a59f; }
.instructions li:nth-child(3n+2) { border-left-color: #f59e0b; }
.instructions li:nth-child(3n) { border-left-color: #06b6d4; }
.check input { accent-color: #21a59f; }

/* ---- interview */
.progress { background: linear-gradient(90deg, #ecfdf3, #ebfbf8); }
.progress-bar { background: var(--grad-wide); background-size: 200% 100%; animation: flow 4s linear infinite; box-shadow: 0 0 12px rgba(33, 165, 159, .5); }
.ai-orb { isolation: isolate; background: var(--grad-ring); animation: auroraSpin 6s linear infinite; }
.ai-orb .lbl, .ai-orb .bars { position: relative; z-index: 2; }
.ai-orb .core { position: absolute; inset: 4px; border-radius: 50%; background: linear-gradient(135deg, #21a55e, #25757b); z-index: 1; }
.ai-orb.speaking { box-shadow: 0 0 30px -4px rgba(38, 169, 141, .8), 0 10px 24px -8px rgba(25, 206, 101, .7); }
.t-fg { stroke: url(#tgrad); }
.timer.warn .t-fg { stroke: var(--c-rose); }
.timer span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.timer.warn span { background: none; -webkit-text-fill-color: var(--c-rose); color: var(--c-rose); }
.chat { background: radial-gradient(circle at 0% 0%, rgba(25, 206, 101,.07), transparent 45%), radial-gradient(circle at 100% 100%, rgba(38, 169, 141,.07), transparent 45%), rgba(255,255,255,.8); }
.bubble.ai { border: 1px solid transparent; background: linear-gradient(135deg, #f3fef9, #f3fcfb) padding-box, linear-gradient(135deg, #9ff3c4, #96eadc) border-box; }
.bubble.me { background: var(--grad); box-shadow: 0 10px 22px -10px rgba(33, 165, 159, .8); }
.bubble .who { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: table; }
.task-card { background: linear-gradient(135deg, #f1fdf7, #f1fbfa, #ecfaff); }
.task-card::before { background: var(--grad-wide); background-size: 100% 300%; animation: flowV 5s linear infinite; }
@keyframes flowV { to { background-position: 0 300%; } }
.mail-row:focus-within { background: linear-gradient(90deg, rgba(25, 206, 101,.06), rgba(38, 169, 141,.04)); }

/* ---- success screen + confetti */
.big-icon.success { isolation: isolate; background: conic-gradient(from var(--ang), #10b981, #06b6d4, #19ce65, #26a98d, #10b981); animation: auroraSpin 5s linear infinite, pop .6s var(--ease-spring) both; }
.big-icon.success::before { inset: 5px; border: 0; background: linear-gradient(135deg, #10b981, #059669); z-index: -1; animation: none; }
.big-icon.success::after { border-color: rgba(33, 165, 159, .35); }
.fx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 300; }

/* ---- overlays */
.spinner { background: conic-gradient(from 0deg, transparent 0 20%, #06b6d4, #19ce65, #26a98d, #f59e0b); }
.overlay-box, .modal-box { border: 1.5px solid transparent; background: linear-gradient(#fff,#fff) padding-box, var(--grad) border-box; }
.toast { background: linear-gradient(135deg, #1b4b3d, #1c5a44); }
.toast.ok { background: linear-gradient(135deg, #059669, #0891b2); }
.toast.warn { background: linear-gradient(135deg, #d97706, #237d67); }
.toast.error { background: linear-gradient(135deg, #e11d48, #166048); }
.chat::-webkit-scrollbar-thumb, .drawer::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb { background: linear-gradient(#59e494, #37d7b7); }

/* =========================== ADMIN vibrant =========================== */
.tabs { background: rgba(255,255,255,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: rgba(255,255,255,.9); }
.tab.active { background: linear-gradient(120deg, #19ce65, #21a59f, #26a98d, #21a59f, #19ce65); background-size: 300% 100%; animation: flow 6s linear infinite; }
.stat .v { background: var(--g, var(--grad)); -webkit-background-clip: text; background-clip: text; color: transparent !important; display: inline-block; }
.stat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--g, var(--grad)); z-index: 2; }
.stat::after { width: 96px; height: 96px; right: -26px; top: -26px; }
.stat:nth-child(1) { --g: linear-gradient(135deg, #19ce65, #21a59f); }
.stat:nth-child(2) { --g: linear-gradient(135deg, #06b6d4, #3b82f6); }
.stat:nth-child(3) { --g: linear-gradient(135deg, #21a59f, #26a98d); }
.stat:nth-child(4) { --g: linear-gradient(135deg, #10b981, #06b6d4); }
.stat:nth-child(5) { --g: linear-gradient(135deg, #19ce65, #06b6d4); }
.stat:nth-child(6) { --g: linear-gradient(135deg, #f59e0b, #26a98d); }
.stat:nth-child(1)::after { background: rgba(25, 206, 101,.12); }  .stat:nth-child(2)::after { background: rgba(6,182,212,.14); }
.stat:nth-child(3)::after { background: rgba(38, 169, 141,.12); }  .stat:nth-child(4)::after { background: rgba(16,185,129,.14); }
.stat:nth-child(5)::after { background: rgba(59,130,246,.12); }  .stat:nth-child(6)::after { background: rgba(245,158,11,.16); }
table.data th { background: linear-gradient(90deg, #f3fef9, #f3fcfb); }
table.data td:first-child, table.data td:nth-child(3) { white-space: nowrap; }
table.data tbody tr:hover td { background: linear-gradient(90deg, rgba(25, 206, 101,.05), rgba(38, 169, 141,.04)); }
table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #21a59f; }
.b-strong { background: linear-gradient(135deg, #d1fae5, #ccfbf1); }
.b-hire { background: linear-gradient(135deg, #dcfce7, #e0f7fb); }
.b-hold { background: linear-gradient(135deg, #fef3c7, #ffe4e6); }
.b-reject { background: linear-gradient(135deg, #ffe4e6, #e8f9f6); }
.b-blue { background: linear-gradient(135deg, #ebfcf2, #e0f2fe); color: #21a55e; }
.scorebar .fill { background-image: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.35)); }
.drawer { background: linear-gradient(180deg, #f3fef9, #f5fcfc 50%, #f1fbff); }
.drawer-head { background: linear-gradient(120deg, #1b4b3d, #1c5a44, #1c6164, #1c5a44, #1b4b3d); background-size: 300% 100%; animation: flow 12s linear infinite; }
.score-big { border: 1.5px solid transparent; background: linear-gradient(135deg, #f4fef9, #f3fcfb) padding-box, var(--grad) border-box; }
.sec-title { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.kv div { background: linear-gradient(135deg, rgba(243, 254, 249,.8), rgba(243, 252, 251,.8)); }
.qa .a { border-left-color: #21a59f; background: linear-gradient(90deg, #f6fefa, #f7fcfc); }
.pos-card::before { opacity: 1; height: 4px; left: 0; right: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--grad-wide); background-size: 200% 100%; animation: flow 6s linear infinite; }
.alert.info { background: linear-gradient(135deg, #eefdf5, #f0fbfa); }
.alert.warn { background: linear-gradient(135deg, #fff7e6, #f0fdf9); }
.login-card .lock { background: var(--grad-ring); animation: auroraSpin 6s linear infinite, pop .6s var(--ease-spring) both; }

@media (prefers-reduced-motion: reduce) {
  .bg-fx::after, .sparkles { display: none; }
}
@media print {
  .card, .stat, .pos-card, .qa, .table-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .sec-title, .stat .v, .bubble .who, .timer span { color: #1b4b3d !important; background: none; -webkit-text-fill-color: #1b4b3d; }
}

/* =========================================================================
 *  V4 — THEMES
 *  Light  = "Sunrise"       : violet · pink · amber on a warm pastel sky
 *  Dark   = "Midnight Neon" : cyan · violet · magenta · lime on deep space
 * ========================================================================= */
:root { color-scheme: light; --t1: #19ce65; --t2: #26a98d; --t3: #f59e0b; }

/* ---- theme toggle (sun / moon switch) */
.theme-toggle {
  position: relative; flex: none; width: 64px; height: 32px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(135deg, #ffd27a, #76eed0 60%, #83f0ab); box-shadow: inset 0 1px 3px rgba(0,0,0,.15), 0 6px 16px -8px rgba(38, 169, 141,.7);
  transition: background .5s var(--ease), box-shadow .5s;
  overflow: hidden;
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; line-height: 1; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .55s var(--ease-spring), background .5s;
}
.theme-toggle .knob::before { content: '\2600\FE0F'; }
.theme-toggle .stars { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.theme-toggle .stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff; }
.theme-toggle .stars i:nth-child(1) { left: 12px; top: 8px; } .theme-toggle .stars i:nth-child(2) { left: 22px; top: 19px; width: 2px; height: 2px; }
.theme-toggle .stars i:nth-child(3) { left: 8px; top: 22px; width: 2px; height: 2px; }
.theme-toggle:hover .knob { transform: rotate(25deg); }
:root[data-theme="dark"] .theme-toggle { background: linear-gradient(135deg, #0f282c, #1f5749 60%, #0e7490); box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 0 18px -4px rgba(34,211,238,.6); }
:root[data-theme="dark"] .theme-toggle .knob { transform: translateX(32px); background: #e0e7ff; }
:root[data-theme="dark"] .theme-toggle:hover .knob { transform: translateX(32px) rotate(-25deg); }
:root[data-theme="dark"] .theme-toggle .knob::before { content: '\1F319'; }
:root[data-theme="dark"] .theme-toggle .stars { opacity: 1; }
/* smooth cross-fade while switching */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, stroke .5s ease !important;
}
#tgrad stop:nth-child(1) { stop-color: var(--t1); } #tgrad stop:nth-child(2) { stop-color: var(--t2); } #tgrad stop:nth-child(3) { stop-color: var(--t3); }

/* =============================== DARK : MIDNIGHT NEON =============================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #59e494; --brand-2: #41d7df; --brand-3: #22d3ee; --brand-dark: #e0e7ff;
  --c-cyan: #22d3ee; --c-amber: #fbbf24; --c-green: #34d399; --c-rose: #fb7185;
  --brand-50: rgba(37, 206, 122, .14); --brand-100: rgba(37, 206, 122, .28); --brand-200: rgba(89, 228, 148, .45);
  --grad: linear-gradient(120deg, #22d3ee 0%, #25ce7a 50%, #41d7df 100%);
  --grad-wide: linear-gradient(90deg, #22d3ee, #25ce7a, #41d7df, #fb7185, #a3e635, #22d3ee);
  --grad-cool: linear-gradient(135deg, #38bdf8 0%, #4bdadf 100%);
  --grad-warm: linear-gradient(135deg, #fb7185 0%, #f59e0b 100%);
  --grad-fresh: linear-gradient(135deg, #a3e635 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(34,211,238,.08) 0%, rgba(37, 206, 122,.10) 50%, rgba(65, 215, 223,.08) 100%);
  --grad-ring: conic-gradient(from var(--ang), #22d3ee, #25ce7a, #41d7df, #a3e635, #22d3ee);
  --ring: 0 0 0 4px rgba(34, 211, 238, .16), 0 0 24px -4px rgba(37, 206, 122, .55);
  --bg: #061416; --surface: #102a2e; --surface-2: #15353a;
  --text: #f0fcfd; --text-2: #a2dfe2; --muted: #529a9f; --line: rgba(103, 218, 236, .14); --line-2: rgba(103, 218, 236, .24);
  --ok: #34d399; --ok-2: #6ee7b7; --ok-bg: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .12);
  --bad: #fb7185; --bad-bg: rgba(251, 113, 133, .13);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --shadow: 0 12px 34px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 28px 70px -14px rgba(0,0,0,.75);
  --t1: #22d3ee; --t2: #25ce7a; --t3: #41d7df;
}
:root[data-theme="dark"] ::selection { background: rgba(34, 211, 238, .3); }

/* background: deep space + neon aurora + starfield */
:root[data-theme="dark"] body { background: radial-gradient(1200px 700px at 10% -10%, #145037 0%, transparent 60%), radial-gradient(1000px 700px at 110% 10%, #072a3d 0%, transparent 55%), linear-gradient(180deg, #061416 0%, #0a2220 60%, #051313 100%) fixed; }
:root[data-theme="dark"] .bg-fx::before {
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.4px), radial-gradient(rgba(165,243,252,.35) 1px, transparent 1.4px);
  background-size: 120px 120px, 190px 190px; background-position: 0 0, 60px 90px;
  mask-image: none; -webkit-mask-image: none; opacity: .5; animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .2; } }
:root[data-theme="dark"] .bg-fx::after {
  background: conic-gradient(from var(--ang), rgba(34,211,238,.20), rgba(37, 206, 122,.22), rgba(65, 215, 223,.18), rgba(163,230,53,.10), rgba(34,211,238,.20));
  opacity: .75;
}
:root[data-theme="dark"] .bg-fx span { opacity: .45; filter: blur(90px); }
:root[data-theme="dark"] .bg-fx span:nth-child(1) { background: #299c7b; }
:root[data-theme="dark"] .bg-fx span:nth-child(2) { background: #237376; }
:root[data-theme="dark"] .bg-fx span:nth-child(3) { background: #0891b2; opacity: .5; }

/* chrome */
:root[data-theme="dark"] .topbar { background: rgba(8, 29, 30, .62); }
:root[data-theme="dark"] .logo { box-shadow: 0 0 20px -2px rgba(34,211,238,.6); }
:root[data-theme="dark"] .logo::before { background: linear-gradient(135deg, #143a3b, #1c503d); }

/* glass cards */
:root[data-theme="dark"] .card, :root[data-theme="dark"] .stat, :root[data-theme="dark"] .pos-card,
:root[data-theme="dark"] .qa, :root[data-theme="dark"] .table-wrap {
  background: rgba(16, 45, 48, .62); border-color: rgba(103, 218, 236, .14);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -18px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] .fx-spot > .fx-glow { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(34, 211, 238, .13), transparent 45%); }
:root[data-theme="dark"] .form-card, :root[data-theme="dark"] .iv-head, :root[data-theme="dark"] .composer,
:root[data-theme="dark"] .mail-compose, :root[data-theme="dark"] .login-card, :root[data-theme="dark"] .card.narrow {
  background: linear-gradient(rgba(12, 36, 38, .92), rgba(12, 36, 38, .92)) padding-box, var(--grad-ring) border-box;
  box-shadow: 0 0 40px -18px rgba(37, 206, 122, .7), 0 24px 50px -20px rgba(0,0,0,.8);
}
:root[data-theme="dark"] .composer:focus-within, :root[data-theme="dark"] .mail-compose:focus-within { box-shadow: 0 0 0 4px rgba(34, 211, 238, .14), 0 0 40px -10px rgba(37, 206, 122, .8); }

/* hero */
:root[data-theme="dark"] .eyebrow { background: linear-gradient(#0d3133, #0d3133) padding-box, var(--grad) border-box; color: #a5f3fc; }
:root[data-theme="dark"] .hero h1 { text-shadow: 0 0 40px rgba(37, 206, 122, .35); }
:root[data-theme="dark"] .chips .chip { box-shadow: 0 0 22px -8px rgba(34, 211, 238, .8), 0 8px 18px -10px rgba(0,0,0,.6); color: #0a2220; }
:root[data-theme="dark"] .chips .chip:nth-child(1) { color: #fff; }
:root[data-theme="dark"] .sparkles i:nth-child(odd) { --c: #22d3ee; } :root[data-theme="dark"] .sparkles i:nth-child(3n) { --c: #41d7df; }
:root[data-theme="dark"] .sparkles i:nth-child(4n) { --c: #a3e635; }

/* buttons */
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .stepper li.active, :root[data-theme="dark"] .tab.active {
  background: linear-gradient(120deg, #06b6d4, #229f6e, #24a5ac, #229f6e, #06b6d4); background-size: 300% 100%; color: #fff;
}
:root[data-theme="dark"] .btn.primary { box-shadow: 0 0 24px -6px rgba(34, 211, 238, .55), 0 10px 26px -10px rgba(36, 165, 172, .7), inset 0 1px 0 rgba(255,255,255,.2); }
:root[data-theme="dark"] .btn.primary:hover:not(:disabled) { box-shadow: 0 0 34px -4px rgba(34, 211, 238, .75), 0 14px 32px -10px rgba(36, 165, 172, .85), inset 0 1px 0 rgba(255,255,255,.25); }
:root[data-theme="dark"] .btn.ghost, :root[data-theme="dark"] .tool-btn { background: rgba(21, 53, 58, .8); color: var(--text); border-color: var(--line-2); }
:root[data-theme="dark"] .btn.ghost:hover:not(:disabled), :root[data-theme="dark"] .tool-btn:hover:not(:disabled) {
  background: linear-gradient(#14363c, #14363c) padding-box, var(--grad) border-box; color: #a5f3fc;
}
:root[data-theme="dark"] .btn.ghost .fx-ripple, :root[data-theme="dark"] .tool-btn .fx-ripple, :root[data-theme="dark"] .tab:not(.active) .fx-ripple { background: rgba(34, 211, 238, .25); }

/* form */
:root[data-theme="dark"] .stepper li { background: rgba(21, 53, 58, .7); }
:root[data-theme="dark"] .stepper li span { background: rgba(103, 218, 236, .16); color: var(--text-2); }
:root[data-theme="dark"] .stepper li.active { box-shadow: 0 0 24px -6px rgba(34, 211, 238, .6); }
:root[data-theme="dark"] .stepper li.active span { background: #fff; color: #229f6e; }
:root[data-theme="dark"] .stepper li.done { background: linear-gradient(135deg, rgba(52,211,153,.14), rgba(34,211,238,.10)); border-color: rgba(52,211,153,.35); color: #6ee7b7; }
:root[data-theme="dark"] .stepper li.done span { background: var(--grad-fresh); color: #062018; }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea, :root[data-theme="dark"] .input { background-color: rgba(8, 29, 32, .7); }
:root[data-theme="dark"] .field input::placeholder, :root[data-theme="dark"] .field textarea::placeholder, :root[data-theme="dark"] .input::placeholder, :root[data-theme="dark"] textarea::placeholder, :root[data-theme="dark"] .mail-row input::placeholder { color: #3b5a5c; }
:root[data-theme="dark"] .field input:hover, :root[data-theme="dark"] .field select:hover, :root[data-theme="dark"] .field textarea:hover, :root[data-theme="dark"] .input:hover { border-color: rgba(103, 218, 236, .4); }
:root[data-theme="dark"] .field input:focus, :root[data-theme="dark"] .field select:focus, :root[data-theme="dark"] .field textarea:focus, :root[data-theme="dark"] .input:focus, :root[data-theme="dark"] textarea:focus { background-color: rgba(10, 36, 40, .95); border-color: #22d3ee; }
:root[data-theme="dark"] .field select, :root[data-theme="dark"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2322d3ee' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
/* focus par `background` shorthand arrow ko reset kar deta tha (light me arrow gayab, dark me zig-zag repeat) */
.field select:focus, select.input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2319ce65' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
:root[data-theme="dark"] select option { background: #102a2e; color: var(--text); }
:root[data-theme="dark"] .composer textarea, :root[data-theme="dark"] .mail-compose textarea, :root[data-theme="dark"] .mail-row input { color: var(--text); background: transparent; }
:root[data-theme="dark"] .dropzone { background: linear-gradient(135deg, rgba(34,211,238,.06), rgba(37, 206, 122,.08), rgba(65, 215, 223,.06)) padding-box, var(--grad-ring) border-box; }
:root[data-theme="dark"] .dropzone:hover, :root[data-theme="dark"] .dropzone.drag { background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(37, 206, 122,.15), rgba(65, 215, 223,.12)) padding-box, var(--grad-ring) border-box; }
:root[data-theme="dark"] .dz-icon { box-shadow: 0 0 30px -6px rgba(34, 211, 238, .7); }
:root[data-theme="dark"] .file-info { background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(34,211,238,.10)); border-color: rgba(52,211,153,.35); }
:root[data-theme="dark"] .instructions { background: linear-gradient(135deg, rgba(34,211,238,.06), rgba(37, 206, 122,.09), rgba(65, 215, 223,.06)); border-color: var(--line-2); }
:root[data-theme="dark"] .instructions li { background: rgba(12, 36, 38, .6); border-color: var(--line); border-left: 4px solid #22d3ee; }
:root[data-theme="dark"] .instructions li:nth-child(3n+2) { border-left-color: #41d7df; }
:root[data-theme="dark"] .instructions li:nth-child(3n) { border-left-color: #a3e635; }
:root[data-theme="dark"] .check input { accent-color: #22d3ee; }
:root[data-theme="dark"] .pos-desc:not(:empty) { border-color: var(--line-2); }

/* interview */
:root[data-theme="dark"] .progress { background: rgba(103, 218, 236, .12); }
:root[data-theme="dark"] .progress-bar { box-shadow: 0 0 16px rgba(34, 211, 238, .7); }
:root[data-theme="dark"] .ai-orb .core { background: radial-gradient(circle at 35% 30%, #22d3ee, #247b5c 60%, #175239); }
:root[data-theme="dark"] .ai-orb { box-shadow: 0 0 26px -6px rgba(34, 211, 238, .7); }
:root[data-theme="dark"] .ai-orb.speaking { box-shadow: 0 0 36px -2px rgba(34, 211, 238, .9), 0 0 24px -6px rgba(65, 215, 223, .8); }
:root[data-theme="dark"] .chat { background: radial-gradient(circle at 0% 0%, rgba(34,211,238,.07), transparent 45%), radial-gradient(circle at 100% 100%, rgba(65, 215, 223,.08), transparent 45%), rgba(10, 31, 34, .7); }
:root[data-theme="dark"] .bubble.ai { background: linear-gradient(135deg, #14383e, #16402c) padding-box, linear-gradient(135deg, rgba(34,211,238,.6), rgba(65, 215, 223,.55)) border-box; color: var(--text); }
:root[data-theme="dark"] .bubble.me { box-shadow: 0 0 22px -8px rgba(34, 211, 238, .7); }
:root[data-theme="dark"] .task-card { background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(37, 206, 122,.12), rgba(65, 215, 223,.08)); border-color: var(--line-2); }
:root[data-theme="dark"] .mail-row:focus-within { background: linear-gradient(90deg, rgba(34,211,238,.08), rgba(37, 206, 122,.06)); }
:root[data-theme="dark"] .mail-view { background: #0d2d30; }
:root[data-theme="dark"] .big-icon.success::after { border-color: rgba(34, 211, 238, .4); }

/* overlays */
:root[data-theme="dark"] .overlay, :root[data-theme="dark"] .modal, :root[data-theme="dark"] .drawer-bg { background: rgba(3, 11, 11, .65); }
:root[data-theme="dark"] .overlay-box, :root[data-theme="dark"] .modal-box { background: linear-gradient(#0f3134, #0f3134) padding-box, var(--grad) border-box; }
:root[data-theme="dark"] .toast { background: linear-gradient(135deg, #1f5749, #247b5c); box-shadow: 0 0 30px -8px rgba(37, 206, 122,.8); }
:root[data-theme="dark"] .toast.ok { background: linear-gradient(135deg, #047857, #0e7490); }
:root[data-theme="dark"] .toast.warn { background: linear-gradient(135deg, #b45309, #1a6b56); }
:root[data-theme="dark"] .toast.error { background: linear-gradient(135deg, #be123c, #217368); }
:root[data-theme="dark"] .chat::-webkit-scrollbar-thumb, :root[data-theme="dark"] .drawer::-webkit-scrollbar-thumb, :root[data-theme="dark"] .table-wrap::-webkit-scrollbar-thumb { background: linear-gradient(#22d3ee, #25ce7a); }

/* admin */
:root[data-theme="dark"] .tabs { background: rgba(16, 45, 48, .7); border-color: var(--line); }
:root[data-theme="dark"] .stat:nth-child(1) { --g: linear-gradient(135deg, #22d3ee, #4bdadf); }
:root[data-theme="dark"] .stat:nth-child(2) { --g: linear-gradient(135deg, #59e494, #41d7df); }
:root[data-theme="dark"] .stat:nth-child(3) { --g: linear-gradient(135deg, #37d7b7, #fb7185); }
:root[data-theme="dark"] .stat:nth-child(4) { --g: linear-gradient(135deg, #a3e635, #34d399); }
:root[data-theme="dark"] .stat:nth-child(5) { --g: linear-gradient(135deg, #38bdf8, #22d3ee); }
:root[data-theme="dark"] .stat:nth-child(6) { --g: linear-gradient(135deg, #fbbf24, #fb7185); }
:root[data-theme="dark"] .stat::after { opacity: .7; filter: blur(4px); }
:root[data-theme="dark"] .stat:hover { box-shadow: 0 0 30px -10px rgba(34, 211, 238, .5); }
:root[data-theme="dark"] table.data th { background: linear-gradient(90deg, #123338, #14402c); color: var(--text-2); }
:root[data-theme="dark"] table.data td { border-bottom-color: rgba(103, 218, 236, .08); }
:root[data-theme="dark"] table.data tbody tr:hover td { background: linear-gradient(90deg, rgba(34,211,238,.06), rgba(37, 206, 122,.05)); }
:root[data-theme="dark"] table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #22d3ee; }
:root[data-theme="dark"] .b-strong { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
:root[data-theme="dark"] .b-hire { background: rgba(163, 230, 53, .14); color: #bef264; }
:root[data-theme="dark"] .b-hold { background: rgba(251, 191, 36, .14); color: #fcd34d; }
:root[data-theme="dark"] .b-reject { background: rgba(251, 113, 133, .15); color: #fda4af; }
:root[data-theme="dark"] .b-blue { background: rgba(34, 211, 238, .14); color: #67e8f9; }
:root[data-theme="dark"] .b-grey { background: rgba(103, 218, 236, .12); color: var(--text-2); }
:root[data-theme="dark"] .scorebar .track { background: rgba(103, 218, 236, .12); }
:root[data-theme="dark"] .drawer { background: linear-gradient(180deg, #0b2628, #0a261b 50%, #071624); }
:root[data-theme="dark"] .drawer-head { background: linear-gradient(120deg, #0e7490, #1c5a44, #1c6164, #1c5a44, #0e7490); background-size: 300% 100%; }
:root[data-theme="dark"] .score-big { background: linear-gradient(135deg, #113539, #134029) padding-box, var(--grad) border-box; }
:root[data-theme="dark"] .kv div { background: linear-gradient(135deg, rgba(34,211,238,.05), rgba(37, 206, 122,.07)); border-color: var(--line); }
:root[data-theme="dark"] .qa .a { border-left-color: #22d3ee; background: linear-gradient(90deg, rgba(34,211,238,.07), rgba(37, 206, 122,.05)); }
:root[data-theme="dark"] .qa .ideal { background: rgba(52, 211, 153, .1); color: #6ee7b7; }
:root[data-theme="dark"] .alert.info { background: linear-gradient(135deg, rgba(34,211,238,.1), rgba(37, 206, 122,.12)); border-color: var(--line-2); color: #b6e4f5; }
:root[data-theme="dark"] .alert.warn { background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(251,113,133,.1)); border-color: rgba(251,191,36,.3); color: #fde68a; }

@media print {
  :root[data-theme="dark"] { color-scheme: light; --text: #0f2927; --text-2: #2b4443; --muted: #435858; --surface: #fff; --surface-2: #fafdfd; --line: #e2efed; --line-2: #c7ddd9; }
  :root[data-theme="dark"] body { background: #fff; }
  .theme-toggle { display: none !important; }
}

/* voice test row */
.voice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 6px; }
.voice-row .check { margin: 0; }
#voiceName:empty { display: none; }

/* =========================================================================
 *  V5 — SHAKTI LEGAL COMPLIANCE INDIA brand
 *  Palette taken from the logo: leaf green #2e9e4f · deep green #1d7a3c · teal #2b98ac · aqua #4cb8c4
 *  Accents: lime #8cc63f · saffron #f2a93b
 *  Light = "Fresh Leaf"  (white / mint / aqua)   ·   Dark = "Forest Night" (deep green-teal)
 * ========================================================================= */
:root {
  --sk-green: #2e9e4f; --sk-green-d: #1d7a3c; --sk-teal: #2b98ac; --sk-aqua: #4cb8c4; --sk-lime: #8cc63f; --sk-saffron: #f2a93b;
  --brand: #238a45; --brand-2: #2b98ac; --brand-3: #8cc63f; --brand-dark: #0f3d2a;
  --brand-50: #eef8f1; --brand-100: #d5eedc; --brand-200: #a9dbb7;
  --grad: linear-gradient(120deg, #1d7a3c 0%, #2e9e4f 45%, #2b98ac 100%);
  --grad-wide: linear-gradient(90deg, #2e9e4f, #2b98ac, #4cb8c4, #8cc63f, #f2a93b, #2e9e4f);
  --grad-cool: linear-gradient(135deg, #2b98ac 0%, #1f6f9a 100%);
  --grad-warm: linear-gradient(135deg, #f2a93b 0%, #e7743c 100%);
  --grad-fresh: linear-gradient(135deg, #8cc63f 0%, #2e9e4f 100%);
  --grad-soft: linear-gradient(135deg, #f1faf4 0%, #f4fbf9 50%, #eef8fb 100%);
  --grad-ring: conic-gradient(from var(--ang), #2e9e4f, #2b98ac, #4cb8c4, #8cc63f, #2e9e4f);
  --ring: 0 0 0 4px rgba(46, 158, 79, .16), 0 0 22px -4px rgba(43, 152, 172, .35);
  --bg: #f3faf6; --text: #0f241b; --text-2: #34493f; --muted: #66796f; --line: #e1ece6; --line-2: #cfe0d6;
  --t1: #2e9e4f; --t2: #2b98ac; --t3: #8cc63f;
}
::selection { background: #cdeed7; }

/* ---- logo in top bar */
.brand { gap: 12px; }
.brand-logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: #fff; box-shadow: 0 6px 18px -8px rgba(29, 122, 60, .55), inset 0 0 0 1px rgba(46, 158, 79, .12);
  transition: transform .4s var(--ease-spring); }
.brand-logo img { height: 30px; width: auto; display: block; filter: drop-shadow(0 2px 3px rgba(29, 122, 60, .25)); }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text #companyName { font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(90deg, #1d7a3c, #2b98ac); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text small { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---- hero logo */
.hero-logo { position: relative; isolation: isolate; width: 92px; height: 92px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 28px; background: #fff; box-shadow: 0 22px 44px -18px rgba(29, 122, 60, .55), inset 0 0 0 1px rgba(46, 158, 79, .14);
  animation: pop .7s var(--ease-spring) both, logoFloat 6s ease-in-out .7s infinite; }
.hero-logo::before { content: ''; position: absolute; inset: -6px; border-radius: 32px; z-index: -1;
  background: var(--grad-ring); animation: auroraSpin 8s linear infinite; opacity: .55; filter: blur(10px); }
.hero-logo img { height: 66px; width: auto; }
@keyframes logoFloat { 50% { transform: translateY(-6px); } }

/* ---- login */
.login-card .brand-lock { background: #fff; box-shadow: 0 16px 34px -14px rgba(29, 122, 60, .6), 0 0 0 4px rgba(46, 158, 79, .1); animation: pop .6s var(--ease-spring) both; }
.login-card .brand-lock img { height: 40px; width: auto; }

/* ---- light theme surfaces */
body { background: radial-gradient(1100px 600px at 0% -10%, #dff3e6 0%, transparent 60%), radial-gradient(900px 600px at 110% 0%, #d9f0f4 0%, transparent 55%), linear-gradient(180deg, #f6fbf8 0%, #f3faf7 50%, #eff8fa 100%) fixed; }
.bg-fx::after { background: conic-gradient(from var(--ang), rgba(46,158,79,.16), rgba(43,152,172,.15), rgba(140,198,63,.12), rgba(76,184,196,.15), rgba(46,158,79,.16)); }
.bg-fx span:nth-child(1) { background: #a8dcb7; } .bg-fx span:nth-child(2) { background: #a6dbe3; } .bg-fx span:nth-child(3) { background: #cfe9a8; }
.bg-fx::before { background-image: radial-gradient(rgba(46, 158, 79, .09) 1px, transparent 1px); }
.topbar { background: rgba(255, 255, 255, .78); }

/* ---- primary actions use the exact brand gradient */
.btn.primary, .stepper li.active, .tab.active {
  background: linear-gradient(120deg, #1d7a3c, #2e9e4f, #2b98ac, #2e9e4f, #1d7a3c); background-size: 300% 100%; color: #fff;
}
.btn.primary { box-shadow: 0 10px 24px -10px rgba(29, 122, 60, .75), 0 4px 12px -6px rgba(43, 152, 172, .5), inset 0 1px 0 rgba(255,255,255,.22); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 16px 32px -12px rgba(29, 122, 60, .85), 0 0 22px -6px rgba(43, 152, 172, .6), inset 0 1px 0 rgba(255,255,255,.25); }
.stepper li.active { box-shadow: 0 10px 22px -10px rgba(29, 122, 60, .7); }
.stepper li.active span { color: var(--sk-green-d); }
.btn.ghost:hover:not(:disabled), .tool-btn:hover:not(:disabled) { color: var(--sk-green-d); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, textarea:focus { border-color: var(--sk-green); }
.check input { accent-color: var(--sk-green); }
.eyebrow { color: var(--sk-green-d); }
.chips .chip:nth-child(1) { background: var(--grad); }
.chips .chip:nth-child(2) { background: linear-gradient(135deg, #f2a93b, #e7743c); }
.chips .chip:nth-child(3) { background: linear-gradient(135deg, #2b98ac, #1f6f9a); }
.chips .chip:nth-child(4) { background: linear-gradient(135deg, #8cc63f, #2e9e4f); }
.sparkles i:nth-child(odd) { --c: #2e9e4f; } .sparkles i:nth-child(3n) { --c: #2b98ac; } .sparkles i:nth-child(4n) { --c: #8cc63f; } .sparkles i:nth-child(5) { --c: #f2a93b; }
.instructions li { border-left-color: var(--sk-green); }
.instructions li:nth-child(3n+2) { border-left-color: var(--sk-teal); }
.instructions li:nth-child(3n) { border-left-color: var(--sk-saffron); }
.bubble.me { background: var(--grad); }
.ai-orb .core { background: radial-gradient(circle at 35% 30%, #4cb8c4, #2e9e4f 55%, #1d7a3c); }
.logo::before { background: var(--grad); }
.toast { background: linear-gradient(135deg, #0f3d2a, #1d6b5a); }
.drawer-head { background: linear-gradient(120deg, #0f3d2a, #1d7a3c, #1f6f8a, #1d7a3c, #0f3d2a); background-size: 300% 100%; }
.sec-title { background: linear-gradient(90deg, #1d7a3c, #2b98ac); -webkit-background-clip: text; background-clip: text; }
.stat:nth-child(1) { --g: linear-gradient(135deg, #1d7a3c, #2e9e4f); }
.stat:nth-child(2) { --g: linear-gradient(135deg, #2b98ac, #1f6f9a); }
.stat:nth-child(3) { --g: linear-gradient(135deg, #2e9e4f, #2b98ac); }
.stat:nth-child(4) { --g: linear-gradient(135deg, #8cc63f, #2e9e4f); }
.stat:nth-child(5) { --g: linear-gradient(135deg, #4cb8c4, #2b98ac); }
.stat:nth-child(6) { --g: linear-gradient(135deg, #f2a93b, #e7743c); }
table.data th { background: linear-gradient(90deg, #eef8f1, #ecf7f9); }
table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--sk-green); }
.qa .a { border-left-color: var(--sk-green); }
.b-blue { background: linear-gradient(135deg, #e3f3f6, #e6f5ea); color: #1f6f7d; }
.alert.info { color: #1d5f46; }

/* =============================== DARK : FOREST NIGHT =============================== */
:root[data-theme="dark"] {
  --brand: #5fd28a; --brand-2: #4cc6d4; --brand-3: #a6d96a; --brand-dark: #e3f6ea;
  --brand-50: rgba(46, 158, 79, .14); --brand-100: rgba(46, 158, 79, .28); --brand-200: rgba(95, 210, 138, .45);
  --grad: linear-gradient(120deg, #3cb96a 0%, #2fa7b8 100%);
  --grad-wide: linear-gradient(90deg, #5fd28a, #4cc6d4, #a6d96a, #f2b45a, #5fd28a);
  --grad-cool: linear-gradient(135deg, #4cc6d4 0%, #2a87b8 100%);
  --grad-warm: linear-gradient(135deg, #f2b45a 0%, #e7843f 100%);
  --grad-fresh: linear-gradient(135deg, #a6d96a 0%, #3cb96a 100%);
  --grad-soft: linear-gradient(135deg, rgba(60,185,106,.08) 0%, rgba(47,167,184,.09) 100%);
  --grad-ring: conic-gradient(from var(--ang), #5fd28a, #4cc6d4, #a6d96a, #2fa7b8, #5fd28a);
  --ring: 0 0 0 4px rgba(95, 210, 138, .16), 0 0 24px -4px rgba(76, 198, 212, .5);
  --bg: #051410; --surface: #0b1f19; --surface-2: #10291f;
  --text: #eaf6ef; --text-2: #c0d8cb; --muted: #86a597; --line: rgba(140, 220, 170, .13); --line-2: rgba(140, 220, 170, .22);
  --t1: #5fd28a; --t2: #4cc6d4; --t3: #a6d96a;
}
:root[data-theme="dark"] ::selection { background: rgba(95, 210, 138, .3); }
:root[data-theme="dark"] body { background: radial-gradient(1200px 700px at 5% -10%, #0f3a25 0%, transparent 60%), radial-gradient(1000px 700px at 110% 5%, #0a3340 0%, transparent 55%), linear-gradient(180deg, #04100c 0%, #061712 55%, #041014 100%) fixed; }
:root[data-theme="dark"] .bg-fx::after { background: conic-gradient(from var(--ang), rgba(46,158,79,.20), rgba(43,152,172,.20), rgba(140,198,63,.12), rgba(76,184,196,.18), rgba(46,158,79,.20)); }
:root[data-theme="dark"] .bg-fx::before { background-image: radial-gradient(rgba(220,255,235,.45) 1px, transparent 1.4px), radial-gradient(rgba(160,240,250,.3) 1px, transparent 1.4px); }
:root[data-theme="dark"] .bg-fx span:nth-child(1) { background: #1d7a3c; } :root[data-theme="dark"] .bg-fx span:nth-child(2) { background: #1f6f8a; } :root[data-theme="dark"] .bg-fx span:nth-child(3) { background: #4d7a1f; }
:root[data-theme="dark"] .topbar { background: rgba(5, 20, 16, .7); }
:root[data-theme="dark"] .brand-logo, :root[data-theme="dark"] .hero-logo, :root[data-theme="dark"] .login-card .brand-lock {
  background: rgba(255, 255, 255, .95); box-shadow: 0 0 26px -6px rgba(95, 210, 138, .6), inset 0 0 0 1px rgba(255,255,255,.4); }
:root[data-theme="dark"] .brand-text #companyName { background: linear-gradient(90deg, #7be0a0, #6fd3df); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .stat, :root[data-theme="dark"] .pos-card,
:root[data-theme="dark"] .qa, :root[data-theme="dark"] .table-wrap { background: rgba(11, 31, 25, .66); border-color: var(--line); }
:root[data-theme="dark"] .form-card, :root[data-theme="dark"] .iv-head, :root[data-theme="dark"] .composer,
:root[data-theme="dark"] .mail-compose, :root[data-theme="dark"] .login-card, :root[data-theme="dark"] .card.narrow {
  background: linear-gradient(rgba(7, 24, 19, .93), rgba(7, 24, 19, .93)) padding-box, var(--grad-ring) border-box;
  box-shadow: 0 0 40px -18px rgba(95, 210, 138, .55), 0 24px 50px -20px rgba(0,0,0,.8); }
:root[data-theme="dark"] .fx-spot > .fx-glow { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(95, 210, 138, .12), transparent 45%); }
:root[data-theme="dark"] .eyebrow { background: linear-gradient(#0a2219, #0a2219) padding-box, var(--grad) border-box; color: #a7ecc0; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .stepper li.active, :root[data-theme="dark"] .tab.active {
  background: linear-gradient(120deg, #1f8a48, #2fae5e, #2696a8, #2fae5e, #1f8a48); background-size: 300% 100%; color: #fff; }
:root[data-theme="dark"] .btn.primary { box-shadow: 0 0 24px -6px rgba(95, 210, 138, .55), 0 10px 26px -10px rgba(43, 152, 172, .7), inset 0 1px 0 rgba(255,255,255,.18); }
:root[data-theme="dark"] .stepper li.active span { color: #1d7a3c; }
:root[data-theme="dark"] .btn.ghost, :root[data-theme="dark"] .tool-btn { background: rgba(16, 41, 31, .8); }
:root[data-theme="dark"] .btn.ghost:hover:not(:disabled), :root[data-theme="dark"] .tool-btn:hover:not(:disabled) {
  background: linear-gradient(#0f271e, #0f271e) padding-box, var(--grad) border-box; color: #a7ecc0; }
:root[data-theme="dark"] .stepper li { background: rgba(16, 41, 31, .7); }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea, :root[data-theme="dark"] .input { background-color: rgba(4, 16, 12, .75); }
:root[data-theme="dark"] .field input:focus, :root[data-theme="dark"] .field select:focus, :root[data-theme="dark"] .field textarea:focus, :root[data-theme="dark"] .input:focus, :root[data-theme="dark"] textarea:focus { background-color: rgba(5, 20, 15, .95); border-color: #5fd28a; }
:root[data-theme="dark"] .field select, :root[data-theme="dark"] select.input, :root[data-theme="dark"] .field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235fd28a' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.field select:focus, select.input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%232e9e4f' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] select option { background: #0b1f19; }
:root[data-theme="dark"] .check input { accent-color: #5fd28a; }
:root[data-theme="dark"] .instructions li { background: rgba(5, 20, 15, .6); border-left-color: #5fd28a; }
:root[data-theme="dark"] .instructions li:nth-child(3n+2) { border-left-color: #4cc6d4; }
:root[data-theme="dark"] .instructions li:nth-child(3n) { border-left-color: #f2b45a; }
:root[data-theme="dark"] .chips .chip { color: #fff; }
:root[data-theme="dark"] .chip:nth-child(4) { color: #06231a; }
:root[data-theme="dark"] .chat { background: radial-gradient(circle at 0% 0%, rgba(95,210,138,.07), transparent 45%), radial-gradient(circle at 100% 100%, rgba(76,198,212,.08), transparent 45%), rgba(5, 18, 14, .72); }
:root[data-theme="dark"] .bubble.ai { background: linear-gradient(135deg, #0e2a20, #0c2529) padding-box, linear-gradient(135deg, rgba(95,210,138,.55), rgba(76,198,212,.55)) border-box; }
:root[data-theme="dark"] .ai-orb .core { background: radial-gradient(circle at 35% 30%, #4cc6d4, #2e9e4f 55%, #134d28); }
:root[data-theme="dark"] .ai-orb { box-shadow: 0 0 26px -6px rgba(95, 210, 138, .7); }
:root[data-theme="dark"] .mail-view { background: #08191a; }
:root[data-theme="dark"] .overlay-box, :root[data-theme="dark"] .modal-box { background: linear-gradient(#0a1f19, #0a1f19) padding-box, var(--grad) border-box; }
:root[data-theme="dark"] .toast { background: linear-gradient(135deg, #14532d, #155e63); box-shadow: 0 0 30px -8px rgba(95,210,138,.6); }
:root[data-theme="dark"] .tabs { background: rgba(11, 31, 25, .72); }
:root[data-theme="dark"] .stat:nth-child(1) { --g: linear-gradient(135deg, #5fd28a, #3cb96a); }
:root[data-theme="dark"] .stat:nth-child(2) { --g: linear-gradient(135deg, #4cc6d4, #2a87b8); }
:root[data-theme="dark"] .stat:nth-child(3) { --g: linear-gradient(135deg, #7be0a0, #4cc6d4); }
:root[data-theme="dark"] .stat:nth-child(4) { --g: linear-gradient(135deg, #a6d96a, #5fd28a); }
:root[data-theme="dark"] .stat:nth-child(5) { --g: linear-gradient(135deg, #6fd3df, #4cc6d4); }
:root[data-theme="dark"] .stat:nth-child(6) { --g: linear-gradient(135deg, #f2b45a, #e7843f); }
:root[data-theme="dark"] table.data th { background: linear-gradient(90deg, #0c241c, #0b2226); }
:root[data-theme="dark"] table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #5fd28a; }
:root[data-theme="dark"] .drawer { background: linear-gradient(180deg, #06160f, #061512 50%, #05141a); }
:root[data-theme="dark"] .drawer-head { background: linear-gradient(120deg, #0f3d2a, #1d7a3c, #1f6f8a, #1d7a3c, #0f3d2a); background-size: 300% 100%; }
:root[data-theme="dark"] .score-big { background: linear-gradient(135deg, #0b241b, #0a2226) padding-box, var(--grad) border-box; }
:root[data-theme="dark"] .qa .a { border-left-color: #5fd28a; }
:root[data-theme="dark"] .sec-title { background: linear-gradient(90deg, #7be0a0, #6fd3df); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="dark"] .alert.info { color: #c4ecd4; }
:root[data-theme="dark"] .b-blue { background: rgba(76, 198, 212, .14); color: #8fe3ec; }

@media (max-width: 700px) {
  .brand-text small { display: none; }
  .brand-logo { width: 36px; height: 36px; } .brand-logo img { height: 27px; }
  .hero-logo { width: 76px; height: 76px; border-radius: 24px; } .hero-logo img { height: 54px; }
}

/* ---- Admin button (candidate page top bar) */
.admin-link {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px;
  border-radius: 999px; font-size: 13.5px; font-weight: 700; text-decoration: none !important; color: var(--sk-green-d);
  border: 1.5px solid transparent; overflow: hidden; isolation: isolate;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #1d7a3c, #2e9e4f, #2b98ac) border-box;
  box-shadow: 0 6px 16px -10px rgba(29, 122, 60, .7);
  transition: transform .25s var(--ease-spring), box-shadow .25s, color .25s;
}
.admin-link::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: linear-gradient(120deg, #1d7a3c, #2e9e4f, #2b98ac);
}
.admin-link:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(29, 122, 60, .9), 0 0 18px -6px rgba(43, 152, 172, .7); }
.admin-link:hover::before { opacity: 1; }
.admin-link:active { transform: scale(.96); }
.admin-link .ic { font-size: 14px; line-height: 1; transition: transform .35s var(--ease-spring); }
.admin-link:hover .ic { transform: rotate(-12deg) scale(1.12); }
:root[data-theme="dark"] .admin-link {
  color: #a7ecc0;
  background: linear-gradient(rgba(10, 34, 25, .9), rgba(10, 34, 25, .9)) padding-box, linear-gradient(120deg, #5fd28a, #4cc6d4) border-box;
  box-shadow: 0 0 18px -8px rgba(95, 210, 138, .8);
}
:root[data-theme="dark"] .admin-link::before { background: linear-gradient(120deg, #1f8a48, #2fae5e, #2696a8); }
:root[data-theme="dark"] .admin-link:hover { color: #fff; }
/* interview chalte waqt chhupa do */
body.in-interview .admin-link { display: none; }
@media (max-width: 480px) { .admin-link { padding: 0 11px; } .admin-link .tx { display: none; } }
