/* ==========================================================================
   SpecJobs enhancement layer
   Loaded AFTER style.css. Uses the existing colour variables, so the
   original palette, fonts and layout are unchanged — this only adds motion,
   new components and polish.
   ========================================================================== */

:root {
  --sj-ease: cubic-bezier(.22, 1, .36, 1);
  --sj-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --sj-green: #087f5b;
  --sj-green-2: #0b9b70;
  --sj-ring-track: #e4efe8;
}

/* ---------- Keyframes ---------------------------------------------------- */
@keyframes sjFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sjFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sjScaleIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sjSlideInRight { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sjPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes sjShimmer { from { background-position: -460px 0; } to { background-position: 460px 0; } }
@keyframes sjPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(8, 127, 91, .45); } 70% { box-shadow: 0 0 0 8px rgba(8, 127, 91, 0); } }
@keyframes sjSpin { to { transform: rotate(360deg); } }
@keyframes sjFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sjToastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sjToastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes sjConfetti { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; } 100% { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); opacity: .9; } }
@keyframes sjRing { from { --sj-p: 0; } }
@keyframes sjCaret { 50% { border-color: transparent; } }
@keyframes sjWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes sjGradient { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

@property --sj-p { syntax: '<number>'; inherits: false; initial-value: 0; }

/* ---------- Page-load motion -------------------------------------------- */
.hero-animate .hero-badge { animation: sjFadeUp .7s var(--sj-ease) both; }
.hero-animate h1 { animation: sjFadeUp .8s var(--sj-ease) .08s both; }
.hero-animate .hero-content > p { animation: sjFadeUp .8s var(--sj-ease) .18s both; }
.hero-animate .search-bar { animation: sjScaleIn .8s var(--sj-ease) .28s both; }
.hero-animate .hero-actions { animation: sjFadeUp .8s var(--sj-ease) .38s both; }
.hero-animate .highlight { background: linear-gradient(90deg, var(--primary), #19b884, var(--primary)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sjGradient 6s linear infinite; }
.search-bar:focus-within { box-shadow: 0 0 0 4px rgba(8, 127, 91, .12), var(--shadow-lg); transition: box-shadow .3s var(--sj-ease); }

.auth-animate { animation: sjScaleIn .55s var(--sj-ease) both; }
.auth-animate .logo-icon { animation: sjFloat 4s ease-in-out 1s infinite; }
.dashboard-content > .dashboard-header { animation: sjFadeUp .5s var(--sj-ease) both; }
.dashboard-content .stats-grid > * { animation: sjFadeUp .55s var(--sj-ease) both; }
.dashboard-content .stats-grid > *:nth-child(2) { animation-delay: .06s; }
.dashboard-content .stats-grid > *:nth-child(3) { animation-delay: .12s; }
.dashboard-content .stats-grid > *:nth-child(4) { animation-delay: .18s; }

/* Staggered cards (job grids, company grids) */
.stagger > * { animation: sjFadeUp .55s var(--sj-ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s } .stagger > *:nth-child(2) { animation-delay: .07s }
.stagger > *:nth-child(3) { animation-delay: .12s } .stagger > *:nth-child(4) { animation-delay: .17s }
.stagger > *:nth-child(5) { animation-delay: .22s } .stagger > *:nth-child(6) { animation-delay: .27s }
.stagger > *:nth-child(7) { animation-delay: .32s } .stagger > *:nth-child(8) { animation-delay: .37s }
.stagger > *:nth-child(n+9) { animation-delay: .42s }
.companies-grid > * { animation: sjFadeUp .55s var(--sj-ease) both; }
.companies-grid > *:nth-child(2n) { animation-delay: .06s } .companies-grid > *:nth-child(3n) { animation-delay: .12s }

/* Scroll reveal for new elements (only when JS is running, so nothing is ever hidden without JS) */
.sj-js [data-reveal]:not(.reveal-on-scroll) { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--sj-ease), transform .6s var(--sj-ease); transition-delay: var(--d, 0ms); }
.sj-js [data-reveal]:not(.reveal-on-scroll).is-visible { opacity: 1; transform: none; }

/* Job card micro-interactions */
.job-card { transition: transform .35s var(--sj-ease), box-shadow .35s var(--sj-ease), border-color .35s; will-change: transform; }
.job-card:hover { transform: translateY(-4px); }
.job-card:active { transform: translateY(-1px) scale(.995); }
.job-card .company-logo { transition: transform .4s var(--sj-ease-spring); }
.job-card:hover .company-logo { transform: scale(1.06) rotate(-2deg); }
.job-card .match-badge { position: static; align-self: flex-start; }
.dashboard-header h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; margin-bottom: 6px; }
.dashboard-header { gap: 16px; flex-wrap: wrap; }
.new-pill { display: inline-block; vertical-align: 1px; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--primary); padding: 3px 8px; border-radius: 999px; animation: sjPulse 2.4s ease-out 3; }

/* Buttons */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn .sj-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: sjRippleAnim .6s ease-out forwards; pointer-events: none; }
.btn-ghost .sj-ripple, .btn-secondary .sj-ripple { background: rgba(8, 127, 91, .15); }
@keyframes sjRippleAnim { to { transform: scale(2.6); opacity: 0; } }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .6); border-top-color: #fff; border-radius: 50%; animation: sjSpin .7s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: rgba(8, 127, 91, .25); border-top-color: var(--primary); }
.inline-action { display: inline-flex; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }

/* Save job */
.save-btn.saved, [data-save-job].saved { color: var(--primary); }
[data-save-job].pop svg { animation: sjPop .45s var(--sj-ease-spring); }

/* ---------- Skeleton loading -------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: #eef2ef; border-radius: 10px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); background-size: 460px 100%; animation: sjShimmer 1.2s linear infinite; }
.skeleton-card { height: 210px; border-radius: var(--radius-lg); }
[data-live-results].is-loading { position: relative; }
[data-live-results].is-loading .jobs-grid { opacity: .45; filter: saturate(.6); transition: opacity .2s; pointer-events: none; }
[data-live-results].is-loading::before { content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 300px 100%; animation: sjShimmer 1s linear infinite; border-radius: 3px; z-index: 2; }

/* ---------- Search suggestions ------------------------------------------ */
.sj-suggest-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.sj-suggest-wrap > input { width: 100%; }
.sj-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; list-style: none; margin: 0; animation: sjScaleIn .18s var(--sj-ease) both; max-height: 320px; overflow: auto; text-align: left; }
.sj-suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: .92rem; color: var(--text-primary); }
.sj-suggest li small { color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.sj-suggest li[aria-selected="true"], .sj-suggest li:hover { background: var(--primary-light); color: var(--primary-hover); }
.sj-suggest mark { background: none; color: var(--primary); font-weight: 650; }

/* ---------- Toasts ------------------------------------------------------- */
.toast-stack { position: fixed; z-index: 9999; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.sj-toast { pointer-events: auto; min-width: 240px; max-width: 360px; background: #17211d; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 14px 40px rgba(10, 30, 20, .25); display: flex; gap: 10px; align-items: center; font-size: .92rem; animation: sjToastIn .35s var(--sj-ease) both; }
.sj-toast.out { animation: sjToastOut .3s ease forwards; }
.sj-toast .t-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); flex-shrink: 0; font-size: .75rem; }
.sj-toast.error .t-icon { background: var(--danger); }
.alert { animation: sjFadeUp .4s var(--sj-ease) both; }
.alert-sticky { animation: none; }

/* ---------- Navbar bell -------------------------------------------------- */
.nav-bell { position: relative; padding-left: 10px !important; padding-right: 10px !important; }
.nav-bell:hover svg { animation: sjWiggle .5s ease; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; animation: sjPop .5s var(--sj-ease-spring) .4s both; }
.sidebar-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }

/* Email verification banner */
.verify-banner { background: linear-gradient(90deg, #fff8e6, #fff3d6); border-bottom: 1px solid #f3e0ae; font-size: .9rem; margin-top: 14px; }
.verify-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.verify-banner form { margin: 0; }

/* ---------- Dialogs & drawers ------------------------------------------- */
.sj-dialog { border: 0; padding: 0; border-radius: 22px; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px rgba(10, 30, 20, .25); color: var(--text-primary); background: #fff; }
.sj-dialog[open] { animation: sjScaleIn .3s var(--sj-ease) both; }
.sj-dialog::backdrop { background: rgba(14, 26, 20, .45); backdrop-filter: blur(3px); animation: sjFadeIn .2s ease both; }
.sj-dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100%); border-radius: 22px 0 0 22px; }
.sj-dialog.drawer[open] { animation: sjSlideInRight .35s var(--sj-ease) both; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 14px; border-bottom: 1px solid var(--border-light); position: sticky; top: 0; background: #fff; z-index: 1; }
.dialog-head h3 { font-size: 1.2rem; margin: 0 0 2px; font-family: var(--font-sans); letter-spacing: -.01em; font-weight: 650; }
.dialog-body { padding: 18px 24px 26px; }
.dialog-body h5 { margin: 16px 0 6px; font-size: .9rem; }
.dialog-close { border: 0; background: var(--bg-light); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--text-secondary); transition: transform .2s, background .2s; flex-shrink: 0; }
.dialog-close:hover { transform: rotate(90deg); background: var(--primary-light); color: var(--primary); }
.drawer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--bg-cream); border-radius: 14px; padding: 14px; }
.drawer-grid > div { min-width: 0; overflow-wrap: anywhere; }
.ai-summary { margin-top: 18px; border: 1px dashed #bfe3d2; background: linear-gradient(180deg, #f6fcf9, #fff); border-radius: 14px; padding: 14px; }
.ai-summary-body:empty { display: none; }
.ai-summary-body { margin-top: 10px; animation: sjFadeIn .4s ease; }
.ai-summary-body ul { padding-left: 18px; margin: 4px 0 10px; }
.ai-summary-body h4, .ai-summary-body strong { font-size: .9rem; }
.ai-panel { background: var(--bg-cream); border: 1px dashed #bfe3d2; border-radius: 14px; padding: 14px; margin-bottom: 18px; animation: sjFadeUp .3s var(--sj-ease); }
.ai-btn { white-space: nowrap; }
.ai-fill { animation: sjAiFill 1.2s ease; }
@keyframes sjAiFill { 0% { background: #e6f7ef; } 100% { background: #fff; } }

/* ---------- Dropzone ----------------------------------------------------- */
.dropzone { position: relative; border: 2px dashed #cfe2d7; border-radius: 16px; padding: 22px; text-align: center; background: #fbfdfc; transition: border-color .2s, background .2s, transform .2s; cursor: pointer; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-light); transform: scale(1.01); }
.dropzone.has-file { border-style: solid; border-color: var(--primary); }
.dropzone-label { color: var(--text-secondary); font-size: .92rem; pointer-events: none; }
.dropzone-file { margin-top: 8px; font-weight: 600; color: var(--primary); pointer-events: none; }
.dropzone-file:empty { display: none; }
.resume-on-file { background: var(--primary-light); color: var(--primary-hover); border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin-bottom: 12px; }
.profile-photo-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary-light); }

/* ---------- Profile strength ring --------------------------------------- */
.strength-card .card-body, .match-card .card-body { display: flex; gap: 22px; align-items: center; }
.strength-ring { --size: 96px; width: var(--size); height: var(--size); border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--sj-p) * 1%), var(--sj-ring-track) 0); --sj-p: var(--p); animation: sjRing 1.4s var(--sj-ease) both; position: relative; }
.strength-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.strength-ring span { position: relative; font-weight: 700; font-size: 1.3rem; color: var(--primary-hover); }
.strength-ring.small { --size: 70px; }
.strength-ring.small span { font-size: 1rem; }
.strength-ring.small::before { inset: 7px; }
.strength-tips { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.strength-tips li { font-size: .9rem; color: var(--text-secondary); display: flex; gap: 8px; align-items: baseline; }
.tip-gain { font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 1px 7px; border-radius: 999px; flex-shrink: 0; }
.suggest-card { border-color: #bfe3d2; background: linear-gradient(180deg, #f6fcf9, #fff); }
.skill-chip { cursor: pointer; border: 1px dashed #9fd4bc; background: #fff; transition: all .2s var(--sj-ease); font: inherit; font-size: .85rem; }
.skill-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }
.skill-chip.added { background: var(--primary-light); color: var(--primary-hover); border-style: solid; pointer-events: none; }
.tag-match { background: var(--primary-light) !important; color: var(--primary-hover) !important; }
.tag-miss { background: #f6f3ee !important; color: var(--text-muted) !important; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .2); }
.match-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: hsl(calc(var(--m) * 1.2), 55%, 28%); background: hsl(calc(var(--m) * 1.2), 60%, 92%); }

/* ---------- Application tracker (stepper) ------------------------------- */
.app-tracker-list { display: grid; gap: 14px; }
.app-track .card-body { padding: 18px 20px; }
.app-track-head { display: flex; gap: 14px; align-items: center; }
.app-track-head a { color: var(--text-primary); }
.app-track-head a:hover { color: var(--primary); }
.app-track-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.stepper { list-style: none; display: flex; padding: 0; margin: 18px 0 10px; counter-reset: s; }
.step { flex: 1; position: relative; text-align: center; font-size: .78rem; color: var(--text-muted); }
.step::before { content: ''; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--sj-ring-track); z-index: 0; }
.step:first-child::before { display: none; }
.step-done::before, .step-current::before, .step-stopped::before { background: var(--primary); }
.sj-js .step::before { transform-origin: left; animation: sjGrow .6s var(--sj-ease) both; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes sjGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 3px solid var(--sj-ring-track); font-size: .72rem; font-weight: 700; color: #fff; transition: all .3s; }
.step-done .step-dot { background: var(--primary); border-color: var(--primary); }
.step-current .step-dot { border-color: var(--primary); background: #fff; animation: sjPulse 2s ease-out infinite; }
.step-current .step-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.step-current .step-label { color: var(--primary-hover); font-weight: 650; }
.step-done .step-label { color: var(--text-secondary); }
.step-stopped .step-dot { background: var(--danger); border-color: var(--danger); }
.step-stopped .step-label { color: var(--danger); font-weight: 600; }
.is-rejected .step-todo { opacity: .45; }

/* ---------- Kanban pipeline --------------------------------------------- */
.view-toggle { display: inline-flex; background: var(--bg-light); padding: 4px; border-radius: 12px; gap: 2px; }
.view-toggle a { padding: 7px 14px; border-radius: 9px; font-size: .88rem; color: var(--text-secondary); text-decoration: none; font-weight: 550; }
.view-toggle a.active { background: #fff; color: var(--primary-hover); box-shadow: var(--shadow-sm); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
.kanban-col { background: var(--bg-cream); border: 1px solid var(--border-light); border-radius: 18px; padding: 12px; min-height: 340px; scroll-snap-align: start; transition: background .2s, border-color .2s; display: flex; flex-direction: column; }
.kanban-col header { font-weight: 650; font-size: .9rem; display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; }
.kanban-count { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 9px; font-size: .78rem; color: var(--text-muted); border: 1px solid var(--border-light); }
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.dot-applied { background: #8b9b93 } .dot-viewed { background: #e5a100 } .dot-shortlisted { background: #0b9b70 } .dot-interview { background: #3182ce } .dot-hired { background: #087f5b } .dot-rejected { background: #e53e3e }
.kanban-list { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 60px; }
.kanban-col.is-over { background: var(--primary-light); border-color: #9fd4bc; }
.kanban-card { background: #fff; border: 1px solid var(--border-light); border-radius: 14px; padding: 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: transform .2s var(--sj-ease), box-shadow .2s; animation: sjFadeUp .35s var(--sj-ease) both; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kanban-card.is-dragging { opacity: .5; transform: rotate(2deg) scale(1.02); cursor: grabbing; }
.kanban-card.just-moved { animation: sjPop .4s var(--sj-ease-spring); }
.kanban-name { font-weight: 650; font-size: .93rem; }
.kanban-meta { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.kanban-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }
.kanban-move { border: 1px solid var(--border); border-radius: 8px; font-size: .78rem; padding: 4px 6px; background: #fff; color: var(--text-secondary); max-width: 110px; }

/* Status tabs */
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.status-tabs a { padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: .85rem; color: var(--text-secondary); text-decoration: none; transition: all .2s; }
.status-tabs a span { margin-left: 4px; font-size: .75rem; color: var(--text-muted); }
.status-tabs a.active, .status-tabs a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.status-tabs a.active span, .status-tabs a:hover span { color: rgba(255, 255, 255, .8); }

/* ---------- Admin -------------------------------------------------------- */
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-filters .form-control { width: auto; min-width: 160px; flex: 0 1 auto; }
.admin-filters input[type=search] { flex: 1 1 240px; }
.bulk-bar { display: none; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; background: #17211d; color: #fff; border-radius: 14px; animation: sjFadeUp .25s var(--sj-ease); }
.bulk-bar.show { display: flex; }
.bulk-bar span { margin-right: auto; font-size: .9rem; }
.todo-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.todo-item { background: #fff8e6; border: 1px solid #f3e0ae; color: #7a5600; padding: 10px 14px; border-radius: 12px; text-decoration: none; font-size: .92rem; transition: transform .2s; }
.todo-item:hover { transform: translateY(-1px); }
.todo-danger { background: #fdecec; border-color: #f5c2c2; color: #9b1c1c; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.chart-card h4 { font-size: 1rem; }
.chart-total { font-weight: 700; color: var(--primary-hover); }
.chart-total small { font-weight: 400; color: var(--text-muted); font-size: .75rem; }
.mini-chart { width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.mini-chart rect { fill: var(--primary); opacity: .85; transform-origin: bottom; transform-box: fill-box; animation: sjBar .8s var(--sj-ease) both; transition: opacity .2s; }
.mini-chart rect:hover { opacity: 1; fill: var(--primary-hover); }
.mini-chart .axis { stroke: var(--border); }
.mini-chart text { font-size: 11px; fill: var(--text-muted); }
@keyframes sjBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 48px; gap: 10px; align-items: center; margin: 9px 0; font-size: .88rem; }
.funnel-row strong { text-align: right; }
.funnel-track { height: 10px; background: var(--sj-ring-track); border-radius: 999px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; background: var(--primary); transform-origin: left; animation: sjGrow 1s var(--sj-ease) both; }
.funnel-viewed { background: #e5a100 } .funnel-interview { background: #3182ce } .funnel-rejected { background: #e53e3e } .funnel-applied { background: #8b9b93 }
.verified-badge { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 999px; vertical-align: middle; letter-spacing: .01em; font-family: var(--font-sans); }

/* ---------- Job page ----------------------------------------------------- */
.breadcrumbs { font-size: .85rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.share-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.share-btn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: .78rem; color: var(--text-secondary); text-decoration: none; cursor: pointer; transition: all .2s; font-family: inherit; }
.share-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.report-link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--text-muted); font-size: .8rem; cursor: pointer; text-align: center; width: 100%; font-family: inherit; }
.report-link:hover { color: var(--danger); }
.similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.similar-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border-light); background: #fff; border-radius: 16px; text-decoration: none; color: inherit; transition: transform .25s var(--sj-ease), box-shadow .25s; }
.similar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.applied-pop { animation: sjPop .6s var(--sj-ease-spring) .2s both; }
.apply-card .btn-primary.btn-lg:not(:disabled) { box-shadow: 0 10px 24px rgba(8, 127, 91, .25); }
.job-tags a.job-tag { text-decoration: none; transition: background .2s, color .2s; }
.job-tags a.job-tag:hover { background: var(--primary); color: #fff; }
.text-danger { color: var(--danger) !important; }
.alert-cta { margin-bottom: 8px; }

/* Mobile apply bar (job page) */
.mobile-apply-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; gap: 10px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 254, 250, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--border-light); box-shadow: 0 -8px 24px rgba(10, 30, 20, .08); animation: sjFadeUp .4s var(--sj-ease) .3s both; }
.mobile-apply-bar .btn { flex: 1; }
.mobile-apply-bar .mab-salary { font-weight: 700; font-size: .92rem; white-space: nowrap; }
.page-job { padding-bottom: 0; }

/* Confetti */
.sj-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.sj-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: sjConfetti var(--t) cubic-bezier(.2, .6, .4, 1) var(--delay) forwards; }

/* ---------- Interviews --------------------------------------------------- */
.interview-list { display: grid; gap: 12px; margin-top: 10px; }
.interview-list.muted { opacity: .75; }
.interview-card { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--border-light); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-sm); animation: sjFadeUp .4s var(--sj-ease) both; }
.interview-card.status-cancelled { opacity: .6; }
.iv-date { width: 64px; flex-shrink: 0; text-align: center; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.iv-month { display: block; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: 3px 0; letter-spacing: .06em; }
.iv-day { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.2; padding-top: 4px; }
.iv-dow { display: block; font-size: .7rem; color: var(--text-muted); padding-bottom: 5px; }
.iv-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.iv-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.interview-banner { background: linear-gradient(90deg, #eaf4ff, #f3f9ff); border: 1px solid #cfe3fa; border-radius: 14px; padding: 12px 16px; font-size: .93rem; }

/* ---------- Company page ------------------------------------------------- */
.company-hero { background: radial-gradient(1000px 300px at 10% -20%, #dff3e9 0%, transparent 60%), linear-gradient(180deg, #f6faf7, #faf9f6); padding: 70px 0 34px; border-bottom: 1px solid var(--border-light); }
.company-hero-inner { display: flex; gap: 22px; align-items: center; }
.company-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 8px; }
.company-logo-xl { width: 96px !important; height: 96px !important; font-size: 2.2rem !important; border-radius: 24px !important; flex-shrink: 0; box-shadow: var(--shadow-md); background: #fff; }
.company-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.company-facts { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.company-facts strong { display: block; font-size: 1.4rem; color: var(--primary-hover); }
.company-facts span { font-size: .75rem; color: var(--text-muted); }
.stretched-link { color: inherit; text-decoration: none; }
.stretched-link:hover { color: var(--primary); }

/* ---------- Career assistant chat --------------------------------------- */
.chat-thread { display: grid; gap: 14px; margin-bottom: 18px; }
.chat-msg { display: flex; gap: 10px; animation: sjFadeUp .4s var(--sj-ease) both; }
.chat-user { justify-content: flex-end; }
.chat-bubble { max-width: 82%; padding: 14px 16px; border-radius: 18px; line-height: 1.65; font-size: .95rem; }
.chat-user .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.chat-bot .chat-bubble { background: #fff; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; color: var(--text-secondary); }
.chat-bot .chat-bubble ul { padding-left: 18px; margin: 6px 0; }
.chat-bot .chat-bubble p { margin: 0 0 8px; }
.chat-bot .chat-bubble h4 { font-size: .95rem; margin: 10px 0 4px; color: var(--text-primary); }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: .9rem; }

/* ---------- Misc --------------------------------------------------------- */
.lost-404 { font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; letter-spacing: -.06em; color: var(--primary); line-height: 1; margin-bottom: 14px; font-family: var(--font-serif); }
.lost-404 span { display: inline-block; animation: sjFloat 3s ease-in-out infinite; }
.legal-page h3 { margin: 28px 0 8px; font-size: 1.15rem; font-family: var(--font-sans); letter-spacing: -.01em; }
.legal-page ul { padding-left: 20px; color: var(--text-secondary); }
.legal-page p, .legal-page li { color: var(--text-secondary); margin-bottom: 8px; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 46px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--primary); background: var(--primary-light); }
.recent-list { display: flex; gap: 10px; flex-wrap: wrap; }
.recent-list a { border: 1px solid var(--border-light); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit; font-size: .88rem; background: #fff; transition: transform .2s, box-shadow .2s; }
.recent-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.recent-list a small { display: block; color: var(--text-muted); }
.mt-6 { margin-top: 24px; }
.typewriter-caret::placeholder { color: var(--text-muted); }
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--primary); box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; transform: translateY(12px); transition: all .3s var(--sj-ease); z-index: 90; font-size: 1.1rem; }
.back-to-top.show { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--primary); color: #fff; }
.toast-stack:not(:empty) ~ .back-to-top { bottom: 80px; }
.sj-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--primary), #19b884); z-index: 10000; transition: width .3s ease, opacity .4s ease; box-shadow: 0 0 10px rgba(8, 127, 91, .5); }

/* Focus visibility */
:focus-visible { outline: 3px solid rgba(8, 127, 91, .35); outline-offset: 2px; }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(6, 240px); } }
@media (max-width: 900px) {
  .job-layout, .company-layout { grid-template-columns: 1fr !important; }
  .job-aside { position: static !important; }
  /* Sidebar becomes a swipeable chip row on phones/tablets so content shows first */
  .dashboard > .sidebar { padding: 8px; border-radius: 18px; position: sticky; top: 74px; z-index: 20; background: rgba(255, 254, 250, .94); backdrop-filter: blur(12px); }
  .dashboard > .sidebar .sidebar-section { display: none; }
  .dashboard > .sidebar .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .dashboard > .sidebar .sidebar-nav::-webkit-scrollbar { display: none; }
  .dashboard > .sidebar .sidebar-link { white-space: nowrap; padding: 8px 12px; font-size: .84rem; scroll-snap-align: start; }
  .dashboard > .sidebar .sidebar-link svg { width: 16px; height: 16px; }
  .dashboard { gap: 16px !important; grid-template-columns: minmax(0, 1fr) !important; }
  .dashboard > * { min-width: 0; }
  .dashboard-content > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .mobile-apply-bar { display: flex !important; }
  .page-job .toast-stack, .page-job .back-to-top { bottom: 86px; }
  .page-job .footer { padding-bottom: 96px; }
  .chart-grid { grid-template-columns: 1fr; }
  .drawer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .similar-grid { grid-template-columns: 1fr; }
  .company-hero-inner { flex-direction: column; align-items: flex-start; }
  .interview-card { flex-wrap: wrap; }
  .iv-actions { width: 100%; justify-content: flex-start; }
  .strength-card .card-body, .match-card .card-body { flex-direction: column; text-align: center; align-items: center; }
  .strength-tips { text-align: left; }
  .step-label { font-size: .68rem; }
  .sj-dialog.drawer { border-radius: 0; }
  .admin-filters .form-control { min-width: 0; flex: 1 1 140px; }
  /* Tables become stacked cards on phones */
  .table-container .table.cardify thead { display: none; }
  .table-container .table.cardify, .table-container .table.cardify tbody, .table-container .table.cardify tr, .table-container .table.cardify td { display: block; width: 100%; }
  .table-container .table.cardify tr { background: #fff; border: 1px solid var(--border-light); border-radius: 16px; margin-bottom: 12px; padding: 8px 14px; box-shadow: var(--shadow-sm); }
  .table-container .table.cardify td { border: 0 !important; padding: 7px 0 !important; display: flex; justify-content: space-between; gap: 14px; text-align: right; }
  .table-container .table.cardify td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; text-align: left; flex-shrink: 0; }
  .table-container .table.cardify td[data-label=""]::before { display: none; }
  .table-container .table.cardify td.d-flex { justify-content: flex-start; flex-wrap: wrap; text-align: left; }
  .table-container { border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .sj-toast { max-width: none; }
}

/* ---------- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-animate *, .stagger > *, .companies-grid > *, .auth-animate, .kanban-card, .chat-msg, .interview-card, .alert,
  .dashboard-content > .dashboard-header, .dashboard-content .stats-grid > *, .sj-dialog[open], .mini-chart rect, .funnel-fill, .step::before { animation: none !important; }
  .sj-js [data-reveal]:not(.reveal-on-scroll) { opacity: 1; transform: none; transition: none; }
  .strength-ring { animation: none; }
  .sj-confetti { display: none; }
  .hero-animate .highlight { animation: none; }
}
