:root {
  --ink: #1d2433;
  --muted: #697386;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --line: #e6eaf0;
  --navy: #171d2b;
  --navy-deep: #111827;
  --mint: #e8f0fb;
  --lime: #246bce;
  --mustard: #6a45a6;
  --coral: #bd3150;
  --blue: #246bce;
  --purple: #6a45a6;
  --green: #218165;
  --shadow: 0 14px 34px rgba(24, 33, 48, .06);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 16px 18px; background: var(--navy); color: #eef3fa; display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px; }
.brand-mark { width: 38px; height: 38px; display: block; overflow: hidden; flex: 0 0 38px; border-radius: 10px; background: #fff; }
.brand-mark img { width: 120px; max-width: none; display: block; transform: translate(-42px, -20px); }
.brand-mark-x { display: grid; place-items: center; overflow: visible; color: #fff; background: linear-gradient(135deg, #ca243a, #63399a 56%, #246bce); font-family: "DM Sans", system-ui, sans-serif; font-size: 19px; font-weight: 800; }
.brand-word { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .12em; }
.workspace-label { margin: 27px 11px 12px; color: #8994a8; font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.nav { display: grid; gap: 3px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #aeb8c9; padding: 11px 12px; display: flex; align-items: center; gap: 11px; border-radius: 8px; font-weight: 600; text-align: left; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { background: #29344a; color: white; }
.nav-item > span { width: 18px; font-size: 17px; text-align: center; }
.nav-item b { min-width: 20px; height: 20px; margin-left: auto; display: grid; place-items: center; background: var(--coral); color: white; border-radius: 7px; font-size: 10px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.09); padding: 18px 8px 0; }
.user-chip { display: flex; gap: 10px; align-items: center; }
.user-chip strong { display: block; font-size: 13px; }
.user-chip small { color: #abc0ba; display: block; margin-top: 3px; font-size: 11px; }
.avatar { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); font-weight: 700; font-size: 13px; }
.avatar.mustard { background: var(--mustard); }
.avatar.mint { background: var(--mint); }
.avatar.coral { background: #f5b3a6; }
.subtle-button { width: 100%; border: 0; margin-top: 20px; background: transparent; color: #9bb0ac; font-size: 11px; text-align: left; padding: 0; }
.subtle-button:hover { color: white; }

.main { min-width: 0; padding: 0 clamp(22px, 4vw, 64px) 48px; }
.topbar { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.welcome p { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
h1, h2 { font-family: "DM Sans", system-ui, sans-serif; color: var(--navy-deep); font-weight: 700; }
h1 { margin: 0; font-size: clamp(24px, 3vw, 31px); line-height: 1.14; letter-spacing: -.035em; }
h2 { margin: 3px 0 0; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.cloud-status { max-width: 160px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.25; text-align: right; }
.primary-button, .secondary-button, .light-button, .icon-button, .menu-button { border: 0; border-radius: 10px; font-weight: 700; }
.primary-button { padding: 11px 15px; background: var(--navy); color: #fff; box-shadow: none; }
.primary-button:hover { background: #29344a; }
.secondary-button { padding: 11px 15px; background: #eef1f6; color: var(--navy); }
.icon-button, .menu-button { width: 40px; height: 40px; background: white; color: var(--navy); border: 1px solid var(--line); position: relative; font-size: 20px; }
.menu-button { display: none; }
.dot { position: absolute; width: 7px; height: 7px; right: 8px; top: 8px; background: var(--coral); border-radius: 50%; border: 1px solid white; }

.view { display: none; animation: appear .25s ease; }
.view.active { display: block; }
@keyframes appear { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.focus-card { min-height: 138px; padding: 25px 28px; border-radius: 12px; color: #fff; background: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 24px; box-shadow: none; overflow: hidden; position: relative; }
.focus-card::after { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--lime); }
.focus-card > * { position: relative; z-index: 1; }
.section-kicker { margin: 0; color: #819294; font-size: 10px; letter-spacing: .13em; font-weight: 700; }
.focus-card .section-kicker { color: #c2d6cb; }
.focus-card h2 { color: #fff; margin: 7px 0 6px; font-size: 23px; }
.focus-card p:not(.section-kicker) { max-width: 580px; margin: 0; color: #bcc6d6; line-height: 1.5; }
.light-button { white-space: nowrap; padding: 10px 14px; background: #fff; color: var(--navy); border-radius: 8px; }
.light-button span { margin-left: 8px; font-size: 17px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.metric-card { min-height: 124px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: none; transition: border-color .2s ease, transform .2s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: #ced7e6; }
.metric-card[data-filter] { cursor: pointer; }
.metric-icon { width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.metric-icon.coral { color: #b94232; background: #fee5df; }.metric-icon.blue { color: #336c85; background: #e2f1f6; }.metric-icon.purple { color: #725885; background: #eee8f2; }.metric-icon.green { color: #397550; background: #e4f3e8; }
.metric-card p { margin: 10px 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; }.metric-card strong { display: block; color: var(--navy-deep); font-family: "DM Sans", system-ui, sans-serif; font-size: 27px; line-height: 1; letter-spacing: -.04em; }.metric-card small { color: var(--muted); font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .8fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: none; }
.action-panel, .pipeline-panel, .candidate-panel { padding: 21px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-header h2 { margin-top: 5px; font-size: 20px; }
.text-button { border: 0; padding: 3px 0; background: transparent; color: #387276; font-weight: 700; font-size: 12px; }
.text-button:hover { color: var(--navy); }
.filter-row { display: flex; gap: 7px; padding: 18px 0 11px; overflow-x: auto; }
.filter-chip { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 7px; padding: 6px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.filter-chip.active { color: #16549d; background: var(--mint); border-color: #d9e5f8; }
.task-list { display: grid; }
.task-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); align-items: center; }
.task-item:first-child { border-top: 0; }
.task-priority { width: 28px; height: 28px; display: grid; place-items: center; color: #9c3e32; background: #fee7e3; border-radius: 8px; font-weight: 700; font-size: 13px; }.task-priority.medium { color: #846017; background: #f8edcf; }.task-priority.low { color: #376a52; background: #e4f3e8; }
.task-main strong { display: block; color: var(--navy-deep); font-size: 13px; }.task-main span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }.task-meta { text-align: right; }.task-meta small { display: block; color: var(--muted); font-size: 10px; }.task-meta button { border: 0; background: transparent; color: #397276; padding: 3px 0 0; font-size: 11px; font-weight: 700; }
.pipeline { display: grid; gap: 15px; padding: 23px 0 17px; }.pipeline-stage { display: grid; grid-template-columns: 88px 1fr 26px; gap: 10px; align-items: center; }.pipeline-stage label { color: var(--ink); font-size: 11px; font-weight: 600; }.bar { height: 7px; background: #edf0f5; border-radius: 99px; overflow: hidden; }.bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }.pipeline-stage strong { color: var(--navy); font-size: 12px; text-align: right; }.pipeline-stage:nth-child(2) .bar i { background: #719bd5; }.pipeline-stage:nth-child(3) .bar i { background: var(--mustard); }.pipeline-stage:nth-child(4) .bar i { background: var(--purple); }.pipeline-note { margin-top: 2px; padding: 10px; display: flex; gap: 7px; align-items: center; color: #5c4a74; background: #f4f0fa; border-radius: 8px; font-size: 11px; line-height: 1.35; }.pulse { width: 7px; height: 7px; flex: 0 0 7px; background: var(--mustard); border-radius: 50%; }
.candidate-panel { margin-top: 19px; }.table-controls { display: flex; align-items: center; gap: 17px; }.search { display: flex; align-items: center; width: 195px; border-bottom: 1px solid var(--line); color: var(--muted); gap: 5px; padding: 5px 0; }.search input { width: 100%; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 12px; }.table-wrap { overflow-x: auto; margin-top: 17px; }table { width: 100%; border-collapse: collapse; min-width: 700px; text-align: left; }th { padding: 0 9px 10px; color: #889597; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }td { padding: 12px 9px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; vertical-align: middle; }td:first-child, th:first-child { padding-left: 0; }.candidate-name { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-deep); }.candidate-name small { display: block; color: var(--muted); margin-top: 2px; font-weight: 400; font-size: 10px; }.table-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--navy); font-size: 10px; font-weight: 700; }.badge { display: inline-flex; max-width: 145px; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 99px; background: #eef3f0; color: #4b6560; font-size: 10px; font-weight: 700; }.badge.pending { color: #725e27; background: #fff3d6; }.badge.risk { color: #9d4235; background: #fee8e4; }.owner { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }.owner .avatar { width: 20px; height: 20px; flex-basis: 20px; font-size: 9px; }.row-button { border: 0; background: transparent; color: var(--navy); font-size: 18px; }

.view-intro { margin: 6px 0 22px; }.view-intro h2 { margin-top: 7px; font-size: 27px; }.view-intro > p:not(.section-kicker) { margin: 8px 0 0; color: var(--muted); }.inbox-layout { display: grid; grid-template-columns: minmax(245px, .7fr) minmax(360px, 1.32fr) minmax(215px, .58fr); gap: 12px; align-items: stretch; }.inbox-list { padding: 8px 18px; }.inbox-item { padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; }.inbox-item:last-child { border-bottom: 0; }.inbox-item.active { background: #eef4fe; margin: 0 -8px; padding: 16px 8px; border-radius: 8px; }.inbox-item-top { display: flex; justify-content: space-between; gap: 10px; }.inbox-item strong { font-size: 13px; }.inbox-item time { color: var(--muted); font-size: 10px; }.inbox-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.message-preview { min-height: 480px; padding: 25px; }.message-preview .message-card { margin: 23px 0; padding: 15px; color: #31415c; background: #f3f6fb; border-radius: 8px 8px 8px 2px; line-height: 1.55; }.assistant-note { padding: 15px; border: 1px solid #dbe5f6; background: #f8fbff; border-radius: 8px; }.assistant-note p { margin: 0 0 6px; color: #2160b4; font-weight: 700; font-size: 10px; letter-spacing: .07em; }.assistant-note div { color: var(--ink); line-height: 1.55; }.preview-actions { display: flex; gap: 9px; margin-top: 18px; }.inbox-context { padding: 20px; }.context-person { display: flex; align-items: center; gap: 10px; padding: 18px 0 15px; border-bottom: 1px solid var(--line); }.context-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #e8f0fb; color: #205faa; font-size: 11px; font-weight: 700; }.context-person strong, .context-person small { display: block; }.context-person strong { font-size: 13px; }.context-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }.context-status { padding: 14px 0; border-bottom: 1px solid var(--line); }.context-facts { display: grid; gap: 13px; margin: 17px 0; }.context-facts div { display: grid; gap: 3px; }.context-facts dt { color: #8a94a5; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }.context-facts dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; }.context-next { padding: 12px; background: #f3f6fb; border-radius: 8px; }.context-next p { margin: 0 0 5px; color: #5c79a9; font-size: 9px; font-weight: 700; letter-spacing: .08em; }.context-next strong { color: #273a5b; font-size: 11px; line-height: 1.4; }.context-detail { width: 100%; margin-top: 17px; padding: 0; border: 0; background: transparent; color: #1d5da8; font-size: 11px; font-weight: 700; text-align: left; }.context-detail span { float: right; }.full-table { padding: 10px 22px 22px; }.case-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }.case-column { min-height: 400px; padding: 14px; background: #eef1ee; border-radius: 13px; }.case-column h3 { display: flex; justify-content: space-between; align-items: center; margin: 1px 0 14px; color: var(--navy); font-size: 13px; }.case-column h3 span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--muted); font-size: 10px; }.case-mini { padding: 13px; margin-bottom: 9px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(32,48,53,.04); }.case-mini strong { display: block; font-size: 12px; }.case-mini p { margin: 4px 0 9px; color: var(--muted); font-size: 11px; }.case-mini small { color: #815c25; font-size: 10px; font-weight: 700; }.task-panel-wide { padding: 8px 23px; }

.dialog { width: min(600px, calc(100% - 30px)); padding: 0; color: var(--ink); border: 0; border-radius: 16px; box-shadow: 0 25px 80px rgba(20,42,43,.28); }.dialog::backdrop { background: rgba(15,33,34,.45); backdrop-filter: blur(2px); }.dialog form, .detail-dialog { padding: 25px; }.dialog-header { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }.dialog-header h2 { margin-top: 5px; }.close-dialog { font-size: 25px; line-height: 1; }.helper-text { color: var(--muted); font-size: 12px; line-height: 1.5; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }.form-grid label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }.form-grid .full { grid-column: 1 / -1; }.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px; color: var(--ink); border: 1px solid #dbe1dc; outline-color: #6da195; border-radius: 8px; background: #fff; font-weight: 400; }.form-grid textarea { min-height: 77px; resize: vertical; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }.detail-dialog { max-width: 640px; }.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0; }.detail-info { padding: 11px; background: #f6f8f6; border-radius: 9px; }.detail-info span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }.detail-info strong { display: block; margin-top: 4px; color: var(--navy); font-size: 13px; }.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }.small-action { padding: 9px 11px; border: 1px solid #d9e3dd; border-radius: 8px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 700; }.small-action:hover { background: #edf7f0; }.draft-box { margin-top: 16px; padding: 14px; border-left: 3px solid var(--lime); background: #f4faf3; color: var(--ink); font-size: 13px; line-height: 1.55; }#toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; max-width: calc(100vw - 30px); padding: 11px 15px; color: white; background: var(--navy); border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s ease; }#toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-dialog { width: min(470px, calc(100% - 30px)); }.auth-dialog form { padding: 25px; }.auth-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }.auth-brand strong { color: var(--navy); font-size: 15px; letter-spacing: .12em; }.auth-field { display: grid; gap: 6px; margin-top: 19px; color: var(--ink); font-size: 12px; font-weight: 700; }.auth-field input { width: 100%; padding: 11px; border: 1px solid #dbe1dc; border-radius: 8px; outline-color: #6d3991; }
.private-gate { display: none; min-height: 100vh; place-items: center; padding: 24px; background: linear-gradient(145deg, #101827, #263755); }.is-locked .app-shell { display: none; }.is-locked .private-gate { display: grid; }.private-gate-card { width: min(440px, 100%); padding: 34px; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.25); }.private-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }.private-brand strong { color: var(--navy); letter-spacing: .12em; font-size: 15px; }.private-gate-card h1 { margin: 7px 0 10px; font-size: 30px; }.private-gate-card > p:not(.section-kicker) { margin: 0 0 23px; color: var(--muted); line-height: 1.6; }.private-gate-card .primary-button { width: 100%; }.gate-back { display: block; margin-top: 18px; color: #3567ac; font-size: 12px; font-weight: 700; text-align: center; }

@media (max-width: 1050px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.content-grid { grid-template-columns: 1fr; }.pipeline { grid-template-columns: 1fr 1fr; }.pipeline-stage { grid-template-columns: 88px 1fr 22px; }.case-board { grid-template-columns: repeat(4, 260px); }.focus-card p:not(.section-kicker) { max-width: 450px; } }
@media (max-width: 750px) { .app-shell { display: block; }.sidebar { position: fixed; left: 0; transform: translateX(-100%); width: 250px; transition: transform .25s ease; box-shadow: 8px 0 30px rgba(0,0,0,.18); }.sidebar.open { transform: translateX(0); }.main { padding: 0 16px 30px; }.topbar { min-height: 89px; }.menu-button { display: grid; place-items: center; }.welcome { margin-right: auto; }.welcome p { font-size: 10px; }.header-actions .icon-button { display: none; }.primary-button { padding: 10px 11px; font-size: 12px; }.focus-card { padding: 23px; align-items: flex-start; flex-direction: column; }.focus-card h2 { font-size: 23px; }.light-button { width: 100%; }.metric-grid { gap: 10px; }.metric-card { min-height: 123px; padding: 14px; }.metric-card strong { font-size: 25px; }.action-panel, .pipeline-panel, .candidate-panel { padding: 18px; }.pipeline { grid-template-columns: 1fr; padding-top: 18px; }.table-controls { display: block; }.search { margin-top: 10px; width: 100%; }.inbox-layout { grid-template-columns: 1fr; }.inbox-list { max-height: 250px; overflow: auto; }.message-preview { min-height: auto; }.form-grid, .detail-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.dialog-actions { flex-direction: column-reverse; }.dialog-actions button { width: 100%; }.view-intro h2 { font-size: 24px; } }
