:root {
  color-scheme: light;
  --brand: #10a7a7;
  --brand-dark: #087d7f;
  --brand-soft: #e5f8f7;
  --nav: #06383b;
  --nav-active: #0b5458;
  --ink: #172226;
  --muted: #6f7d83;
  --line: #dfe7e9;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --coral: #f06a4d;
  --coral-soft: #fff0ec;
  --indigo: #5565d8;
  --indigo-soft: #eef0ff;
  --green: #2a9a68;
  --danger: #c94040;
  --shadow: 0 12px 30px rgba(23, 46, 51, .1);
  --sidebar-width: 224px;
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { margin: 0; min-height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, textarea, select { width: 100%; border: 1px solid #ccd8db; border-radius: 6px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 40px; padding: 0 12px; }
textarea { resize: vertical; padding: 10px 12px; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 167, 167, .12); }
label { display: grid; gap: 7px; color: #3d4b50; font-weight: 600; }
small { font-weight: 400; color: var(--muted); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); line-height: 1.6; }
.center { text-align: center; }
.full { width: 100%; justify-content: center; }
.eyebrow { display: block; margin-bottom: 4px; color: var(--brand-dark); font-size: 12px; font-weight: 700; }

.button, .icon-button, .text-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.button { min-height: 40px; padding: 0 16px; border-radius: 6px; font-weight: 700; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #b9e4e2; }
.button.ghost { color: var(--muted); background: #f0f4f5; }
.button.danger { color: var(--danger); background: #fff; border: 1px solid #efcaca; }
.button.compact { min-height: 34px; padding: 0 11px; font-size: 13px; }
.icon-button { width: 38px; height: 38px; border-radius: 6px; color: #66767b; background: transparent; }
.icon-button:hover { background: #edf3f4; color: var(--ink); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button.dark { color: #9eb8ba; }
.icon-button.dark:hover { color: #fff; background: rgba(255,255,255,.1); }
.text-button { padding: 4px; color: var(--brand-dark); background: transparent; font-weight: 700; }
.text-button svg { width: 15px; height: 15px; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf4f5; }
.login-panel { width: min(420px, 100%); padding: 38px; border: 1px solid #d9e4e6; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 8px; color: #fff; background: var(--brand); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.small { width: 38px; height: 38px; margin: 0; }
.brand-mark.small svg { width: 20px; height: 20px; }
.login-product { margin-bottom: 6px; color: var(--brand-dark); font-weight: 800; }
.login-panel h1 { margin-bottom: 8px; font-size: 25px; }
.stack-form { display: grid; gap: 16px; margin-top: 24px; }
.form-error { min-height: 18px; color: var(--danger); font-size: 13px; font-weight: 500; }
.form-message { min-height: 18px; color: var(--brand-dark); font-size: 13px; font-weight: 500; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; color: #d7e3e4; background: var(--nav); }
.brand-block { min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-block strong, .brand-block span { display: block; }
.brand-block strong { color: #fff; font-size: 15px; }
.brand-block span { margin-top: 3px; color: #86a8aa; font-size: 11px; }
.sidebar-close { display: none; margin-left: auto; color: #fff; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.nav-section { margin: 17px 12px 7px; color: #6f9799; font-size: 11px; font-weight: 700; }
.nav-item { width: 100%; min-height: 43px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 6px; color: #a9c0c2; background: transparent; text-align: left; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.is-active { color: #fff; background: var(--nav-active); }
.nav-count { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; color: #06383b; background: #80dbd8; font-size: 11px; }
.nav-count.alert { color: #fff; background: var(--coral); }
.sidebar-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; border-top: 1px solid rgba(255,255,255,.08); color: #99b6b8; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 25; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }
.compact-select { min-width: 205px; display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid #d4dfe1; border-radius: 6px; background: #fff; }
.compact-select svg { width: 16px; color: var(--brand-dark); }
.compact-select select { min-height: 38px; border: 0; box-shadow: none; padding-left: 2px; }
.workspace-scroll { min-height: calc(100vh - 72px); padding: 20px 24px 32px; }
.view { display: none; }
.view.is-active { display: block; }

.metric-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.metric-strip article { position: relative; min-height: 104px; padding: 20px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip span { display: block; color: var(--muted); font-size: 12px; }
.metric-strip strong { display: block; margin-top: 10px; font-size: 27px; }
.metric-strip svg { position: absolute; right: 16px; top: 20px; width: 19px; color: #a6b6ba; }
.metric-strip article:nth-child(2) strong, .metric-strip article:nth-child(2) svg { color: var(--indigo); }
.metric-strip article:nth-child(3) strong, .metric-strip article:nth-child(3) svg { color: var(--coral); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; }
.span-2 { grid-column: span 1; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.overview-grid > *, .jobs-layout > *, .config-layout > *, .settings-grid > * { min-width: 0; }
.panel-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #e8edef; }
.panel-head p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.status-list, .timeline { padding: 8px 18px 16px; }
.status-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; min-height: 51px; border-bottom: 1px solid #edf1f2; }
.status-row:last-child { border-bottom: 0; }
.status-row strong, .status-row small { display: block; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a8b4b7; }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 4px #e6f6ef; }
.funnel { min-height: 216px; display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 14px; padding: 28px 24px 20px; }
.funnel-step { display: grid; align-content: end; gap: 8px; text-align: center; }
.funnel-bar { width: 100%; min-height: 10px; border-radius: 5px 5px 2px 2px; background: var(--brand); }
.funnel-step:nth-child(2) .funnel-bar, .funnel-step:nth-child(5) .funnel-bar { background: var(--indigo); }
.funnel-step:nth-child(3) .funnel-bar, .funnel-step:nth-child(6) .funnel-bar { background: var(--coral); }
.funnel-step strong { font-size: 17px; }
.funnel-step span { color: var(--muted); font-size: 12px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 12px 0; border-bottom: 1px solid #edf1f2; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); }
.timeline-icon svg { width: 13px; }
.timeline-item p { line-height: 1.45; }
.timeline-item small { display: block; margin-top: 4px; color: var(--muted); }
.compact-table { overflow-x: auto; }
.compact-row { width: 100%; min-width: 650px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 100px; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border: 0; border-bottom: 1px solid #edf1f2; background: #fff; text-align: left; }
.compact-row:last-child { border-bottom: 0; }
.compact-row strong, .compact-row small { display: block; }
.compact-row small { margin-top: 3px; color: var(--muted); }

.page-band { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stage-tabs { display: flex; align-items: center; min-height: 52px; padding: 0 10px; overflow-x: auto; }
.stage-tabs button { align-self: stretch; min-width: max-content; padding: 0 15px; border: 0; border-bottom: 2px solid transparent; color: #56656a; background: transparent; }
.stage-tabs button.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 700; }
.table-panel { overflow: hidden; }
.table-toolbar { min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; display: block; width: min(430px, 100%); }
.search-box svg { position: absolute; left: 12px; top: 11px; width: 17px; color: #91a0a5; }
.search-box input { padding-left: 38px; font-weight: 400; }
.table-toolbar select { width: 200px; }
.result-count { margin-left: auto; color: var(--muted); }
.table-scroll { overflow: auto; }
.data-table { width: 100%; min-width: 1020px; border-collapse: collapse; }
.data-table th { height: 46px; padding: 0 16px; color: #7a898e; background: #f8fafb; font-size: 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table td { height: 72px; padding: 10px 16px; border-top: 1px solid #edf1f2; vertical-align: middle; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #f6fbfb; }
.clickable-row { cursor: pointer; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-weight: 800; }
.avatar.indigo { color: var(--indigo); background: var(--indigo-soft); }
.person-cell strong, .person-cell small { display: block; }
.person-cell small { margin-top: 4px; color: var(--muted); }
.cell-main { max-width: 330px; line-height: 1.5; }
.cell-main small { display: block; color: var(--muted); }
.line-clamp { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tag { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 4px; color: #4f6065; background: #eef2f3; font-size: 12px; white-space: nowrap; }
.tag.teal { color: var(--brand-dark); background: var(--brand-soft); }
.tag.indigo { color: #4654ba; background: var(--indigo-soft); }
.tag.coral { color: #c94e32; background: var(--coral-soft); }
.score { display: inline-flex; min-width: 52px; height: 27px; align-items: center; justify-content: center; border-radius: 4px; color: #24764f; background: #e6f5ed; font-weight: 800; }
.score.medium { color: #9a6500; background: #fff4d9; }
.score.low { color: #b54632; background: var(--coral-soft); }
.empty-state, .empty-chat { min-height: 140px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state svg, .empty-chat svg { width: 28px; color: #a3b4b8; }
.empty-state.tall { min-height: 420px; }

.conversation-workspace { height: calc(100vh - 112px); min-height: 620px; display: grid; grid-template-columns: 330px minmax(460px, 1fr) 270px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.conversation-list-panel, .conversation-main { border-right: 1px solid var(--line); }
.conversation-filter { padding: 12px; border-bottom: 1px solid var(--line); }
.conversation-list { height: calc(100% - 65px); overflow-y: auto; }
.conversation-item { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; padding: 14px 12px; border: 0; border-bottom: 1px solid #edf1f2; background: #fff; text-align: left; }
.conversation-item:hover, .conversation-item.is-active { background: #edfafa; }
.conversation-item .avatar { grid-row: span 2; width: 42px; height: 42px; }
.conversation-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item time { color: #98a5aa; font-size: 11px; }
.conversation-item p { grid-column: 2 / 4; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat-head p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px; background: #fbfcfc; }
.message { display: flex; margin-bottom: 16px; }
.message.outgoing { justify-content: flex-end; }
.bubble { max-width: 72%; padding: 10px 13px; border-radius: 6px; line-height: 1.6; background: #eef2f3; }
.message.outgoing .bubble { background: #dff5f3; }
.bubble time { display: block; margin-top: 5px; color: #89979c; font-size: 10px; text-align: right; }
.chat-sync-note { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 12px; }
.conversation-profile { overflow-y: auto; padding: 18px; }
.conversation-profile .avatar { width: 48px; height: 48px; margin-bottom: 12px; }
.profile-facts { display: grid; gap: 12px; margin-top: 18px; }
.profile-facts div { padding-bottom: 11px; border-bottom: 1px solid #edf1f2; }
.profile-facts span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }

.resume-notice { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 18px; color: #506067; background: #f5f8f9; border-bottom: 1px solid var(--line); font-size: 12px; }
.resume-notice svg { width: 18px; color: var(--green); }
.jobs-layout { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(480px, 1.1fr); gap: 18px; }
.job-list { max-height: calc(100vh - 190px); overflow-y: auto; }
.job-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px 18px; border: 0; border-bottom: 1px solid #edf1f2; background: #fff; text-align: left; }
.job-row:hover, .job-row.is-active { background: #f0fafa; }
.job-row h3 { margin-bottom: 7px; }
.job-row p { color: var(--muted); font-size: 12px; }
.job-row .job-count { color: var(--brand-dark); font-weight: 700; }
.job-detail-body { padding: 20px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.keyword-group { margin-top: 18px; }
.keyword-group h3 { margin-bottom: 10px; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 7px; }
.jd-text { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); white-space: pre-wrap; line-height: 1.75; }

.approval-list { padding: 0 18px 16px; }
.approval-row { display: grid; grid-template-columns: minmax(260px, 1fr) 140px 160px auto; align-items: center; gap: 16px; min-height: 86px; border-bottom: 1px solid #edf1f2; }
.approval-row:last-child { border-bottom: 0; }
.approval-preview { line-height: 1.55; }
.approval-preview small { display: block; margin-top: 5px; color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.device-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.device-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.device-card-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.device-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; color: var(--brand-dark); background: var(--brand-soft); }
.device-card-head div:nth-child(2) { flex: 1; }
.device-card-head small { display: block; margin-top: 3px; color: var(--muted); }
.device-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px 16px; }
.device-facts span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.device-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 0 16px 16px; }
.command-panel { overflow: hidden; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; }
.config-layout .panel { padding-bottom: 18px; }
.config-layout .panel > label, .config-layout .panel > .field-grid, .config-layout .panel > .switch-row, .config-layout .panel > .button, .config-layout .panel > .form-message { margin: 16px 18px 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf1f2; }
.switch-row span, .switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 4px; }
input[role="switch"] { width: 42px; min-height: 24px; height: 24px; appearance: none; padding: 0; border: 0; border-radius: 12px; background: #becacd; position: relative; }
input[role="switch"]::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
input[role="switch"]:checked { background: var(--brand); }
input[role="switch"]:checked::after { transform: translateX(18px); }
.activity-list { padding: 0 18px 18px; }
.activity-row { display: grid; grid-template-columns: 130px 130px minmax(260px, 1fr) 160px; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid #edf1f2; }
.activity-row time, .activity-row small { color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-grid .panel { padding-bottom: 18px; }
.settings-grid .panel > form, .pairing-history { margin: 18px; }
.inline-form { display: flex; gap: 8px; }
.pairing-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 0; border-bottom: 1px solid #edf1f2; }
.pairing-row small { display: block; margin-top: 4px; color: var(--muted); }

.drawer { position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(580px, 100%); overflow-y: auto; background: #fff; box-shadow: -16px 0 40px rgba(21, 44, 49, .16); transform: translateX(102%); transition: transform .2s ease; }
.drawer.is-open { transform: translateX(0); }
.drawer-scrim { position: fixed; inset: 0; z-index: 65; display: none; border: 0; background: rgba(10, 28, 31, .38); }
.drawer-scrim.is-open { display: block; }
.drawer-head { position: sticky; top: 0; z-index: 2; min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-content { padding: 20px; }
.candidate-hero { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.candidate-hero .avatar { width: 56px; height: 56px; font-size: 17px; }
.candidate-hero p { margin-top: 6px; color: var(--muted); }
.drawer-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-section h3 { margin-bottom: 12px; }
.profile-text { white-space: pre-wrap; line-height: 1.7; color: #425157; }
.resume-block { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.resume-block + .resume-block { margin-top: 10px; }
.analysis-box { margin-top: 10px; padding: 12px; border-left: 3px solid var(--indigo); background: #f6f7ff; }
.analysis-box p { margin: 8px 0; line-height: 1.55; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.modal { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 8px; box-shadow: var(--shadow); }
.modal.wide { width: min(760px, calc(100% - 32px)); }
.modal.small { width: min(420px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(11, 29, 32, .43); }
.modal-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.pair-code { margin: 22px 0 10px; color: var(--ink); font-size: 38px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.file-picker { min-height: 58px; grid-template-columns: 22px 1fr; align-items: center; padding: 12px; border: 1px dashed #aababc; border-radius: 6px; color: var(--muted); cursor: pointer; }
.file-picker input { display: none; }
.file-picker svg { width: 19px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; max-width: min(440px, calc(100% - 32px)); padding: 11px 16px; border-radius: 6px; color: #fff; background: #263a3e; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mobile-scrim { display: none; }

@media (min-width: 1250px) {
  .overview-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
}

@media (max-width: 1180px) {
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
  .metric-strip article:nth-child(3) { border-right: 0; }
  .metric-strip article:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .conversation-workspace { grid-template-columns: 300px minmax(430px, 1fr); }
  .conversation-profile { display: none; }
  .device-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-101%); transition: transform .2s; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-flex; }
  .workspace { margin-left: 0; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(8, 27, 30, .4); }
  .mobile-scrim.is-open { display: block; }
  .overview-grid, .jobs-layout, .config-layout { grid-template-columns: 1fr; }
  .conversation-workspace { grid-template-columns: 300px minmax(430px, 1fr); overflow-x: auto; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { height: auto; min-height: 66px; padding: 10px 12px; }
  .topbar-title p { display: none; }
  .topbar-actions { gap: 4px; }
  .compact-select { min-width: 0; width: 42px; padding: 0 10px; }
  .compact-select select { position: absolute; opacity: 0; width: 42px; }
  #pair-button { width: 40px; padding: 0; }
  #pair-button span { display: none; }
  .workspace-scroll { padding: 12px; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article { min-height: 88px; padding: 14px; }
  .metric-strip article:nth-child(2n) { border-right: 0; }
  .metric-strip article:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metric-strip article:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-strip strong { font-size: 22px; }
  .overview-grid { gap: 12px; }
  .funnel { gap: 6px; padding: 20px 10px 16px; }
  .funnel-step span { writing-mode: vertical-rl; max-height: 62px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .table-toolbar select { width: 100%; }
  .result-count { margin-left: 0; }
  .conversation-workspace { height: auto; min-height: calc(100vh - 92px); display: block; }
  .conversation-list-panel { border-right: 0; }
  .conversation-list-panel.has-selection { display: none; }
  .conversation-main { min-height: calc(100vh - 94px); border: 0; }
  .conversation-main:not(.has-selection) { display: none; }
  .chat-back { display: inline-flex !important; }
  .device-grid { grid-template-columns: 1fr; }
  .field-grid, .field-grid.three { grid-template-columns: 1fr; }
  .approval-row { grid-template-columns: 1fr; padding: 16px 0; gap: 9px; }
  .row-actions { justify-content: flex-start; }
  .activity-row { grid-template-columns: 90px 100px 1fr; }
  .activity-row > :last-child { display: none; }
  .inline-form { flex-direction: column; }
  .drawer { width: 100%; }
  .panel-head.table-heading { align-items: flex-start; }
}
