:root {
  --navy: #10243f;
  --navy-2: #183656;
  --ink: #172033;
  --muted: #687386;
  --canvas: #f3f6fb;
  --surface: #ffffff;
  --line: #dce3ee;
  --blue: #1463d7;
  --blue-soft: #e8f0ff;
  --teal: #0d9c91;
  --teal-soft: #ddf6f3;
  --amber: #ae6d00;
  --amber-soft: #fff1d6;
  --red: #c43838;
  --red-soft: #fce7e6;
  --shadow: 0 12px 32px rgba(24, 54, 86, 0.1);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

/* S1-03 unified intake keeps source evidence and downstream results visually
   separate; this is a product control, not only decoration. */
.intake-list { display: grid; gap: 1rem; margin-top: 1rem; }
.intake-record { overflow: hidden; }
.intake-status-stack { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.intake-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.intake-facts div { background: var(--surface-muted, #f5f7fa); border-radius: .65rem; padding: .75rem; }
.intake-facts dt { color: var(--text-muted, #617089); font-size: .76rem; margin-bottom: .25rem; }
.intake-facts dd { font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.intake-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border, #dce2e9); border-radius: .8rem; overflow: hidden; }
.intake-compare section { min-height: 8.5rem; padding: 1rem; background: #fff; }
.intake-compare section + section { border-left: 1px solid var(--border, #dce2e9); background: #f7f9fc; }
.intake-compare strong { display: block; margin: .4rem 0; overflow-wrap: anywhere; }
.compare-label { color: #496079; font-size: .76rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.intake-tabs { overflow-x: auto; padding-bottom: .25rem; }
.intake-tabs .tab-button { white-space: nowrap; }
.intake-tabs .tab-button span { display: inline-grid; min-width: 1.5rem; min-height: 1.5rem; margin-left: .35rem; place-items: center; border-radius: 999px; background: rgba(16,36,63,.08); font-size: .75rem; }
.intake-filter-form .form-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.intake-result-panel { position: relative; }
.intake-hard-block { margin: .75rem 0 0; padding: .75rem; border: 1px solid #efaaaa; border-radius: .6rem; background: var(--red-soft); color: #8f1f1f; font-weight: 800; }
.intake-candidates { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.intake-candidate-list { display: grid; gap: .7rem; }
.intake-candidate { padding: .85rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; }
.intake-candidate.is-high-risk { border-left: 4px solid var(--amber); background: #fffbf3; }
.intake-candidate.is-blocked { border-left: 4px solid var(--red); background: #fff7f7; }
.intake-candidate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.intake-candidate-head strong, .intake-candidate-head span { display: block; overflow-wrap: anywhere; }
.intake-candidate-head span, .candidate-source { color: var(--muted); font-size: .8rem; }
.candidate-value { margin: .65rem 0 .25rem; font-weight: 720; overflow-wrap: anywhere; }
.candidate-source { margin: 0 0 .65rem; }
.intake-match-list { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.intake-match-list span { padding: .4rem .6rem; border-radius: 999px; background: var(--blue-soft); color: #174b92; font-size: .78rem; }
.intake-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .8rem; }
.intake-control-grid form { padding: .75rem; border: 1px solid var(--line); border-radius: .7rem; background: #fafbfd; }
.main-content .danger-text,
.main-content .text-button.danger-text { color: var(--red); }
.confirmation-center { margin: 1.1rem 0 1.25rem; padding: 1.1rem; border: 1px solid #b9d4ee; border-radius: 1rem; background: linear-gradient(145deg, #f4f9ff, #eef8f7); }
.confirmation-center > .section-head { align-items: flex-start; }
.confirmation-list { display: grid; gap: .9rem; }
.confirmation-card { border-color: #c5dced; box-shadow: 0 8px 24px rgba(30, 83, 124, .07); }
.confirmation-card.is-blocked { border-left: 5px solid var(--red); }
.confirmation-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.confirmation-preview-grid > div { min-width: 0; padding: .8rem; border: 1px solid #dbe8f1; border-radius: .7rem; background: #f9fcff; }
.confirmation-preview-grid span, .confirmation-commit span { display: block; color: var(--muted); font-size: .76rem; }
.confirmation-preview-grid strong { display: block; margin: .25rem 0; color: var(--navy); overflow-wrap: anywhere; }
.confirmation-preview-grid p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.confirmation-form { margin-top: .85rem; padding: .85rem; border: 1px solid #d8e5ef; border-radius: .75rem; background: #fff; }
.confirmation-form h4, .confirmation-history h4 { margin: 0 0 .7rem; color: var(--navy); }
.confirmation-history { margin-top: .9rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.confirmation-commit { display: grid; gap: .55rem; padding: .7rem; border: 1px solid #dfe8f0; border-radius: .65rem; background: #fbfdff; }
.confirmation-commit + .confirmation-commit { margin-top: .55rem; }
.confirmation-commit details { color: var(--blue); }
.confirmation-commit details[open] { color: inherit; }
.confirmation-commit summary { cursor: pointer; font-weight: 700; }
.confirmation-commit form { margin-top: .65rem; padding-top: .65rem; border-top: 1px dashed #d8e3ed; }

@media (max-width: 900px) {
  .intake-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-filter-form .form-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-control-grid { grid-template-columns: 1fr; }
  .confirmation-center > .section-head { flex-direction: column; }
}

@media (max-width: 520px) {
  .intake-facts, .intake-compare, .intake-filter-form .form-grid.five { grid-template-columns: 1fr; }
  .intake-compare section + section { border-left: 0; border-top: 1px solid var(--border, #dce2e9); }
  .intake-status-stack { justify-content: flex-start; }
  .intake-record .section-head { align-items: flex-start; flex-direction: column; }
  .intake-candidate-head { flex-direction: column; }
  .intake-candidate .form-grid.three { grid-template-columns: 1fr; }
  .confirmation-preview-grid { grid-template-columns: 1fr; }
  .confirmation-center { margin-inline: -.15rem; padding: .8rem; }
}

* { box-sizing: border-box; }
html, body { max-width: 100%; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
[hidden][hidden] { display: none; }
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(20, 99, 215, 0.45);
  outline-offset: 2px;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 0.9fr);
  background: linear-gradient(133deg, var(--navy) 0%, #153451 58%, #155f72 100%);
}
.auth-brand { color: #f8fbff; padding: clamp(2.5rem, 8vw, 7.5rem); align-self: center; max-width: 720px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: white; background: linear-gradient(140deg, #1986e5, #15afa1); font-weight: 800; font-size: 1.35rem; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; font-size: 0.95rem; }
.eyebrow { margin: 1.6rem 0 0.45rem; color: #9fd7ff; font-weight: 700; letter-spacing: 0.09em; font-size: 0.75rem; text-transform: uppercase; }
.auth-brand h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.65rem); line-height: 1.14; letter-spacing: -0.04em; }
.auth-brand > p:not(.eyebrow) { max-width: 36rem; line-height: 1.8; font-size: 1.04rem; color: #d5e5f5; }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.85rem; color: #e9f7ff; }
.auth-points li::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 0.6rem; border-radius: 50%; color: #075a55; background: #83e3d8; font-size: 0.75rem; font-weight: 800; }
.auth-card-wrap { padding: 2rem; display: grid; align-content: center; justify-items: center; background: rgba(255,255,255,0.96); }
.auth-card { width: min(100%, 440px); }
.auth-card h2 { margin: 0; font-size: 1.55rem; letter-spacing: -0.02em; }
.auth-card > p { color: var(--muted); line-height: 1.65; }
.auth-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.auth-heading-row p { margin: 0.35rem 0 0; color: var(--muted); line-height: 1.55; }
.password-field { display: flex; align-items: stretch; }
.password-field input { min-width: 0; border-radius: 8px 0 0 8px; }
.password-toggle { flex: 0 0 auto; padding: 0 0.8rem; border: 1px solid #cbd6e4; border-left: 0; border-radius: 0 8px 8px 0; color: #315a83; background: #edf3f9; font-weight: 700; }
.setup-progress { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin: 0 0 1.2rem; padding: 0; }
.setup-progress li { display: flex; align-items: center; gap: 0.4rem; min-width: 0; padding: 0.55rem; color: #718096; background: #f0f4f8; border-radius: 8px; font-size: 0.75rem; font-weight: 700; }
.setup-progress li span { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; color: #52657c; background: #dce6f0; }
.setup-progress li.is-active { color: #1558a8; background: var(--blue-soft); }
.setup-progress li.is-active span { color: white; background: var(--blue); }
.setup-progress li.is-complete { color: #08776f; background: var(--teal-soft); }
.setup-progress li.is-complete span { color: white; background: var(--teal); }
.step-explanation { margin: 0 0 1rem; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.setup-summary { display: grid; gap: 0.38rem; margin-top: 1rem; padding: 0.8rem; border: 1px solid #d8e5f1; border-radius: 9px; color: #56667b; background: #f7fafc; font-size: 0.8rem; }
.setup-summary strong { color: var(--navy); }

.application { min-height: 100vh; }
.topbar { height: 64px; min-height: 64px; padding: 0.5rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.topbar-end { flex-wrap: nowrap; justify-content: flex-end; }
.wordmark { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--navy); text-decoration: none; font-weight: 800; white-space: nowrap; }
.global-search { position: relative; flex: 1 1 360px; display: flex; align-items: center; gap: 0.35rem; max-width: 620px; min-width: 160px; padding: 0.18rem 0.35rem 0.18rem 0.7rem; color: #667891; background: #f4f7fb; border: 1px solid #e0e8f1; border-radius: 9px; }
.global-search input { min-width: 0; padding: 0.32rem 0; border: 0; background: transparent; box-shadow: none; }
.global-search input:focus { border: 0; box-shadow: none; }
.global-search .text-button { padding: 0.3rem 0.45rem; white-space: nowrap; }
.global-search-results { position: absolute; top: calc(100% + 0.5rem); right: 0; left: 0; max-height: min(64vh, 520px); overflow: auto; padding: 0.45rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.search-feedback { margin: 0.4rem 0.5rem; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.search-result { width: 100%; display: grid; grid-template-columns: minmax(64px, auto) minmax(0, 1fr); gap: 0.15rem 0.65rem; padding: 0.65rem; border: 0; border-radius: 7px; color: #263c56; background: transparent; text-align: left; }
.search-result:hover, .search-result:focus-visible { background: var(--blue-soft); outline: 0; }
.search-result span { grid-row: span 2; align-self: center; color: #35648f; font-size: 0.75rem; font-weight: 750; }
.search-result strong { overflow: hidden; color: var(--navy); font-size: 0.84rem; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { overflow: hidden; color: var(--muted); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.organization-context-control, .workspace-control { flex: 0 1 205px; max-width: 205px; min-width: 0; }
.organization-context-control, .workspace-control { display: flex; align-items: center; gap: 0.35rem; }
.organization-context-control select, .workspace-control select { max-width: 100%; padding: 0.42rem 1.85rem 0.42rem 0.58rem; color: #294b6b; font-size: 0.8rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.context-control-label { flex: 0 0 auto; color: #64748a; font-size: 0.75rem; font-weight: 760; white-space: nowrap; }
.organization-context-loading, .workspace-loading, .organization-context-retry, .workspace-retry { display: inline-flex; align-items: center; min-height: 30px; color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.organization-context-retry, .workspace-retry { padding: 0.3rem 0.4rem; border: 1px solid #e5ca89; border-radius: 7px; color: #8e5b00; background: var(--amber-soft); }
.context-badge { display: grid; min-width: 0; line-height: 1.2; }
.context-badge strong { max-width: 240px; overflow: hidden; color: #294b6b; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.connection-status { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.connection-status.is-online { color: #087b73; }
.connection-status.is-error { color: var(--red); }
.global-connection-status { display: inline-flex; align-items: center; max-width: min(34vw, 300px); padding: 0.36rem 0.58rem; border: 1px solid #f0b9b9; border-radius: 999px; color: #9f2929; background: #fff1f1; font-size: 0.75rem; font-weight: 700; line-height: 1.25; white-space: normal; }
.global-connection-status.is-online { display: none; }
.global-connection-status:not(.is-online)::before { content: "!"; display: grid; place-items: center; flex: 0 0 auto; width: 1rem; height: 1rem; margin-right: 0.32rem; border-radius: 50%; color: white; background: #b43a3a; font-size: 0.75rem; }
.current-user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #46546b; font-size: 0.88rem; }
.topbar-action { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 36px; padding: 0.42rem 0.55rem; border: 1px solid transparent; border-radius: 8px; color: #34516e; background: transparent; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.topbar-action:hover { border-color: #d9e5f0; background: #f0f5fa; }
.user-menu-slot { position: relative; flex: 0 0 auto; }
.user-menu-button { display: flex; align-items: center; gap: 0.45rem; min-height: 38px; max-width: 220px; padding: 0.28rem 0.5rem; border: 1px solid #dbe5ef; border-radius: 10px; color: #2e465f; background: #f8fafc; }
.user-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; color: white; background: #2c70b7; font-size: 0.78rem; font-weight: 800; }
.user-menu { position: absolute; top: calc(100% + 0.55rem); right: 0; z-index: 45; width: min(270px, calc(100vw - 1.5rem)); padding: 0.45rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.user-menu > button { width: 100%; padding: 0.65rem 0.7rem; border: 0; border-radius: 7px; color: #2e4c6a; background: transparent; text-align: left; }
.user-menu > button:hover { background: #edf4fb; }
.user-menu-summary { display: grid; gap: 0.2rem; margin-bottom: 0.35rem; padding: 0.6rem 0.7rem; border-bottom: 1px solid #e7edf4; }
.user-menu-summary strong { overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; }
.user-menu-summary span { color: var(--muted); font-size: 0.75rem; }
.owner-perspective-menu { display: grid; gap: 0.15rem; margin: 0.25rem 0; padding: 0.4rem 0; border-bottom: 1px solid #e7edf4; }
.owner-perspective-menu > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.7rem; }
.owner-perspective-menu > div strong { color: var(--navy); font-size: 0.78rem; }
.owner-perspective-menu > div span { color: #8a5a12; font-size: 0.75rem; }
.owner-perspective-menu > button { width: 100%; padding: 0.55rem 0.7rem; border: 0; border-radius: 7px; color: #2e4c6a; background: transparent; text-align: left; }
.owner-perspective-menu > button:hover, .owner-perspective-menu > button[aria-checked="true"] { background: #edf4fb; }
.health-details { margin: 0.25rem 0; padding: 0.55rem 0.7rem; border-top: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; color: #5a6b80; font-size: 0.78rem; }
.health-details summary { cursor: pointer; font-weight: 700; }
.health-details .connection-status { display: block; margin-top: 0.5rem; white-space: normal; }
.workspace { display: flex; min-height: calc(100vh - 64px); }
.sidebar { width: 230px; flex: 0 0 230px; padding: 1rem 0.75rem; background: var(--navy); color: #cedaeb; display: flex; flex-direction: column; }
.sidebar nav { display: grid; gap: 0.32rem; }
.sidebar-heading { display: grid; gap: 0.28rem; margin: 0 0.35rem 0.9rem; padding: 0 0.45rem 0.8rem; border-bottom: 1px solid rgba(183,201,223,0.2); }
.sidebar-heading strong { color: #eef6ff; font-size: 0.86rem; line-height: 1.35; }
.mode-kicker { color: #7fc7f0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.09em; }
.nav-group-label { margin: 0.85rem 0.9rem 0.2rem; color: #85a2c1; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0.1rem; }
.legacy-nav { display: grid; gap: 0.12rem; padding: 0.1rem 0 0.15rem; }
.legacy-nav-item { padding-left: 1.15rem; color: #b4c7dd; font-size: 0.84rem; font-weight: 610; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 0.7rem; border: 0; border-radius: 9px; padding: 0.78rem 0.9rem; color: #cedaeb; background: transparent; text-align: left; font-weight: 650; transition: background 0.2s, color 0.2s; }
.nav-item:hover, .nav-item.is-active { color: white; background: rgba(105, 182, 235, 0.2); }
.nav-item span:first-child { width: 1.15rem; flex: 0 0 1.15rem; color: #75c6f9; text-align: center; }
.nav-item span:last-child { width: auto; min-width: 0; flex: 1 1 auto; color: inherit; }
.sidebar-note { margin: auto 0.3rem 0; padding: 0.85rem; color: #b7c9df; border: 1px solid rgba(183,201,223,0.2); border-radius: 10px; font-size: 0.76rem; line-height: 1.5; }
.sidebar-note p { margin: 0.35rem 0 0; }
.sidebar-backdrop { display: none; }
.main-content { flex: 1; min-width: 0; padding: clamp(1rem, 2.5vw, 2.1rem); }

.showroom-body { min-height: 100vh; background: radial-gradient(circle at top right, #dff5f1 0, transparent 32%), linear-gradient(145deg, #eef4f8, #f8fafc 52%, #e7eff7); }
.showroom-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 5vw, 4rem); background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.showroom-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) 0; }
.showroom-access-card { width: min(520px, 100%); margin: 5vh auto; box-shadow: var(--shadow); }
.showroom-access-card h1, .showroom-hero h1 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: -0.045em; }
.showroom-access-card > p:not(.eyebrow), .showroom-hero > p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
.showroom-hero { display: grid; justify-items: start; padding: clamp(1.5rem, 5vw, 4rem); margin-bottom: 1rem; color: white; background: linear-gradient(120deg, #10243f, #15556a 65%, #0d8b82); border-radius: 20px; box-shadow: var(--shadow); }
.showroom-hero h1 { color: white; }
.showroom-hero .eyebrow { margin-top: 0; }
.showroom-hero > p:not(.eyebrow) { color: #d8edf4; }
.showroom-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr) auto; align-items: end; gap: 0.8rem; margin-bottom: 1rem; }
.showroom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.showroom-product { min-width: 0; box-shadow: 0 8px 24px rgba(24,54,86,0.07); }
.showroom-product h2 { margin: 0; color: var(--navy); font-size: 1.35rem; }
.showroom-product > p { color: var(--muted); line-height: 1.65; }
.showroom-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin: 1rem 0; }
.showroom-specs div { min-width: 0; padding: 0.65rem; background: #f5f8fc; border-radius: 9px; }
.showroom-specs dt { color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.showroom-specs dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; color: #24415e; font-size: 0.86rem; }
.showroom-note { min-height: 2.5rem; }
@media (max-width: 680px) { .showroom-toolbar { grid-template-columns: 1fr; } .showroom-topbar { align-items: flex-start; flex-direction: column; } }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.35rem; }
.page-head h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.035em; }
.page-head p { margin: 0.38rem 0 0; color: var(--muted); line-height: 1.55; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.platform-page-head { align-items: center; padding: clamp(1rem, 2vw, 1.4rem); background: linear-gradient(118deg, #112d4c, #15556a 70%, #0d8b82); border-radius: var(--radius); box-shadow: 0 10px 26px rgba(16, 51, 79, 0.13); }
.platform-page-head h1 { color: white; font-size: clamp(1.7rem, 3vw, 2.25rem); }
.platform-page-head > div > p:not(.platform-eyebrow) { color: #d2e9f2; }
.platform-page-head .secondary-button { color: #dceefa; background: rgba(255,255,255,0.14); }
.platform-page-head .secondary-button:hover { background: rgba(255,255,255,0.23); }
.platform-page-head .button { color: #0e4253; background: #b8f2e9; box-shadow: none; }
.platform-page-head .button:hover { background: #d0faf4; }
.platform-page-head .platform-eyebrow { margin: 0 0 0.35rem; color: #75cdea; font-size: 0.75rem; letter-spacing: 0.12em; }
.my-work-content { display: grid; gap: 1rem; }
.platform-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; padding: 0.2rem 0.1rem; }
.platform-safe-note { color: #516176; font-size: 0.79rem; line-height: 1.45; }
.my-work-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) minmax(260px, 0.9fr); gap: 1rem; }
.my-work-lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(290px, 0.9fr); gap: 1rem; }
.work-panel { min-width: 0; }
.work-panel .section-head { margin-bottom: 0.7rem; }
.panel-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 0.45rem; border-radius: 999px; color: #185a93; background: #e5f1fb; font-size: 0.78rem; font-weight: 800; }
.panel-count.danger { color: #a53535; background: var(--red-soft); }
.task-list, .work-record-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
.task-item, .work-record { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; width: 100%; max-width: 100%; box-sizing: border-box; padding: 0.72rem; border: 1px solid #e2eaf3; border-radius: 9px; background: #fbfcfe; }
.task-item-main, .work-record > div { min-width: 0; }
.task-item-main { flex: 1 1 0; }
.task-item h3, .work-record h3 { overflow: hidden; color: #233a56; font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.task-item p, .work-record p { margin: 0.26rem 0 0; overflow: hidden; color: var(--muted); font-size: 0.75rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.task-item-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.4rem; }
.task-complete { padding: 0.45rem 0.6rem; font-size: 0.76rem; white-space: nowrap; }
.task-table-panel { grid-column: 1 / -1; }
.task-table-filter-form { display: grid; gap: 0.58rem; margin: 0 0 0.85rem; padding: 0.78rem; border: 1px solid #dce8f4; border-radius: 10px; background: #f8fbfe; }
.task-table-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(210px, 1.6fr); gap: 0.55rem; align-items: end; }
.task-table-filter-grid > label { display: grid; gap: 0.28rem; min-width: 0; color: #43516a; font-size: 0.75rem; font-weight: 720; }
.task-table-filter-grid select, .task-table-filter-grid input { min-width: 0; padding: 0.48rem 0.56rem; font-size: 0.8rem; }
.task-table-filter-grid .task-table-assigned { display: flex; align-items: center; gap: 0.38rem; min-height: 34px; padding-top: 1.15rem; white-space: nowrap; }
.task-table-filter-grid .task-table-assigned input { width: auto; margin: 0; }
.task-table-filter-grid .task-table-search { grid-column: span 2; }
.task-table-filter-actions { margin-top: 0; }
.task-table-table-wrap { max-height: 530px; overflow: auto; }
.task-data-table { min-width: 920px; }
.task-data-table th { position: sticky; top: 0; z-index: 2; }
.task-data-table .task-table-selection-column { position: sticky; left: 0; z-index: 3; width: 48px; min-width: 48px; padding-right: 0.45rem; padding-left: 0.45rem; background: #f7f9fc; text-align: center; }
.task-data-table td.task-table-selection-column { background: var(--surface); }
.task-data-table .task-table-first-data-column { position: sticky; left: 48px; z-index: 2; min-width: 128px; background: var(--surface); box-shadow: 1px 0 0 #dfe7f0, 7px 0 12px rgba(28, 59, 92, 0.035); }
.task-data-table th.task-table-first-data-column { z-index: 3; background: #f7f9fc; }
.task-data-table .task-table-selection-column input { width: 16px; height: 16px; vertical-align: middle; }
.task-table-title { display: block; min-width: 170px; max-width: 360px; overflow-wrap: anywhere; font-weight: 690; }
.task-table-selection-note { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.task-table-support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.95rem; }
.task-table-support-card { min-width: 0; padding: 0.8rem; border: 1px solid #e0e9f2; border-radius: 10px; background: #fbfcfe; }
.task-table-support-card > h3 { margin: 0 0 0.62rem; color: #29435f; font-size: 0.88rem; }
.task-table-view-controls { display: grid; gap: 0.48rem; }
.task-table-view-picker { display: grid; gap: 0.28rem; color: #43516a; font-size: 0.75rem; font-weight: 720; }
.task-table-view-picker select { padding: 0.46rem 0.54rem; font-size: 0.8rem; }
.task-table-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.task-table-save-view-form { display: grid; gap: 0.38rem; margin-top: 0.66rem; padding-top: 0.66rem; border-top: 1px solid #e4ebf3; }
.task-table-save-view-form > label { color: #43516a; font-size: 0.75rem; font-weight: 720; }
.task-table-save-view-form input { padding: 0.48rem 0.56rem; font-size: 0.8rem; }
.task-table-save-view-form .form-actions { margin-top: 0.1rem; }
.task-table-compact-note { margin: 0.34rem 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.task-table-inline-error { margin: 0.55rem 0 0; padding: 0.58rem 0.66rem; border-radius: 8px; color: #9d2929; background: var(--red-soft); font-size: 0.78rem; line-height: 1.42; }
.task-table-history-list, .task-table-export-list, .task-table-bulk-result ul { display: grid; gap: 0.38rem; margin: 0.58rem 0 0; padding: 0; list-style: none; }
.task-table-history-list li, .task-table-export-list li, .task-table-bulk-result li { display: flex; align-items: center; justify-content: space-between; gap: 0.55rem; padding: 0.52rem 0; border-top: 1px solid #e6edf4; font-size: 0.77rem; }
.task-table-history-list li:first-child, .task-table-export-list li:first-child, .task-table-bulk-result li:first-child { border-top: 0; }
.task-table-history-list small, .task-table-export-list small { color: var(--muted); font-size: 0.75rem; text-align: right; }
.task-table-export-list li > div { display: grid; gap: 0.18rem; min-width: 0; }
.task-table-export-list strong { color: #29435f; }
.task-table-export-actions { margin-top: 0.2rem; }
.task-table-bulk-form { display: grid; gap: 0.55rem; margin-top: 0.95rem; padding: 0.9rem; border: 1px solid #d5e6f4; border-radius: 10px; background: #f7fbff; }
.task-table-subhead { align-items: flex-start; margin: 0; }
.task-table-subhead h3 { color: #29435f; }
.task-table-subhead p { max-width: 680px; }
.task-table-paste-help { margin: 0; color: #4d6079; font-size: 0.76rem; line-height: 1.5; }
.task-table-paste-help code { padding: 0.08rem 0.22rem; color: #284a6a; background: #eaf3fb; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1em; }
.task-table-bulk-form textarea { min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; }
.task-table-bulk-form .form-actions { margin-top: 0; }
.task-table-bulk-result { margin-top: 0.7rem; padding: 0.72rem; border: 1px solid #d8e5f0; border-radius: 9px; background: #fff; }
.task-table-bulk-result > p { margin: 0; color: #425b72; font-size: 0.78rem; line-height: 1.45; }
.task-table-bulk-result li { justify-content: flex-start; flex-wrap: wrap; }
.task-table-bulk-result small { color: var(--muted); font-size: 0.75rem; }
.risk-panel { border-color: #f1d5d3; }
.risk-panel .section-head h2 { color: #8c3030; }
.empty-state.compact { padding: 1.45rem 0.75rem; }
.static-field { min-height: 41px; margin: 0; padding: 0.62rem 0.68rem; color: #4d6079; background: #f6f8fb; border: 1px dashed #ced9e6; border-radius: 8px; font-size: 0.85rem; line-height: 1.35; }
.platform-unavailable { max-width: 720px; margin: 0 auto; }
.platform-unavailable h2 { margin-top: 0.85rem; color: #5d3940; }
.platform-unavailable p { line-height: 1.6; }
.collaboration-panel { display: grid; gap: 0.9rem; }
.collaboration-head { margin-bottom: 0; }
.collaboration-privacy-note { margin: 0; padding: 0.72rem 0.8rem; color: #6a4b00; background: #fff8e8; border: 1px solid #f1ddb2; border-radius: 9px; font-size: 0.8rem; line-height: 1.5; }
.collaboration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.collaboration-column { min-width: 0; padding: 0.95rem; background: #fbfcfe; border: 1px solid #e2eaf3; border-radius: 10px; }
.collaboration-section-head { align-items: flex-start; margin-bottom: 0.7rem; }
.collaboration-section-head h3 { color: #233a56; }
.collaboration-record-list, .collaboration-file-list { display: grid; gap: 0.55rem; max-height: 344px; overflow: auto; padding-right: 0.12rem; }
.collaboration-record, .collaboration-file { min-width: 0; padding: 0.72rem; background: white; border: 1px solid #e2eaf3; border-radius: 9px; }
.collaboration-record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.collaboration-record-head h4 { min-width: 0; margin: 0; color: #233a56; font-size: 0.86rem; overflow-wrap: anywhere; }
.collaboration-record-head .text-button { flex: 0 0 auto; padding: 0.05rem 0; font-size: 0.75rem; }
.collaboration-record p { margin: 0; color: #263b56; font-size: 0.84rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.collaboration-record-head + p { margin-top: 0.45rem; }
.collaboration-record small { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.75rem; line-height: 1.4; overflow-wrap: anywhere; }
.collaboration-file { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.collaboration-file > div { min-width: 0; }
.collaboration-file h4 { margin: 0; overflow: hidden; color: #233a56; font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
.collaboration-file p { margin: 0.28rem 0 0; overflow: hidden; color: var(--muted); font-size: 0.75rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.download-file-button { flex: 0 0 auto; padding: 0.45rem 0.6rem; font-size: 0.76rem; white-space: nowrap; }
.collaboration-form { display: grid; gap: 0.42rem; margin-top: 0.8rem; padding-top: 0.85rem; border-top: 1px solid #e3ebf4; }
.collaboration-form > label { color: #43516a; font-size: 0.8rem; font-weight: 720; }
.collaboration-form .form-actions { margin-top: 0.12rem; }
.collaboration-control-note { margin: 0; padding: 0.58rem 0.65rem; color: #445a72; background: #f1f7fc; border: 1px solid #d7e7f5; border-radius: 8px; font-size: 0.75rem; line-height: 1.45; }
.collaboration-control-note strong { color: #234d76; }
.collaboration-multiselect-field select { min-height: 6.4rem; }
.advanced-note-detail { display: grid; gap: 0.72rem; margin-top: 0.85rem; padding: 0.85rem; border: 1px solid #cfe0f0; border-radius: 10px; background: #f5faff; }
.advanced-note-detail-head { align-items: flex-start; margin: 0; }
.advanced-note-detail-head h4, .advanced-note-detail h5 { margin: 0; color: #233f5e; }
.advanced-note-detail-head p { margin: 0.22rem 0 0; color: #60748b; font-size: 0.76rem; line-height: 1.45; }
.inline-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.55rem; }
.advanced-note-summary { padding: 0.72rem; background: white; border: 1px solid #ddeaf4; border-radius: 9px; }
.advanced-note-summary .eyebrow { margin: 0 0 0.3rem; color: #55708e; font-size: 0.75rem; font-weight: 720; }
.advanced-note-summary h5 { font-size: 0.9rem; }
.advanced-note-body { margin: 0.48rem 0 0; color: #263b56; font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.advanced-note-summary small { display: block; margin-top: 0.55rem; color: var(--muted); font-size: 0.75rem; line-height: 1.4; overflow-wrap: anywhere; }
.advanced-note-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.62rem; margin: 0; }
.advanced-note-meta-grid > div { min-width: 0; padding: 0.62rem; border: 1px solid #deebf5; border-radius: 8px; background: white; }
.advanced-note-meta-grid dt { color: #64778e; font-size: 0.75rem; font-weight: 720; }
.advanced-note-meta-grid dd { min-width: 0; margin: 0.3rem 0 0; color: #334a64; font-size: 0.78rem; line-height: 1.45; overflow-wrap: anywhere; }
.note-chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.note-tag, .note-mention { display: inline-flex; align-items: center; max-width: 100%; padding: 0.2rem 0.42rem; color: #245b88; background: #e8f4ff; border-radius: 999px; font-size: 0.75rem; line-height: 1.25; overflow-wrap: anywhere; }
.note-mention { color: #0c6a64; background: #e5f8f4; }
.note-linked-file-list { display: grid; gap: 0.46rem; margin: 0; padding: 0; list-style: none; }
.note-linked-file-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.46rem 0.52rem; background: #f8fbfe; border: 1px solid #e3edf5; border-radius: 7px; }
.note-linked-file-list span { min-width: 0; }
.note-linked-file-list strong, .note-linked-file-list small { display: block; overflow-wrap: anywhere; }
.note-linked-file-list strong { color: #29445e; font-size: 0.76rem; }
.note-linked-file-list small { margin-top: 0.16rem; color: #64778e; font-size: 0.75rem; }
.note-linked-file-list .text-button { flex: 0 0 auto; padding: 0.12rem 0; font-size: 0.75rem; }
.advanced-note-timeline { display: grid; gap: 0.48rem; }
.note-timeline { display: grid; gap: 0.45rem; margin: 0; padding: 0 0 0 1.15rem; }
.note-timeline li { padding-left: 0.08rem; color: #334a64; }
.note-timeline strong, .note-timeline span { display: block; }
.note-timeline strong { font-size: 0.78rem; }
.note-timeline span { margin-top: 0.12rem; color: #64778e; font-size: 0.75rem; }
.note-linked-task { padding: 0.7rem; border: 1px solid #d5e7e4; border-radius: 9px; background: #f4fbf9; }
.note-linked-task p { margin: 0.35rem 0 0; color: #315565; font-size: 0.79rem; line-height: 1.45; overflow-wrap: anywhere; }
.advanced-note-conversion-form { padding-top: 0.8rem; }
.advanced-note-conversion-form > h5 { margin-bottom: 0.05rem; }
.governance-safety-banner, .governance-control-entry { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.governance-safety-banner h2, .governance-control-entry h2 { margin: 0.56rem 0 0; color: var(--navy); font-size: 1rem; }
.governance-safety-banner p, .governance-control-entry p { margin: 0.35rem 0 0; color: #52657b; font-size: 0.82rem; line-height: 1.5; }
.governance-two-column, .governance-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.governance-panel { min-width: 0; }
.governance-unavailable, .governance-denied { margin: 0.5rem 0; padding: 0.86rem 0.9rem; border: 1px solid #d9e5f0; border-radius: 9px; color: #475e75; background: #f7faff; font-size: 0.84rem; line-height: 1.5; }
.governance-unavailable strong, .governance-denied strong { display: block; color: #274865; }
.governance-unavailable p, .governance-denied p { margin: 0.3rem 0 0; }
.governance-denied { border-color: #ead4a3; color: #73550f; background: #fff9ed; }
.governance-denied strong { color: #815b00; }
.governance-scope-note { margin: 0.8rem 0 0; padding: 0.68rem 0.76rem; border: 1px solid #d6e6f4; border-radius: 9px; color: #405b74; background: #f1f7fc; font-size: 0.78rem; line-height: 1.5; }
.governance-scope-note strong { color: #234d76; }
.governance-request-form { margin-top: 0.4rem; }
.governance-table { min-width: 0; }
.governance-table-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.45rem; }
.table-filter-field { display: grid; gap: 0.3rem; min-width: min(100%, 300px); color: #43516a; font-size: 0.76rem; font-weight: 720; }
.table-filter-field input { min-width: 0; padding: 0.5rem 0.6rem; font-size: 0.82rem; }
.governance-table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.42rem; }
.compact-button { padding: 0.45rem 0.58rem; font-size: 0.75rem; line-height: 1.25; }
.governance-table-note { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.75rem; line-height: 1.42; }
.table-sort-button { display: inline-flex; align-items: center; gap: 0.28rem; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; white-space: nowrap; }
.table-sort-button:hover { color: var(--blue); text-decoration: underline; }
.governance-table .table-wrap { max-height: 510px; }
.governance-table th { position: sticky; top: 0; z-index: 1; }
.governance-table th:first-child, .governance-table td:first-child { position: sticky; left: 0; }
.governance-table th:first-child { z-index: 2; background: #f7f9fc; }
.governance-table td:first-child { background: var(--surface); box-shadow: 1px 0 0 #e7edf4; }
.approval-decision-form { display: grid; grid-template-columns: minmax(92px, 0.65fr) minmax(150px, 1fr) auto; gap: 0.38rem; align-items: center; min-width: 385px; }
.approval-decision-form select, .approval-decision-form input { min-width: 0; padding: 0.42rem 0.48rem; font-size: 0.76rem; }
.governance-safety-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.governance-safety-card { padding: 1rem; border: 1px solid #dce8f3; border-radius: var(--radius); background: linear-gradient(140deg, #fbfdff, #f2f8fc); }
.governance-safety-card h2 { margin: 0.6rem 0 0; color: var(--navy); font-size: 1rem; }
.governance-safety-card p { margin: 0.36rem 0 0; color: #53677c; font-size: 0.82rem; line-height: 1.52; }
.legacy-launcher { max-width: 1040px; }
.legacy-launcher-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.legacy-launcher-item { display: grid; gap: 0.35rem; min-height: 106px; padding: 0.95rem; border: 1px solid var(--line); border-radius: 10px; color: #234563; background: #fbfdff; text-align: left; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.legacy-launcher-item:hover { border-color: #92bce9; box-shadow: 0 6px 16px rgba(31, 82, 124, 0.1); transform: translateY(-1px); }
.legacy-launcher-item strong { color: var(--navy); }
.legacy-launcher-item span { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 12px rgba(36, 64, 100, 0.035); }
.card-grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sales-agent-pair { margin-top: 1rem; }
.card-pad { padding: 1.15rem; }
.card h2, .card h3 { margin: 0; letter-spacing: -0.02em; }
.card h2 { font-size: 1.05rem; }
.card h3 { font-size: 0.95rem; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 0.8rem; }
.metric-card { min-height: 124px; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.metric-card:nth-child(2n) { border-top: 3px solid var(--teal); }
.metric-card:nth-child(2n + 1) { border-top: 3px solid var(--blue); }
.metric-label { color: var(--muted); font-size: 0.78rem; }
.metric-value { font-size: clamp(1.28rem, 2.2vw, 1.8rem); color: var(--navy); font-weight: 780; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.metric-note { color: var(--muted); font-size: 0.75rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 1rem; margin-top: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.95rem; }
.section-head p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; }

.button, .secondary-button, .danger-button, .text-button, .icon-button { border: 0; border-radius: 8px; transition: transform 0.14s, box-shadow 0.14s, background 0.14s; }
.button { padding: 0.66rem 0.95rem; background: var(--blue); color: white; font-weight: 720; box-shadow: 0 5px 10px rgba(20,99,215,0.18); }
.button:hover { background: #0d53ba; transform: translateY(-1px); }
.secondary-button { padding: 0.64rem 0.9rem; background: #edf2f8; color: #244464; font-weight: 680; }
.secondary-button:hover { background: #dfe9f4; }
.desktop-entry { white-space: nowrap; }
.danger-button { padding: 0.6rem 0.86rem; background: var(--red-soft); color: #a42d2d; font-weight: 700; }
.text-button { padding: 0.35rem; color: var(--blue); background: transparent; font-weight: 680; }
.text-button:hover { color: #0c4fae; text-decoration: underline; }
.icon-button { width: 36px; height: 36px; color: var(--navy); background: #edf2f8; font-size: 1.12rem; }

.tab-list { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tab-button { border: 0; border-bottom: 2px solid transparent; padding: 0.7rem 0.85rem; background: transparent; color: var(--muted); font-weight: 690; }
.tab-button:hover, .tab-button.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.split-grid { display: grid; grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr); gap: 1rem; }
.stack { display: grid; gap: 1rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.78rem; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 0.36rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field > span { color: #43516a; font-size: 0.8rem; font-weight: 720; }
.field .hint { margin: 0; color: var(--muted); font-size: 0.75rem; font-weight: 400; line-height: 1.35; }
input, select, textarea { width: 100%; padding: 0.62rem 0.68rem; border: 1px solid #cbd6e4; border-radius: 8px; background: #fff; color: var(--ink); outline: none; transition: box-shadow 0.15s, border-color 0.15s; }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #4f91e8; box-shadow: 0 0 0 3px rgba(55,132,228,0.14); }
input::placeholder, textarea::placeholder { color: #9ba7b8; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.form-message { margin-top: 0.85rem; padding: 0.7rem 0.78rem; border-radius: 8px; font-size: 0.84rem; line-height: 1.45; }
.form-message.error { color: #9f2929; background: var(--red-soft); }
.form-message.success { color: #08776f; background: var(--teal-soft); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 0.76rem 0.82rem; border-bottom: 1px solid #e7edf4; text-align: left; vertical-align: top; font-size: 0.84rem; }
th { color: #536177; background: #f7f9fc; font-size: 0.76rem; font-weight: 750; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { color: #26344a; }
.entity-name { color: var(--navy); font-weight: 720; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1em; }
.status-pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 999px; color: #24608c; background: #e9f5ff; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.status-pill.warning { color: #9b6100; background: var(--amber-soft); }
.status-pill.danger { color: #a52d2d; background: var(--red-soft); }
.status-pill.success { color: #08766d; background: var(--teal-soft); }
.empty-state { padding: 2.25rem 1.25rem; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: #4d5b70; margin-bottom: 0.35rem; }
.inline-error { margin: 0.8rem 0; padding: 0.75rem; color: #9d2929; background: var(--red-soft); border-radius: 8px; font-size: 0.84rem; line-height: 1.45; }
.loading-block { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 0.65rem; color: var(--muted); font-size: 0.9rem; }
.spinner { width: 18px; height: 18px; border: 2px solid #c7d4e7; border-top-color: var(--blue); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin-bottom: 1rem; }
.step-button { position: relative; padding: 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: left; font-weight: 700; }
.step-button .step-number { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 0.42rem; color: #69809b; background: #eaf0f7; border-radius: 50%; font-size: 0.75rem; }
.step-button.is-active { color: var(--blue); border-color: #88b6f2; background: var(--blue-soft); }
.step-button.is-active .step-number { color: white; background: var(--blue); }
.step-button.is-complete { color: #087d75; border-color: #8bd9d0; }
.step-button.is-complete .step-number { color: white; background: var(--teal); }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; }
.order-summary { align-self: start; position: sticky; top: 78px; }
.summary-list { display: grid; gap: 0.68rem; margin: 1rem 0 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; color: #2a3950; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.item-row { display: grid; grid-template-columns: minmax(140px, 1.6fr) repeat(4, minmax(90px, 1fr)) auto; gap: 0.55rem; align-items: end; padding: 0.7rem; background: #f8fafd; border: 1px solid #e0e8f2; border-radius: 10px; }
.item-row + .item-row { margin-top: 0.65rem; }
.item-row .field { gap: 0.27rem; }
.item-row .field label { font-size: 0.75rem; }
.item-row .remove-item { align-self: end; }
.notice { padding: 0.76rem 0.85rem; color: #4d637c; background: #eff6fc; border: 1px solid #d4e8f8; border-radius: 8px; font-size: 0.84rem; line-height: 1.5; }
.notice strong { color: #234d76; }
.notice.danger { color: #8b2424; background: var(--red-soft); border-color: #efbcbc; }
.notice.danger strong { color: #8b2424; }
.code-block { max-height: 26rem; overflow: auto; padding: 0.85rem; color: #dce9f8; background: #10243f; border-radius: 8px; font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.po-record td small { display: inline-block; max-width: 32rem; margin-top: 0.25rem; color: #62748a; line-height: 1.45; }
.sales-customer-detail { margin-top: 1rem; }
.sales-customer-detail hr { margin: 1.1rem 0; border: 0; border-top: 1px solid var(--line); }
.record-list, .timeline { display: grid; gap: 0.55rem; }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; padding: 0.72rem; border: 1px solid #dce6f0; border-radius: 9px; color: #2a425c; background: #fbfdff; text-align: left; }
.record-row:hover { border-color: #84b1e8; background: #f2f8ff; }
.record-row span { display: grid; gap: 0.18rem; min-width: 0; font-size: 0.76rem; overflow-wrap: anywhere; }
.record-row strong { color: var(--navy); font-size: 0.84rem; }
.mini-record, .timeline-item { display: grid; gap: 0.34rem; margin-top: 0.55rem; padding: 0.72rem; border: 1px solid #e0e8f1; border-radius: 9px; background: #fbfcfe; color: #4f6278; font-size: 0.78rem; line-height: 1.45; }
.mini-record strong, .timeline-item strong { color: #25435f; }
.sample-record { gap: 0.55rem; margin-bottom: 0.9rem; }
.sample-record form { border-top: 1px solid var(--border); margin-top: 0.55rem; padding-top: 0.75rem; }
.sample-record details { border-top: 1px dashed var(--border); margin-top: 0.55rem; padding-top: 0.65rem; }
.sample-record summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.quote-record { gap: 0.8rem; margin-bottom: 1rem; }
.quote-record form,
.quote-record details { border-top: 1px solid var(--border); margin-top: 0.7rem; padding-top: 0.8rem; }
.quote-record summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.quote-metrics { display: grid; gap: 0.55rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-metrics span { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 0.65rem; padding: 0.65rem; }
.quote-tier-editor { display: grid; gap: 0.8rem; }
.quote-tier-row { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 0.75rem; display: grid; gap: 0.65rem; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0.8rem; }
.quote-output-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.55rem; }
@media (max-width: 960px) {
  .quote-tier-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-metrics { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .quote-tier-row { grid-template-columns: 1fr; }
}
.compact-list { margin: 0.65rem 0 0; padding-left: 1.2rem; }
.compact-list li { color: var(--muted); margin: 0.35rem 0; }
.mini-record form { margin-top: 0.42rem; padding-top: 0.55rem; border-top: 1px solid #e1e9f2; }

.order-hero { padding: 1.1rem; background: linear-gradient(120deg, #173c65, #155c70); color: white; border-radius: var(--radius); }
.order-hero .eyebrow { margin: 0 0 0.25rem; color: #b2ddf6; }
.order-hero h2 { margin: 0; color: white; font-size: 1.45rem; }
.order-hero p { margin: 0.4rem 0 0; color: #dceaf4; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.detail-card { padding: 0.9rem; }
.detail-card h3 { color: var(--navy); margin-bottom: 0.75rem; }
.kv-list { display: grid; gap: 0.55rem; margin: 0; }
.kv-list div { display: grid; grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.2fr); gap: 0.7rem; font-size: 0.8rem; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; color: #2c3d54; overflow-wrap: anywhere; }
.wide { grid-column: span 2; }

.toast-region { position: fixed; top: 0.9rem; right: 0.9rem; z-index: 100; width: min(360px, calc(100vw - 1.8rem)); display: grid; gap: 0.55rem; pointer-events: none; }
.toast { padding: 0.8rem 0.9rem; color: #17324e; background: white; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; box-shadow: var(--shadow); font-size: 0.85rem; line-height: 1.4; pointer-events: auto; animation: slide-in 0.22s ease-out; }
.toast.success { border-left-color: var(--teal); }
.toast.error { border-left-color: var(--red); }
.notice.warning { border-color: #d79a2b; background: #fff8e6; color: #6d4b0f; }
.table-scroll { margin-top: 0.7rem; overflow-x: auto; border: 1px solid #dce6f0; border-radius: 9px; }
.comparison-table { width: 100%; min-width: 920px; border-collapse: collapse; background: #fbfdff; font-size: 0.75rem; }
.comparison-table caption { padding: 0.7rem; color: #52657b; text-align: left; font-weight: 700; background: #f2f7fb; }
.comparison-table th, .comparison-table td { padding: 0.58rem 0.62rem; border-top: 1px solid #e0e8f1; text-align: left; vertical-align: top; white-space: nowrap; }
.comparison-table th { color: #52657b; background: #f7fafc; font-size: 0.75rem; }
.comparison-table td { color: #344e68; }
.comparison-table td small { display: block; margin-top: 0.15rem; color: #71839a; }
.procurement-readiness { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr); gap: 0.8rem; margin: 0.75rem 0; padding: 0.8rem; border: 1px solid #d8e5ef; border-left: 4px solid var(--teal); border-radius: 8px; background: #f5fbfa; }
.procurement-readiness.blocked { border-left-color: #d16b44; background: #fff8f3; }
.procurement-readiness div { display: grid; gap: 0.25rem; }
.procurement-readiness strong { color: var(--navy); font-size: 0.82rem; }
.procurement-readiness span { color: #5d7187; font-size: 0.76rem; line-height: 1.45; }
.next-action { display: grid; gap: 0.25rem; margin-top: 0.75rem; padding: 0.75rem 0.85rem; border: 1px dashed #9bbad0; border-radius: 8px; background: #f5f9fc; }
.next-action strong { color: #234d76; font-size: 0.8rem; }
.next-action span { color: #53677c; font-size: 0.78rem; line-height: 1.45; }
@keyframes slide-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.mobile-only { display: none; }
@media (max-width: 1460px) {
  .topbar-action span:last-child { display: none; }
  .topbar-action { width: 36px; justify-content: center; padding-inline: 0; }
  .global-search { flex-basis: 280px; }
}
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .my-work-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr); }
  .my-work-grid .risk-panel { grid-column: 1 / -1; }
  .my-work-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-create-panel { grid-column: 1 / -1; }
  .collaboration-record-list, .collaboration-file-list { max-height: 300px; }
  .advanced-note-meta-grid { grid-template-columns: 1fr; }
  .task-table-filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .task-table-filter-grid .task-table-search { grid-column: span 2; }
}
.agent-os-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.agent-os-agent-card {
  display: grid;
  align-content: space-between;
  gap: 0.75rem;
  border-color: rgba(31, 121, 164, 0.24);
  background: linear-gradient(145deg, rgba(235, 249, 253, 0.92), rgba(255, 255, 255, 0.98));
}

.governance-rule-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.governance-rule-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.governance-rule-list span {
  color: var(--muted, #667085);
}

.agent-v2-closure-grid {
  margin: 1rem 0;
}

.agent-v2-closure-grid ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.agent-v2-closure-grid li + li {
  margin-top: 0.35rem;
}
.agent-output-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(22, 91, 123, 0.18);
  border-radius: 14px;
  background: #f7fbfc;
}
.agent-json {
  max-height: 360px;
  margin: 0.75rem 0 0;
  padding: 0.8rem;
  overflow: auto;
  border-radius: 10px;
  background: #102d3a;
  color: #e8f8ff;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-json.compact-json { max-height: 180px; }
.comparison-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  margin: 0.75rem 0;
}
.comparison-strip span {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(22, 91, 123, 0.14);
  border-radius: 10px;
  background: #f7fbfc;
  overflow-wrap: anywhere;
}
.comparison-strip strong { color: var(--accent, #1f79a4); }
.agent-learning-governance { display: grid; gap: 1rem; }
.learning-choice { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; margin: 0.75rem 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; }
.learning-choice[hidden] { display: none; }
.learning-choice legend { color: var(--navy); font-weight: 700; padding: 0 0.25rem; }
.learning-choice label { align-items: center; display: inline-flex; gap: 0.4rem; }

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { padding: 2.5rem 1.5rem 1.4rem; }
  .auth-card-wrap { padding: 1.5rem; align-content: start; }
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; align-content: center; }
  .topbar-start { order: 1; }
  .topbar-end { order: 2; margin-left: auto; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .sidebar { width: min(84vw, 300px); position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; transform: translateX(-103%); box-shadow: 18px 0 32px rgba(10,34,58,0.22); transition: transform 0.22s; overflow-y: auto; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 44; display: block; padding: 0; border: 0; background: rgba(8, 25, 44, 0.48); }
  .mobile-only { display: inline-grid; place-items: center; }
  .order-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .dashboard-grid, .split-grid { grid-template-columns: 1fr; }
  .my-work-grid, .my-work-lower-grid { grid-template-columns: 1fr; }
  .my-work-grid .risk-panel, .quick-create-panel { grid-column: auto; }
  .collaboration-grid { grid-template-columns: 1fr; }
  .governance-two-column, .governance-control-grid, .governance-safety-grid { grid-template-columns: 1fr; }
  .task-table-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-table-filter-grid .task-table-search { grid-column: 1 / -1; }
  .legacy-launcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .topbar { padding: 0.55rem 0.7rem; }
  .connection-status { display: none; }
  .current-user { max-width: 90px; }
  .main-content { padding: 1rem 0.75rem; }
  .page-head { display: grid; }
  .platform-page-head { padding: 1rem; }
  .platform-page-head .page-actions { width: 100%; }
  .platform-page-head .page-actions > * { flex: 1; }
  .organization-context-control, .workspace-control { max-width: 140px; }
  .organization-context-control select, .workspace-control select { max-width: 140px; }
  .desktop-entry { display: none; }
  .global-search-results { position: fixed; top: 160px; right: 0.7rem; left: 0.7rem; max-height: calc(100vh - 180px); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-row .remove-item { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .topbar-end { gap: 0.35rem; }
  .user-menu-button { max-width: 132px; }
  .setup-progress li { justify-content: center; padding: 0.5rem 0.25rem; font-size: 0.75rem; }
  .task-item, .work-record { align-items: flex-start; }
  .task-item-actions { justify-content: flex-start; }
  .collaboration-head { align-items: flex-start; }
  .collaboration-file { align-items: flex-start; }
  .collaboration-file p { white-space: normal; overflow-wrap: anywhere; }
  .collaboration-record-head, .advanced-note-detail-head, .note-linked-file-list li { align-items: flex-start; flex-direction: column; }
  .inline-actions { justify-content: flex-start; }
  .note-linked-file-list .text-button { padding-left: 0; }
  .advanced-note-detail { padding: 0.75rem; }
  .task-table-filter-grid, .task-table-support-grid { grid-template-columns: 1fr; }
  .task-table-filter-grid .task-table-search { grid-column: auto; }
  .task-table-filter-grid .task-table-assigned { padding-top: 0; }
  .task-table-filter-actions { width: 100%; }
  .task-table-filter-actions > * { flex: 1; }
  .task-table-subhead { align-items: flex-start; flex-direction: column; }
  .task-table-subhead .text-button { padding-left: 0; }
  .task-table-view-picker, .task-table-save-view-form { max-width: 100%; }
  .task-table-export-list li, .task-table-history-list li { align-items: flex-start; flex-direction: column; }
  .task-table-history-list small, .task-table-export-list small { text-align: left; }
  .governance-safety-banner, .governance-control-entry { align-items: flex-start; flex-direction: column; }
  .governance-table-toolbar { align-items: stretch; flex-direction: column; }
  .table-filter-field { min-width: 0; }
  .governance-table-actions { justify-content: flex-start; }
  .legacy-launcher-grid { grid-template-columns: 1fr; }
  .comparison-strip { grid-template-columns: 1fr; }
  .comparison-strip strong { transform: rotate(90deg); justify-self: center; }
  .procurement-readiness { grid-template-columns: 1fr; }
  .agent-learning-governance .section-head,
  .agent-learning-ordinary .mini-record .section-head { align-items: flex-start; flex-direction: column; }
}
