:root {
  --ink: #172034;
  --ink-soft: #536075;
  --muted: #7c8799;
  --line: #e5e8ef;
  --line-strong: #d7dce6;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --surface-tint: #f0efff;
  --brand: #6758e8;
  --brand-dark: #4d3fca;
  --brand-soft: #eeecff;
  --success: #167b5b;
  --success-soft: #e8f6f0;
  --warning: #a76500;
  --warning-soft: #fff4dc;
  --danger: #b83346;
  --danger-soft: #fff0f2;
  --info: #2468a8;
  --info-soft: #eaf4ff;
  --shadow-sm: 0 1px 2px rgba(23, 32, 52, .04), 0 8px 24px rgba(23, 32, 52, .05);
  --shadow-md: 0 18px 50px rgba(30, 36, 68, .10);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar: 254px;
  --content-max: 1500px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--surface-soft); color: var(--ink); font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.14; letter-spacing: -.035em; margin-bottom: 12px; }
h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.018em; margin-bottom: 5px; }
h3 { font-size: 1rem; margin-bottom: 6px; }
p { color: var(--ink-soft); }
small { color: var(--muted); }
pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #11182a; color: #eef0ff; padding: 24px 16px 18px; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, #897cf5, #5a49dc); color: #fff; display: inline-grid; place-items: center; font-weight: 850; box-shadow: 0 9px 20px rgba(103, 88, 232, .28); flex: 0 0 auto; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; color: #98a3bb; margin-top: 1px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { min-height: 44px; border-radius: 11px; padding: 0 12px; display: flex; align-items: center; gap: 11px; color: #aeb7cb; font-weight: 650; font-size: 14px; transition: background .16s ease, color .16s ease, transform .16s ease; border: 0; width: 100%; background: transparent; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(103,88,232,.33), rgba(103,88,232,.12)); box-shadow: inset 3px 0 0 #9388ff; }
.nav-icon { width: 22px; text-align: center; font-size: 18px; font-weight: 400; }
.sidebar-note { margin-top: auto; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); border-radius: 12px; padding: 11px; display: flex; align-items: flex-start; gap: 9px; }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note small { font-size: 10px; color: #97a2ba; margin-top: 2px; line-height: 1.35; }
.safety-dot { width: 8px; height: 8px; border-radius: 50%; background: #54cf9d; margin-top: 5px; box-shadow: 0 0 0 5px rgba(84,207,157,.10); }
.logout-form { margin-top: 8px; }
.nav-button { color: #909bb1; }

.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 74px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 30px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.topbar-kicker { font-size: 10px; letter-spacing: .13em; color: var(--muted); text-transform: uppercase; font-weight: 750; }
.topbar-title { font-weight: 750; font-size: 17px; margin-top: 1px; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.topbar-user-text strong, .topbar-user-text small { display: block; }
.topbar-user-text strong { font-size: 12px; }
.topbar-user-text small { font-size: 10px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; margin-right: 12px; color: var(--ink); }
.content-wrap { width: min(100%, var(--content-max)); margin: 0 auto; padding: 30px; flex: 1; }
.app-footer { border-top: 1px solid var(--line); padding: 16px 30px; font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-header > div { max-width: 820px; }
.page-header h1 { margin-bottom: 8px; }
.page-header p { margin-bottom: 0; max-width: 760px; }
.eyebrow { display: inline-block; font-size: 10px; letter-spacing: .17em; font-weight: 800; color: rgba(255,255,255,.72); margin-bottom: 10px; }
.eyebrow-dark { color: var(--brand); }
.muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; }
.card-header h2 { margin-bottom: 0; }
.card-header p { margin: 4px 0 0; font-size: 13px; }
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-heading p { margin-bottom: 0; font-size: 13px; }
.section-number { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 850; }
.critical-badge { margin-left: auto; background: var(--warning-soft); color: var(--warning); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 750; }

.button { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: 13px; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(103,88,232,.24); outline-offset: 2px; }
.button-primary { color: #fff; background: linear-gradient(145deg, #7164ec, #5745d3); box-shadow: 0 8px 18px rgba(89,70,210,.18); }
.button-primary:hover { box-shadow: 0 11px 24px rgba(89,70,210,.24); }
.button-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { border-color: #bfc5d2; box-shadow: var(--shadow-sm); }
.button-ghost { background: transparent; color: var(--ink-soft); }
.button-light { background: #fff; color: #4d40c8; }
.button-ghost-light { color: #fff; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); }
.button-danger { background: var(--danger-soft); color: var(--danger); border-color: #f2cbd2; }
.button-large { min-height: 47px; padding: 0 21px; font-size: 14px; }
.full-width { width: 100%; }
.text-link { color: var(--brand); font-weight: 750; font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--brand); padding: 0; font-weight: 700; font-size: 12px; }
.text-button.danger { color: var(--danger); }
.icon-button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); display: inline-grid; place-items: center; background: #fff; color: var(--ink-soft); }
.icon-button.danger { color: var(--danger); }
.row-menu { display: flex; gap: 5px; align-items: center; }
.row-menu form { display: contents; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 750; color: var(--ink); }
.field.required > span::after { content: " *"; color: var(--danger); }
.field small { line-height: 1.4; font-size: 11px; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; transition: border-color .15s ease, box-shadow .15s ease; }
input, select { min-height: 42px; }
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #a2aab8; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(103,88,232,.09); outline: 0; }
.field-grid { display: grid; gap: 17px; }
.field-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-stack { display: grid; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.form-actions.end { justify-content: flex-end; }
.form-actions.center { justify-content: center; }
.check-row { display: flex; align-items: flex-start; gap: 10px; background: var(--surface-soft); padding: 12px; border-radius: 10px; cursor: pointer; }
.check-row input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--brand); }
.check-row strong, .check-row small { display: block; }
.check-row strong { font-size: 12px; }
.check-row small { font-size: 10px; margin-top: 2px; }
.divider { height: 1px; background: var(--line); margin: 26px 0; }

.flash-stack { display: grid; gap: 9px; margin-bottom: 18px; }
.flash, .alert { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 13px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: var(--shadow-sm); }
.flash-success, .alert-success { background: var(--success-soft); border-color: #cae9dc; color: #115c46; }
.flash-warning, .alert-warning { background: var(--warning-soft); border-color: #f0ddb7; color: #875400; }
.flash-danger, .alert-danger { background: var(--danger-soft); border-color: #f2cbd2; color: #96283a; }
.flash-info, .alert-info { background: var(--info-soft); border-color: #cfe3f8; color: #1e5b91; }
.flash-close { border: 0; background: transparent; color: currentColor; font-size: 18px; line-height: 1; }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.05fr) minmax(420px, .95fr); background: #fff; }
.login-story { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 18% 20%, rgba(144,126,255,.32), transparent 30%), radial-gradient(circle at 86% 76%, rgba(90,198,174,.18), transparent 28%), linear-gradient(145deg, #13192c, #23204e 70%, #30266c); }
.login-story::before, .login-story::after { content: ""; position: absolute; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-story::before { right: -130px; top: -120px; box-shadow: 0 0 0 72px rgba(255,255,255,.025), 0 0 0 145px rgba(255,255,255,.018); }
.login-story::after { left: -240px; bottom: -260px; box-shadow: 0 0 0 78px rgba(255,255,255,.02); }
.story-inner { position: relative; z-index: 1; min-height: 100vh; padding: 48px clamp(46px, 6vw, 90px); display: flex; flex-direction: column; }
.brand-on-dark { padding-left: 0; }
.brand-on-dark small { color: rgba(255,255,255,.58); }
.story-copy { margin: auto 0 45px; max-width: 660px; }
.story-copy h1 { font-size: clamp(2.3rem, 4.2vw, 4.4rem); color: #fff; line-height: 1.06; letter-spacing: -.055em; margin-bottom: 24px; }
.story-copy p { color: rgba(255,255,255,.69); font-size: 16px; max-width: 560px; }
.story-steps { display: grid; gap: 14px; max-width: 620px; }
.story-steps > div { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid rgba(255,255,255,.10); padding-top: 13px; }
.story-steps > div > span { color: #9589ff; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.story-steps p { margin: 0; }
.story-steps strong, .story-steps small { display: block; }
.story-steps strong { color: #fff; font-size: 13px; }
.story-steps small { color: rgba(255,255,255,.53); font-size: 11px; margin-top: 2px; }
.story-footnote { margin: 32px 0 0; color: rgba(255,255,255,.43); font-size: 10px; letter-spacing: .035em; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-card { width: min(100%, 440px); }
.login-card h2 { font-size: 2rem; letter-spacing: -.04em; margin-bottom: 8px; }
.login-card > p { margin-bottom: 28px; }
.login-card .form-stack { gap: 18px; }
.privacy-strip { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; display: flex; gap: 10px; align-items: flex-start; }
.privacy-strip > span { color: var(--success); }
.privacy-strip p { margin: 0; }
.privacy-strip strong, .privacy-strip small { display: block; }
.privacy-strip strong { font-size: 12px; color: var(--ink); }
.privacy-strip small { font-size: 10px; margin-top: 2px; }
.mobile-login-brand { display: none; }

/* Onboarding/profile */
.setup-path { display: flex; align-items: center; justify-content: center; max-width: 850px; margin: 0 auto 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 24px; box-shadow: var(--shadow-sm); }
.setup-step { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.setup-step > span { width: 28px; height: 28px; border-radius: 50%; background: #eceff4; color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.setup-step.active > span { background: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-soft); }
.setup-step p { margin: 0; }
.setup-step strong, .setup-step small { display: block; }
.setup-step strong { font-size: 11px; color: var(--ink); }
.setup-step small { font-size: 9px; }
.setup-line { height: 1px; flex: 1; background: var(--line); margin: 0 18px; }
.profile-form { display: grid; gap: 18px; }
.form-section { padding: 24px; }
.critical-section { border-color: #ecd8ad; background: linear-gradient(180deg, #fffefb, #fff); }
.sticky-actions { position: sticky; bottom: 14px; z-index: 10; background: rgba(17,24,42,.96); color: #fff; border-radius: 14px; box-shadow: 0 14px 38px rgba(17,24,42,.23); padding: 13px 15px 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; backdrop-filter: blur(12px); }
.sticky-actions strong, .sticky-actions small { display: block; }
.sticky-actions strong { font-size: 12px; }
.sticky-actions small { color: #9ea8bb; font-size: 10px; }

/* Dashboard */
.hero-panel { min-height: 260px; border-radius: var(--radius-lg); padding: 40px 44px; color: #fff; display: flex; align-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 85% 30%, rgba(143,130,255,.42), transparent 22%), radial-gradient(circle at 92% 90%, rgba(69,204,168,.16), transparent 24%), linear-gradient(130deg, #232049, #4f42b9 70%, #6456d8); box-shadow: var(--shadow-md); margin-bottom: 22px; }
.hero-copy { max-width: 650px; position: relative; z-index: 2; }
.hero-copy h1 { color: #fff; font-size: clamp(2.15rem, 4vw, 3.75rem); max-width: 670px; }
.hero-copy > p { color: rgba(255,255,255,.71); margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; }
.hero-orbit { margin-left: auto; width: 250px; height: 220px; position: relative; flex: 0 0 250px; }
.orbit-ring { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.orbit-one { width: 210px; height: 210px; inset: 5px 15px; }
.orbit-two { width: 140px; height: 140px; inset: 40px 50px; border-style: dashed; }
.hero-score { position: absolute; inset: 74px 82px; width: 78px; height: 78px; display: grid; place-items: center; align-content: center; background: rgba(255,255,255,.95); color: var(--brand-dark); border-radius: 50%; box-shadow: 0 12px 40px rgba(14,14,50,.23); }
.hero-score strong { font-size: 27px; line-height: 1; }
.hero-score span { font-size: 9px; color: var(--muted); margin-top: 3px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric-icon { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; font-weight: 750; }
.tone-purple { background: var(--brand-soft); color: var(--brand); }
.tone-blue { background: var(--info-soft); color: var(--info); }
.tone-green { background: var(--success-soft); color: var(--success); }
.tone-amber { background: var(--warning-soft); color: var(--warning); }
.metric-card small, .metric-card strong, .metric-card p { display: block; }
.metric-card small { font-size: 10px; font-weight: 700; color: var(--muted); }
.metric-card strong { font-size: 25px; letter-spacing: -.04em; line-height: 1.1; margin: 4px 0; }
.metric-card p { margin: 0; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 18px; margin-bottom: 18px; }
.dashboard-side { display: grid; gap: 18px; align-content: start; }
.job-action-list { padding: 0 10px 12px; }
.job-action-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; transition: background .14s ease; }
.job-action-row:hover { background: var(--surface-soft); }
.company-monogram { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 850; flex: 0 0 auto; }
.company-monogram.large { width: 45px; height: 45px; font-size: 16px; }
.company-monogram.xlarge { width: 62px; height: 62px; font-size: 23px; border-radius: 16px; }
.job-action-copy { min-width: 0; flex: 1; }
.job-action-copy strong, .job-action-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-action-copy strong { font-size: 13px; }
.job-action-copy small { font-size: 10px; }
.job-action-copy p { font-size: 10px; margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-action-meta { display: flex; align-items: center; gap: 9px; }
.chevron { font-size: 22px; color: var(--muted); }
.readiness-card { padding-bottom: 18px; }
.readiness-item { padding: 0 22px 15px; }
.readiness-item > div:first-child { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.readiness-item strong { font-size: 10px; color: var(--brand); }
.progress { height: 6px; border-radius: 999px; background: #edf0f5; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #7769ee, #54cfa1); border-radius: inherit; }
.readiness-card > .button { width: calc(100% - 44px); margin: 3px 22px 0; }
.sync-card { padding: 18px 20px; }
.sync-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 13px; }
.sync-head strong, .sync-head small { display: block; }
.sync-head strong { font-size: 12px; }
.sync-head small { font-size: 10px; margin-top: 3px; line-height: 1.4; }
.sync-orb { width: 11px; height: 11px; border-radius: 50%; background: #a3abba; flex: 0 0 auto; margin-top: 4px; box-shadow: 0 0 0 5px rgba(150,158,174,.10); }
.sync-success { background: #35b889; box-shadow: 0 0 0 5px rgba(53,184,137,.12); }
.sync-warning { background: #e8a42a; box-shadow: 0 0 0 5px rgba(232,164,42,.12); }
.sync-danger { background: #df596b; box-shadow: 0 0 0 5px rgba(223,89,107,.12); }
.recent-card { overflow: hidden; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 11px 18px; background: var(--surface-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td a strong, td a small { display: block; }
td a small { font-size: 10px; margin-top: 2px; }
.cell-note { color: var(--ink-soft); max-width: 360px; }

/* Badges/tags */
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .015em; background: #eef0f4; color: var(--ink-soft); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted, .badge-neutral { background: #eef0f4; color: #687487; }
.badge-row, .tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; background: #f0f2f6; color: #5c687a; border-radius: 7px; font-size: 9px; font-weight: 650; }
.tag-positive { background: var(--success-soft); color: var(--success); }
.tag-risk { background: var(--danger-soft); color: var(--danger); }
.count-pill { min-width: 27px; height: 27px; border-radius: 999px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 800; }

/* Resume / experiences */
.two-column-layout { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); gap: 18px; margin-bottom: 18px; }
.upload-card { padding: 23px; align-self: start; }
.upload-zone { border: 1.5px dashed #cbd0dd; background: var(--surface-soft); min-height: 136px; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; text-align: center; padding: 18px; transition: border .15s ease, background .15s ease; }
.upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-symbol { font-size: 25px; color: var(--brand); }
.upload-zone strong { font-size: 12px; }
.upload-zone small { font-size: 10px; }
.resume-list { padding: 0 12px 12px; }
.resume-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border-radius: 12px; }
.resume-row:hover { background: var(--surface-soft); }
.file-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 9px; font-weight: 850; flex: 0 0 auto; }
.resume-copy { flex: 1; min-width: 0; }
.resume-copy > div:first-child { display: flex; gap: 7px; align-items: center; }
.resume-copy strong { font-size: 12px; }
.resume-copy > small { display: block; margin: 2px 0 7px; font-size: 10px; }
.experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; padding: 0 22px 22px; }
.experience-card { border: 1px solid var(--line); border-radius: 13px; padding: 17px; position: relative; }
.experience-top { display: flex; justify-content: space-between; gap: 10px; }
.category-pill { font-size: 9px; font-weight: 800; color: var(--brand); text-transform: uppercase; }
.source-note { font-size: 8px; color: var(--muted); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.experience-card h3 { margin-top: 9px; font-size: 14px; }
.experience-meta { font-size: 10px; margin-bottom: 9px; }
.experience-description { font-size: 11px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; display: flex; gap: 12px; }
.card-actions form { display: contents; }
.inline-editor { border: 1px solid #dcd7ff; background: #fbfaff; border-radius: 13px; padding: 18px; margin: 0 22px 18px; }
.compact-editor { margin: 14px 0 0; }
.hidden-panel { display: none !important; }

/* Job import/list */
.import-methods { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.import-card { padding: 19px; }
.active-card { border-color: #d8d2ff; background: linear-gradient(180deg, #fbfaff, #fff); }
.method-label { display: flex; align-items: center; gap: 10px; }
.method-label > span { font-size: 9px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 4px 7px; font-weight: 800; }
.method-label strong { font-size: 13px; }
.import-card > p { font-size: 11px; margin: 8px 0 13px; }
.url-form { display: flex; gap: 8px; }
.url-form .field { flex: 1; }
.sr-label > span { display: none; }
.preview-banner { display: flex; gap: 12px; align-items: center; background: var(--success-soft); color: var(--success); border: 1px solid #cbe9dc; border-radius: 12px; padding: 12px 15px; margin-bottom: 14px; }
.preview-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-weight: 850; }
.preview-banner strong, .preview-banner p { display: block; }
.preview-banner strong { font-size: 12px; }
.preview-banner p { margin: 1px 0 0; font-size: 10px; color: #3e765f; }
.job-import-form { padding: 25px; }
.analysis-explainer { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.analysis-explainer > div { border: 1px solid var(--line); border-radius: 11px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.analysis-explainer > div > span { width: 25px; height: 25px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 9px; font-weight: 850; }
.analysis-explainer p { margin: 0; }
.analysis-explainer strong, .analysis-explainer small { display: block; }
.analysis-explainer strong { font-size: 10px; color: var(--ink); }
.analysis-explainer small { font-size: 9px; line-height: 1.35; margin-top: 2px; }
.filter-bar { padding: 13px; margin-bottom: 17px; }
.filter-form { display: flex; gap: 9px; align-items: center; }
.search-box { flex: 1; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 11px; background: #fff; }
.search-box > span { color: var(--muted); font-size: 18px; }
.search-box input { border: 0; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.compact-field { min-width: 170px; }
.job-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.job-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.job-card-main { padding: 18px; flex: 1; }
.job-card-head { display: flex; justify-content: space-between; }
.job-card-title { margin: 18px 0 14px; }
.job-card-title h2 { font-size: 15px; margin-bottom: 3px; }
.job-card-title p { font-size: 10px; margin: 0; }
.decision-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-soft); border-radius: 10px; padding: 9px; gap: 6px; }
.decision-strip > div { border-right: 1px solid var(--line); padding: 0 7px; }
.decision-strip > div:last-child { border: 0; }
.decision-strip small, .decision-strip strong { display: block; }
.decision-strip small { font-size: 8px; }
.decision-strip strong { font-size: 10px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-action { margin-top: 14px; }
.next-action small { font-size: 9px; font-weight: 750; }
.next-action p { font-size: 10px; margin: 3px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-card-foot { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.job-card-foot a { color: var(--brand); font-weight: 750; }

/* Job detail */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--brand); }
.job-hero { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.job-hero-main { display: flex; align-items: center; gap: 17px; min-width: 0; }
.job-hero-main h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); margin: 7px 0 3px; }
.job-hero-main p { margin: 0; font-size: 11px; }
.job-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.job-hero-actions form { display: contents; }
.decision-board { display: grid; grid-template-columns: 1.45fr repeat(4, .62fr); gap: 10px; margin-bottom: 14px; }
.decision-primary, .decision-metric { border-radius: 13px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.decision-primary { background: linear-gradient(145deg, #26224d, #594bc5); color: #fff; border: 0; }
.decision-primary strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.decision-primary p { color: rgba(255,255,255,.7); font-size: 10px; margin: 3px 0 0; }
.decision-success { background: linear-gradient(145deg, #135f48, #1c9b72); }
.decision-danger { background: linear-gradient(145deg, #782839, #c34558); }
.decision-warning { background: linear-gradient(145deg, #7a530c, #bc7b10); }
.decision-metric { display: flex; flex-direction: column; justify-content: center; }
.decision-metric small { font-size: 9px; }
.decision-metric > strong { font-size: 12px; margin: 5px 0 8px; word-break: break-word; }
.decision-metric .badge { align-self: flex-start; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,.7fr); gap: 16px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 16px; }
.analysis-card { overflow: hidden; }
.analysis-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 0 22px 18px; }
.analysis-list { border-radius: 12px; padding: 16px; }
.analysis-list.positive { background: var(--success-soft); }
.analysis-list.risk { background: var(--danger-soft); }
.analysis-list h3 { display: flex; gap: 7px; align-items: center; }
.analysis-list ul, .unknown-panel ul { padding-left: 19px; margin: 10px 0 0; }
.analysis-list li, .unknown-panel li { font-size: 11px; margin-bottom: 7px; color: var(--ink-soft); }
.unknown-panel { margin: 0 22px 18px; background: var(--warning-soft); border: 1px solid #eedcb7; border-radius: 12px; padding: 15px; }
.unknown-panel h3 { color: var(--warning); }
.skill-compare { border-top: 1px solid var(--line); padding: 17px 22px; display: grid; gap: 13px; }
.skill-compare small { display: block; font-size: 9px; margin-bottom: 7px; font-weight: 750; }
.selected-materials { margin: 0 22px 15px; display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.selected-materials > div { background: var(--surface-soft); border-radius: 10px; padding: 12px; }
.selected-materials small, .selected-materials strong { display: block; }
.selected-materials small { font-size: 9px; }
.selected-materials strong { font-size: 12px; margin-top: 2px; }
.experience-selection { margin: 0 22px 18px; display: grid; gap: 8px; }
.experience-selection article { display: flex; gap: 11px; border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.experience-selection article > span { width: 24px; height: 24px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 8px; font-size: 9px; font-weight: 850; }
.experience-selection article strong, .experience-selection article small { display: block; }
.experience-selection article strong { font-size: 11px; }
.experience-selection article small { font-size: 9px; }
.experience-selection article p { font-size: 9px; margin: 5px 0 0; }
#application-pack > form { padding: 0 22px 21px; }
.review-check { border: 1px solid #d9d3ff; background: #fbfaff; }
.checklist-panel { background: #f8f9fb; border-top: 1px solid var(--line); padding: 18px 22px; }
.checklist-panel ol { padding-left: 20px; margin: 9px 0 0; }
.checklist-panel li { font-size: 10px; margin-bottom: 6px; color: var(--ink-soft); }
.jd-card details summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; }
.jd-card details summary::-webkit-details-marker { display: none; }
.jd-card summary strong, .jd-card summary small { display: block; }
.jd-card summary strong { font-size: 12px; }
.jd-card summary small { font-size: 9px; }
.jd-card pre { border-top: 1px solid var(--line); margin: 0; padding: 20px 22px; max-height: 650px; overflow: auto; font-size: 10px; background: #fbfbfc; color: var(--ink-soft); }
.progress-card, .timeline-card, .danger-zone { padding-bottom: 20px; }
.progress-card form { padding: 0 20px; }
.critical-field { background: var(--warning-soft); border-radius: 10px; padding: 11px; }
.timeline { padding: 0 20px; }
.timeline-item { display: flex; gap: 11px; position: relative; padding-bottom: 15px; }
.timeline-item::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: -2px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item > i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: 0 0 auto; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline-item strong, .timeline-item time { display: block; }
.timeline-item strong { font-size: 10px; }
.timeline-item time { font-size: 8px; color: var(--muted); }
.timeline-item p { font-size: 9px; margin: 3px 0 0; }
.danger-zone { padding: 18px; border-color: #f0ccd2; }
.danger-zone p { font-size: 10px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.settings-section { padding: 23px; align-self: start; }
.sync-status-panel { display: flex; gap: 15px; align-items: flex-start; border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: var(--surface-soft); }
.large-orb { width: 14px; height: 14px; margin-top: 8px; }
.sync-status-panel h3 { margin: 7px 0 2px; font-size: 13px; }
.sync-status-panel p { margin: 0; font-size: 10px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 20px; }
.data-actions form { display: contents; }
.subheading { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.backup-row { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; }
.backup-row:hover { background: var(--surface-soft); }
.backup-row > div { flex: 1; min-width: 0; }
.backup-row strong, .backup-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-row strong { font-size: 10px; }
.backup-row small, .backup-row > span:last-child { font-size: 8px; color: var(--muted); }
.narrow-form { max-width: 520px; }
.boundary-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.boundary-list li { display: flex; gap: 10px; background: var(--surface-soft); border-radius: 10px; padding: 11px; }
.boundary-list li > span { color: var(--success); font-weight: 850; }
.boundary-list strong, .boundary-list small { display: block; }
.boundary-list strong { font-size: 11px; }
.boundary-list small { font-size: 9px; margin-top: 2px; }
.system-facts { border-top: 1px solid var(--line); margin: 17px 0 0; padding-top: 12px; display: grid; gap: 7px; }
.system-facts > div { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; }
.system-facts dt { color: var(--muted); }
.system-facts dd { margin: 0; text-align: right; word-break: break-all; }
.audit-list { display: grid; }
.audit-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border: 0; }
.audit-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.audit-row > div { flex: 1; }
.audit-row strong, .audit-row small { display: block; }
.audit-row strong { font-size: 10px; }
.audit-row small { font-size: 8px; }
.audit-row time { font-size: 8px; color: var(--muted); }

/* Generic empty/error */
.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.empty-state.compact { min-height: 170px; }
.empty-state h2, .empty-state h3 { margin: 8px 0 4px; }
.empty-state p { max-width: 460px; font-size: 11px; }
.empty-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 22px; }
.danger-icon { background: var(--danger-soft); color: var(--danger); }
.large-empty { min-height: 430px; }
.error-page { min-height: 480px; display: grid; place-items: center; align-content: center; text-align: center; padding: 40px; position: relative; overflow: hidden; }
.error-page p { max-width: 580px; }
.error-code { position: absolute; right: 30px; top: -40px; font-size: 160px; font-weight: 900; color: #f4f5f8; z-index: 0; }
.error-page > * { position: relative; z-index: 1; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .job-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .decision-board { grid-template-columns: 1.2fr repeat(2, .7fr); }
  .decision-primary { grid-row: span 2; }
  .detail-grid { grid-template-columns: minmax(0,1fr) 330px; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  :root { --sidebar: 224px; }
  .content-wrap { padding: 22px; }
  .hero-orbit { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: repeat(2,1fr); }
  .two-column-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .progress-card { grid-row: span 2; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; background: linear-gradient(160deg, #f5f3ff, #fff 45%); }
  .mobile-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -280px; width: 258px; transition: left .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.20); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: block; }
  .topbar { padding: 0 15px; height: 66px; }
  .topbar-user-text { display: none; }
  .content-wrap { padding: 18px 14px; }
  .app-footer { padding: 14px; display: grid; }
  .page-header { display: grid; }
  .page-header .button { justify-self: start; }
  h1 { font-size: 1.85rem; }
  .hero-panel { padding: 30px 23px; min-height: 290px; }
  .hero-copy h1 { font-size: 2.25rem; }
  .hero-actions { flex-wrap: wrap; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 14px; }
  .dashboard-side { grid-template-columns: 1fr; }
  .field-grid.cols-2, .field-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .setup-path { justify-content: flex-start; overflow-x: auto; }
  .setup-line { min-width: 35px; }
  .sticky-actions { position: static; display: grid; }
  .sticky-actions .button { width: 100%; }
  .experience-grid { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .import-methods, .analysis-explainer { grid-template-columns: 1fr; }
  .url-form, .filter-form { display: grid; }
  .compact-field { min-width: 0; }
  .job-card-grid { grid-template-columns: 1fr; }
  .job-hero { display: grid; }
  .job-hero-actions { justify-content: start; }
  .decision-board { grid-template-columns: repeat(2,1fr); }
  .decision-primary { grid-column: span 2; grid-row: auto; }
  .analysis-columns { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .progress-card { grid-row: auto; }
  .settings-section, .form-section, .job-import-form { padding: 18px 15px; }
  .selected-materials { grid-template-columns: 1fr; }
  .data-actions { display: grid; }
  .data-actions .button { width: 100%; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { align-items: center; }
  .login-panel { padding: 24px; }
  .login-card h2 { font-size: 1.7rem; }
  .mobile-login-brand { margin-bottom: 34px; }
  .topbar-title { font-size: 14px; }
  .job-hero-main { align-items: flex-start; }
  .company-monogram.xlarge { width: 48px; height: 48px; font-size: 18px; }
  .decision-board { grid-template-columns: 1fr; }
  .decision-primary { grid-column: auto; }
  .form-actions.end { display: grid; }
  .form-actions.end .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.progress .w-100 { width: 100%; }
.progress .w-55 { width: 55%; }
.progress .w-10 { width: 10%; }
.guest-error-wrap { min-height: 100vh; }

/* DeepSeek settings and enhancement */
.ai-settings-section { grid-column: 1 / -1; }
.ai-status-panel { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); margin-bottom: 18px; }
.ai-status-panel.ai-ready { border-color: #c9e9dc; background: var(--success-soft); }
.ai-status-panel.ai-warning { border-color: #efdcae; background: var(--warning-soft); }
.ai-status-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: var(--brand-soft); color: var(--brand); font-weight: 900; font-size: 12px; }
.ai-status-copy { min-width: 0; }
.ai-status-copy h3 { margin: 8px 0 3px; font-size: 14px; }
.ai-status-copy p { margin: 0; font-size: 10px; }
.ai-settings-form { max-width: 900px; }
.external-data-boundary { border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: #fff; }
.external-data-boundary h3 { margin: 0 0 10px; font-size: 12px; }
.boundary-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.boundary-columns > div { padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.boundary-columns strong { font-size: 10px; }
.boundary-columns ul { margin: 8px 0 0; padding-left: 18px; font-size: 10px; color: var(--ink-soft); }
.boundary-columns li { margin: 5px 0; }
.ai-secondary-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ai-secondary-actions form { display: contents; }
.ai-enhancement-card { border-color: #d9d3ff; background: linear-gradient(180deg, #fbfaff, #fff); }
.ai-enhancement-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ai-summary { font-size: 12px; line-height: 1.7; color: var(--ink-soft); white-space: pre-line; }
.ai-meta-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 14px 0; }
.ai-meta-grid > div { background: var(--surface-soft); border-radius: 10px; padding: 10px; }
.ai-meta-grid small, .ai-meta-grid strong { display: block; }
.ai-meta-grid small { font-size: 9px; }
.ai-meta-grid strong { margin-top: 3px; font-size: 11px; }
.ai-rule-boundary { padding: 11px 13px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 10px; margin-top: 14px; }
.ai-failure-note { padding: 14px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 11px; }
.ai-action-forms { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-action-forms form { display: contents; }

@media (max-width: 760px) {
  .boundary-columns, .ai-meta-grid { grid-template-columns: 1fr; }
  .ai-secondary-actions, .ai-action-forms { display: grid; }
  .ai-secondary-actions .button, .ai-action-forms .button { width: 100%; }
}
