:root {
  --navy-950: #071827;
  --navy-900: #0a2136;
  --navy-800: #12334f;
  --cyan-500: #16c6ca;
  --cyan-600: #0ca8ad;
  --cyan-050: #e8fbfb;
  --blue-500: #3b82f6;
  --green-500: #18a36b;
  --amber-500: #e9a23b;
  --red-500: #e25555;
  --slate-900: #172638;
  --slate-700: #42546a;
  --slate-500: #718197;
  --slate-300: #cbd4de;
  --slate-200: #dfe5eb;
  --slate-100: #edf1f4;
  --slate-050: #f6f8fa;
  --white: #fff;
  --shadow-sm: 0 4px 16px rgba(12, 37, 59, .06);
  --shadow-md: 0 18px 45px rgba(10, 33, 54, .12);
  --radius: 14px;
  --sidebar: 252px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --font-scale: 1;
  --text-2xs: calc(12px * var(--font-scale));
  --text-xs: calc(13px * var(--font-scale));
  --text-sm: calc(14.5px * var(--font-scale));
  --text-base: calc(15.5px * var(--font-scale));
  --text-md: calc(17px * var(--font-scale));
  --text-lg: calc(20px * var(--font-scale));
  --text-xl: calc(26px * var(--font-scale));
  --text-2xl: calc(32px * var(--font-scale));
  --line-readable: 1.55;
}

/* RC5 candidate: day-grouped, searchable order execution board. */
.dashboard-order-filters { margin: 0 24px 18px; }
.execution-day-list { display: grid; gap: 14px; padding: 0 24px 24px; }
.execution-day-group { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.execution-day-group > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; padding: 16px 20px; cursor: pointer; list-style: none; background: #f7fafc; border-left: 5px solid #11b8bc; }
.execution-day-group > summary::-webkit-details-marker { display: none; }
.execution-day-group > summary span { display: flex; align-items: baseline; gap: 12px; }
.execution-day-group > summary strong { font-size: 1.18rem; color: #0b2339; }
.execution-day-group > summary small { color: var(--muted); }
.execution-day-group > summary b { color: #0b6f75; font-size: .95rem; }
.execution-day-group > summary em { font-style: normal; color: var(--muted); font-size: .88rem; }
.execution-day-group[open] > summary { background: #effcfc; border-bottom: 1px solid var(--line); }
.execution-day-group .table-wrap { margin: 0; }
.execution-day-group .execution-table { min-width: 1120px; }

@media (max-width: 1100px) {
  .execution-day-group > summary { grid-template-columns: 1fr auto; }
  .execution-day-group > summary em { display: none; }
}

.document-preview-frame { width: 100%; min-height: 72vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.document-image-preview { display: grid; place-items: center; min-height: 50vh; padding: 24px; background: #eef3f7; border-radius: 14px; }
.document-image-preview img { max-width: 100%; max-height: 78vh; object-fit: contain; box-shadow: 0 12px 30px rgba(10, 32, 52, .13); }
.traveler-definition-sheet > header, .traveler-definition-sheet > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.traveler-definition-sheet > section { padding: 18px 24px; }
.traveler-definition-sheet > footer { border-top: 1px solid var(--line); border-bottom: 0; font-size: .85rem; color: var(--muted); }
@media print { .sidebar, .topbar, .readonly-banner, .no-print, .message-stack { display: none !important; } .workspace { margin: 0 !important; } .content { padding: 0 !important; } .traveler-definition-sheet { box-shadow: none; border: 0; } }

html[data-font-size="small"] { --font-scale: .9; }
html[data-font-size="standard"] { --font-scale: 1; }
html[data-font-size="large"] { --font-scale: 1.16; }

* { box-sizing: border-box; }
html { background: var(--slate-050); color: var(--slate-900); font-family: var(--font); }
body { margin: 0; min-width: 1180px; background: var(--slate-050); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
.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; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 9999; background: var(--white); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 22px 16px 18px; color: #dfeaf3; background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 70%, #0d2940); z-index: 10; }
.brand { display: flex; flex-direction: column; gap: 12px; padding: 0 10px 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand img { width: 156px; height: auto; object-fit: contain; object-position: left center; }
.brand span { width: max-content; padding: 4px 9px; color: #c6f9fa; border: 1px solid rgba(22,198,202,.35); border-radius: 999px; font-size: 11px; letter-spacing: .16em; }
.nav-list { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 7px; margin: 18px -6px 10px 0; padding-right: 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(155,184,203,.28) transparent; }
.nav-item { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; min-height: 46px; padding: 0 13px; color: #aebdca; border-radius: 10px; font-size: 14px; transition: .18s ease; }
.nav-item:hover:not(.disabled), .nav-item.active { color: white; background: rgba(22,198,202,.13); }
.nav-item.active { box-shadow: inset 3px 0 0 var(--cyan-500); }
.nav-primary { flex: 0 0 auto; }
.nav-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--cyan-500); font-size: 17px; font-weight: 800; }
.nav-item small { color: #748b9e; font-size: 10px; }
.nav-item.disabled { opacity: .58; cursor: not-allowed; }
.nav-group { flex: 0 0 auto; overflow: hidden; border: 1px solid transparent; border-radius: 11px; }
.nav-group[open] { padding-bottom: 5px; background: rgba(7,24,39,.34); border-color: rgba(255,255,255,.045); }
.nav-group summary { display: grid; grid-template-columns: 26px 1fr 16px; align-items: center; min-height: 45px; padding: 0 12px; color: #b9c8d4; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; user-select: none; transition: .18s ease; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover, .nav-group[open] > summary { color: white; background: rgba(22,198,202,.08); }
.nav-group:has(.nav-subitem.active) > summary { color: white; background: rgba(22,198,202,.11); box-shadow: inset 3px 0 0 var(--cyan-500); }
.nav-group-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--cyan-500); font-size: 15px; font-weight: 800; }
.nav-chevron { color: #6f899c; font-size: 21px; line-height: 1; text-align: center; transform: rotate(0deg); transition: transform .18s ease; }
.nav-group[open] .nav-chevron { transform: rotate(90deg); }
.nav-group-items { display: grid; gap: 2px; padding: 3px 7px 2px 38px; }
.nav-subitem { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 10px; color: #91a7b8; border-radius: 8px; font-size: 12px; transition: .16s ease; }
.nav-subitem::before { content: ""; position: absolute; left: -17px; width: 8px; height: 1px; background: rgba(134,164,184,.42); }
.nav-subitem:hover, .nav-subitem.active { color: #f4ffff; background: rgba(22,198,202,.11); }
.nav-subitem.active { color: #50e1e4; font-weight: 750; }
.nav-subitem.active::before { height: 8px; background: var(--cyan-500); border-radius: 50%; box-shadow: 0 0 0 4px rgba(22,198,202,.09); }
.nav-subitem small { margin-left: 8px; color: #72899b; font-size: 9px; }
.sidebar-foot { margin-top: auto; padding: 15px 12px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.source-status { display: flex; align-items: center; gap: 8px; color: #e5f6f7; font-size: 12px; font-weight: 650; }
.source-status span { width: 8px; height: 8px; background: var(--green-500); border-radius: 50%; box-shadow: 0 0 0 4px rgba(24,163,107,.15); }
.sidebar-foot p { margin: 7px 0 0; color: #758c9f; font-size: 10px; }

.workspace { grid-column: 2; min-height: 100vh; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--slate-200); }
.topbar-context { display: flex; align-items: center; gap: 15px; min-width: 0; }
.topbar h1 { margin: 1px 0 0; font-size: 23px; letter-spacing: -.02em; }
.topbar-back-button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; color: var(--navy-900); background: white; border: 1px solid var(--slate-200); border-radius: 10px; font-size: var(--text-xs); font-weight: 750; cursor: pointer; box-shadow: var(--shadow-sm); }
.topbar-back-button:hover { color: var(--cyan-600); border-color: #9edfe2; background: var(--cyan-050); }
.topbar-back-button span:first-child { font-size: var(--text-md); line-height: 1; }
.eyebrow, .section-kicker { margin: 0; color: var(--cyan-600); font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.organization-switcher { display: flex; align-items: center; gap: 8px; padding: 5px 9px; background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; }
.organization-switcher label { color: var(--slate-500); font-size: var(--text-2xs); white-space: nowrap; }
.organization-switcher select { max-width: 220px; padding: 5px 24px 5px 6px; color: var(--navy-950); background: transparent; border: 0; font: inherit; font-size: var(--text-xs); font-weight: 750; }
.font-size-control { display: inline-flex; align-items: center; gap: 3px; padding: 4px; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 10px; }
.font-size-control > span { padding: 0 5px; color: var(--slate-500); font-size: var(--text-2xs); font-weight: 700; }
.font-size-control button { min-width: 30px; height: 29px; padding: 0 7px; color: var(--slate-500); background: transparent; border: 0; border-radius: 7px; font-size: var(--text-xs); font-weight: 750; cursor: pointer; }
.font-size-control button:hover { color: var(--navy-900); background: white; }
.font-size-control button[aria-pressed="true"] { color: var(--navy-950); background: var(--cyan-050); box-shadow: inset 0 0 0 1px #bdebed; }
.role-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 12px; font-size: 12px; font-weight: 650; }
.role-chip small { display: block; margin-bottom: 2px; color: var(--slate-500); font-size: 9px; font-weight: 550; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; color: var(--navy-950); background: linear-gradient(135deg, #c5f5f6, var(--cyan-500)); border-radius: 9px; font-weight: 800; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--slate-200); border-radius: 10px; color: var(--slate-700); background: white; cursor: pointer; }
.icon-button:hover { color: var(--red-500); border-color: #f0bcbc; }
.readonly-banner { display: flex; align-items: center; gap: 18px; min-height: 38px; padding: 8px 32px; color: #d8eaef; background: #112f47; font-size: 11px; }
.readonly-banner strong { color: var(--navy-950); background: var(--cyan-500); padding: 4px 8px; border-radius: 5px; letter-spacing: .05em; }
.readonly-banner span:not(.banner-note)::before { content: "✓"; margin-right: 6px; color: var(--cyan-500); font-weight: 800; }
.banner-note { margin-left: auto; color: #8aa2b4; }
.content { padding: 28px 32px 44px; }

.message-stack { position: fixed; top: 95px; right: 26px; z-index: 50; display: grid; gap: 8px; width: 360px; }
.message { padding: 12px 15px; color: #185c43; background: #e8f8f1; border: 1px solid #b9e5d2; border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 13px; }
.message.error { color: #913838; background: #fff0f0; border-color: #f0caca; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 22px; }
.page-heading h2 { margin: 7px 0 7px; color: var(--navy-950); font-size: 28px; letter-spacing: -.035em; }
.page-heading p:not(.section-kicker) { margin: 0; max-width: 780px; color: var(--slate-500); font-size: 13px; line-height: 1.7; }
.compact-heading { margin-bottom: 18px; }
.compact-heading h2 { font-size: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.button.primary { color: var(--navy-950); background: var(--cyan-500); }
.button.primary:hover { background: #20d6da; box-shadow: 0 7px 18px rgba(22,198,202,.22); }
.button.secondary { color: var(--navy-900); background: var(--cyan-050); border-color: #b5ecee; }
.button.ghost { color: var(--slate-700); background: white; border-color: var(--slate-200); }
.button.full { width: 100%; }
.text-link, .row-action { color: var(--cyan-600); font-size: 12px; font-weight: 750; }
.row-action { white-space: nowrap; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 125px; padding: 18px 17px; background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric-card::before { content: ""; position: absolute; left: 0; top: 18px; width: 3px; height: 38px; border-radius: 0 4px 4px 0; background: var(--accent); }
.metric-card::after { content: ""; position: absolute; right: -18px; top: -24px; width: 82px; height: 82px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 9%, white); }
.metric-card strong { display: block; margin: 10px 0 5px; color: var(--navy-950); font-size: 31px; line-height: 1; }
.metric-card small { color: var(--slate-500); font-size: 9px; line-height: 1.45; }
.metric-label { color: var(--slate-700); font-size: 11px; font-weight: 650; }
.accent-cyan { --accent: var(--cyan-500); }.accent-blue { --accent: var(--blue-500); }.accent-amber { --accent: var(--amber-500); }.accent-red { --accent: var(--red-500); }.accent-green { --accent: var(--green-500); }.accent-slate { --accent: #64748b; }

.panel { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; padding: 16px 20px; border-bottom: 1px solid var(--slate-100); }
.panel-head h3 { margin: 4px 0 0; color: var(--navy-950); font-size: 16px; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 18px; }
.span-2 { min-width: 0; }
.table-wrap { overflow-x: auto; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.pagination-summary { color: var(--muted); font-size: 13px; }
.pagination-actions { display: flex; flex-wrap: wrap; gap: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 12px 14px; color: var(--slate-500); background: #fbfcfd; border-bottom: 1px solid var(--slate-200); text-align: left; font-size: 9px; letter-spacing: .05em; white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--slate-100); color: var(--slate-700); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfefe; }
td strong { color: var(--slate-900); font-size: 11px; }
.order-link { color: var(--navy-900); font-weight: 780; }
.order-link:hover { color: var(--cyan-600); }
.subline { display: block; margin-top: 4px; color: var(--slate-500); font-size: 9px; font-weight: 500; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.empty { padding: 38px; text-align: center; color: var(--slate-500); }
.progress-cell { display: flex; align-items: center; gap: 8px; min-width: 105px; }
.progress-cell.wide { min-width: 145px; }
.progress-track { flex: 1; height: 6px; overflow: hidden; background: var(--slate-100); border-radius: 999px; }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-600), var(--cyan-500)); border-radius: inherit; }
.progress-cell b, .step-progress b { min-width: 32px; color: var(--slate-700); font-size: 9px; }
.status-pill, .risk-badge, .data-chip, .severity-label { display: inline-flex; align-items: center; justify-content: center; width: max-content; min-height: 23px; padding: 0 8px; border-radius: 999px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-pill.compact { min-height: 20px; padding: 0 7px; font-size: 8px; }
.status-pill.large { min-height: 32px; padding: 0 14px; font-size: 11px; }
.status-waiting, .status-open { color: #a46b13; background: #fff4df; }
.status-in_progress, .status-processing, .status-current { color: #1762a8; background: #e8f3ff; }
.status-risk { color: #a62f2f; background: #ffeded; }
.status-neutral { color: var(--slate-700); background: var(--slate-100); }
.status-completed, .status-closed, .status-done { color: #11734b; background: #e6f7ef; }
.status-inspection { color: #7446a8; background: #f1eaff; }
.status-on_hold { color: #9b3c3c; background: #feecec; }
.status-draft, .status-received { color: #536678; background: #edf2f5; }
.status-released { color: #1762a8; background: #e8f3ff; }
.status-submitted, .status-applied, .status-succeeded { color: #11734b; background: #e6f7ef; }
.status-void, .status-rejected, .status-failed { color: #9b3c3c; background: #feecec; }
.status-unmapped, .status-running { color: #966118; background: #fff3dc; }
.status-reversed { color: #7446a8; background: #f1eaff; }
.status-pending { color: #966118; background: #fff3dc; }
.status-candidate { color: #1762a8; background: #e8f3ff; }
.status-merged, .status-auto { color: #7446a8; background: #f1eaff; }
.status-confirmed, .status-verified { color: #11734b; background: #e6f7ef; }
.status-conflict { color: #9b3c3c; background: #feecec; }
.risk-badge.danger { color: #9c3737; background: #feeeee; }.risk-badge.warning { color: #966118; background: #fff3dc; }.risk-badge.success { color: #14704a; background: #e7f7ef; }.risk-badge.neutral { color: #536678; background: #edf2f5; }
.data-chip { color: #287178; background: var(--cyan-050); border: 1px solid #c8eeee; }
.text-amber { color: #b7781b !important; }.text-red { color: var(--red-500) !important; }

.exception-feed { padding: 5px 18px 10px; }
.feed-item { display: grid; grid-template-columns: 10px 1fr 12px; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--slate-100); }

/* --------------------------------------------------------------------------
   JK UI V1.0 — 2026-08-02 frozen visual baseline
   Bright ice-white canvas, teal brand accent and translucent glass surfaces.
   This layer deliberately overrides the legacy dark shell without changing
   business forms, permissions or transaction behavior.
   -------------------------------------------------------------------------- */
:root {
  --jk-ink: #0c2742;
  --jk-muted: #61758a;
  --jk-line: rgba(128, 157, 184, .22);
  --jk-brand: #2e8e87;
  --jk-brand-dark: #1f746f;
  --jk-brand-soft: #dff4f1;
  --jk-canvas: #edf4f8;
  --jk-glass: rgba(255, 255, 255, .78);
  --jk-glass-strong: rgba(255, 255, 255, .92);
  --jk-shadow: 0 16px 42px rgba(50, 82, 111, .10), 0 2px 8px rgba(45, 76, 104, .06);
  --jk-shadow-soft: 0 8px 24px rgba(50, 82, 111, .08);
}

* { scrollbar-color: #b8d7d4 transparent; }
body {
  color: var(--jk-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 72% -10%, rgba(202, 235, 242, .75), transparent 34%),
    radial-gradient(circle at 0% 85%, rgba(218, 240, 237, .7), transparent 28%),
    linear-gradient(145deg, #f6f9fb 0%, #eaf1f5 56%, #f5f8fa 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; gap: 14px; padding: 14px; }
.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  color: var(--jk-ink);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  background: rgba(248, 251, 253, .82);
  box-shadow: var(--jk-shadow);
  backdrop-filter: blur(26px) saturate(145%);
  overflow: hidden;
}
.brand { min-height: 112px; padding: 18px 22px; color: var(--jk-ink); border-bottom: 1px solid var(--jk-line); }
.brand:hover { color: var(--jk-ink); background: rgba(255,255,255,.55); }
.brand .brand-logo {
  display: block;
  width: 184px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.nav-list { padding: 16px 12px; overflow-y: auto; }
.nav-item, .nav-group summary, .nav-subitem { color: #2d4a63; }
.nav-primary, .nav-group summary { min-height: 48px; border-radius: 12px; padding: 0 14px; font-size: 14px; font-weight: 700; }
.nav-primary:hover, .nav-group summary:hover, .nav-subitem:hover { color: var(--jk-brand-dark); background: rgba(219, 242, 239, .62); }
.nav-primary.active {
  color: #fff;
  background: linear-gradient(135deg, #55a69f, #287d78);
  box-shadow: 0 8px 20px rgba(41, 126, 119, .24), inset 0 1px rgba(255,255,255,.35);
}
.nav-icon, .nav-group-icon { width: 23px; color: #365e7d; font-size: 18px; text-align: center; }
.nav-primary.active .nav-icon { color: #fff; }
.nav-group { margin-top: 4px; }
.nav-group[open] { padding-bottom: 6px; border-radius: 14px; background: rgba(235, 243, 247, .54); }
.nav-group[open] summary { color: var(--jk-brand-dark); background: rgba(222, 243, 241, .7); }
.nav-chevron { margin-left: auto; color: #72879b; transform: rotate(90deg); transition: transform .2s ease; }
.nav-group[open] .nav-chevron { transform: rotate(-90deg); }
.nav-group-items { padding: 6px 8px 2px 38px; }
.nav-subitem { position: relative; min-height: 36px; padding: 8px 10px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.nav-subitem::before { content: ""; position: absolute; left: -12px; top: 50%; width: 7px; height: 1px; background: #9fb1c1; }
.nav-subitem.active { color: var(--jk-brand-dark); background: #fff; box-shadow: 0 5px 14px rgba(63, 94, 121, .08); }
.nav-item small, .nav-subitem small { color: #587184; background: rgba(224, 235, 241, .9); }
.sidebar-foot { position: static; flex: 0 0 auto; margin: 0 12px 12px; padding: 0; border: 0; background: transparent; }
.sidebar-account { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 11px; color: var(--jk-ink); border: 1px solid rgba(185, 205, 220, .45); border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: var(--jk-shadow-soft); }
.sidebar-account:hover { color: var(--jk-brand-dark); }
.sidebar-account .avatar { width: 40px; height: 40px; color: #fff; background: linear-gradient(145deg, #7bb8c8, #2d638f); box-shadow: inset 0 1px rgba(255,255,255,.5); }
.sidebar-account > span:nth-child(2) { display: grid; }
.sidebar-account strong { font-size: 13px; }
.sidebar-account small { margin-top: 2px; color: var(--jk-muted); font-size: 10px; }
.source-status { justify-content: center; margin-top: 8px; color: #668078; font-size: 9px; }

.workspace { min-width: 0; background: transparent; }
.topbar {
  position: sticky;
  z-index: 30;
  top: 14px;
  min-height: 58px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 17px;
  background: rgba(250, 252, 253, .77);
  box-shadow: var(--jk-shadow-soft);
  backdrop-filter: blur(24px) saturate(150%);
}
.topbar-scope { display: flex; align-items: center; gap: 10px; min-width: 300px; font-size: 12px; white-space: nowrap; }
.scope-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--jk-line); border-radius: 11px; color: #2f4c68; background: rgba(255,255,255,.72); font-weight: 700; }
.scope-chip b { color: #326b91; }
.scope-divider { color: #9aabba; }
.scope-company { max-width: 128px; overflow: hidden; text-overflow: ellipsis; color: #2f4c68; font-weight: 650; }
.scope-page { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.topbar-back-button { min-width: auto; height: 38px; padding: 0 10px; color: #4c657a; border-radius: 10px; background: rgba(255,255,255,.65); }
.global-search { display: flex; align-items: center; gap: 9px; width: min(410px, 34vw); height: 42px; padding: 0 14px; border: 1px solid rgba(151, 175, 195, .28); border-radius: 13px; background: rgba(255,255,255,.72); box-shadow: inset 0 1px rgba(255,255,255,.8); }
.global-search span { color: #5b7590; font-size: 22px; transform: rotate(-18deg); }
.global-search input { width: 100%; padding: 0; color: var(--jk-ink); border: 0; outline: 0; background: transparent; font: inherit; }
.topbar-actions { gap: 7px; }
.organization-switcher { border: 0; background: transparent; }
.organization-switcher select { max-width: 136px; height: 40px; padding: 0 30px 0 10px; border: 1px solid var(--jk-line); border-radius: 10px; background-color: rgba(255,255,255,.7); font-size: 11px; font-weight: 650; }
.topbar-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #274965; border-radius: 50%; font-size: 17px; }
.topbar-icon:hover { color: var(--jk-brand-dark); background: rgba(218, 240, 238, .75); }
.topbar-icon span { position: absolute; right: -1px; top: -1px; min-width: 16px; height: 16px; padding: 0 3px; color: #fff; border-radius: 8px; background: #db4e47; font-size: 8px; line-height: 16px; text-align: center; }
.role-chip { min-width: 42px; padding: 4px; border: 0; background: transparent; }
.role-chip > span:nth-child(2), .role-chip > b { display: none; }
.role-chip .avatar { width: 34px; height: 34px; color: #fff; background: linear-gradient(145deg, #7db6d6, #466ea6); }
.new-business-button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; color: #fff; border-radius: 11px; background: linear-gradient(135deg, #5aa59f, #287b76); box-shadow: 0 8px 18px rgba(43, 125, 119, .22); font-size: 12px; font-weight: 750; }
.new-business-button:hover { color: #fff; transform: translateY(-1px); }
.readonly-banner { min-height: 30px; margin: 8px 2px 0; padding: 6px 14px; color: #55726e; border: 1px solid rgba(132, 185, 179, .2); border-radius: 9px; background: rgba(226, 244, 242, .62); font-size: 9px; }
.readonly-banner strong { color: #2e7973; }
.content { padding: 18px 2px 24px; }

.home-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 2px 6px 14px; }
.home-intro h2 { margin: 4px 0 5px; color: #0b2540; font-size: 25px; letter-spacing: -.035em; }
.home-intro p { margin: 0; color: #62768b; font-size: 12px; }
.home-intro .section-kicker { color: #21978f; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.home-intro-actions { display: flex; align-items: center; gap: 10px; }
.refresh-stamp { color: #718397; font-size: 9px; }
.home-stage { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 14px; }
.home-stage-main { display: grid; gap: 12px; min-width: 0; }
.executive-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; }
.executive-metrics .metric-card { isolation: isolate; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 112px; padding: 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 16px; background: var(--jk-glass-strong); box-shadow: var(--jk-shadow-soft); overflow: hidden; }
.executive-metrics .metric-card::before { content: ""; position: absolute; right: -22px; top: -28px; width: 72px; height: 72px; border-radius: 50%; background: currentColor; opacity: .06; z-index: 0; pointer-events: none; }
.executive-metrics .metric-card::after { z-index: 0; pointer-events: none; }
.executive-metrics .metric-symbol { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #fff; border-radius: 50%; background: linear-gradient(145deg, #789fc5, #315f85); font-size: 18px; box-shadow: inset 0 1px rgba(255,255,255,.45); }
.executive-metrics .accent-cyan .metric-symbol { background: linear-gradient(145deg, #6fbbb4, #267d77); }
.executive-metrics .accent-red .metric-symbol { background: linear-gradient(145deg, #dd928c, #a84c57); }
.executive-metrics .accent-amber .metric-symbol { background: linear-gradient(145deg, #e4a76d, #bb6e22); }
.executive-metrics .accent-slate .metric-symbol { background: linear-gradient(145deg, #9a8ca7, #675b78); }
.executive-metrics .metric-card > div { position: relative; z-index: 1; display: grid; min-width: 0; }
.executive-metrics .metric-label { min-height: 2.6em; color: #4f6377; font-size: 12px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.executive-metrics strong { margin: 3px 0 4px; color: #102a45; font-size: 28px; line-height: 1; }
.executive-metrics small { min-height: 2.8em; color: #657b8f; font-size: 10px; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.panel { border: 1px solid rgba(255,255,255,.86); border-radius: 17px; background: var(--jk-glass); box-shadow: var(--jk-shadow-soft); backdrop-filter: blur(20px) saturate(135%); }
.panel-head { min-height: 64px; padding: 14px 17px; border-bottom: 1px solid var(--jk-line); }
.panel-head h3 { margin-top: 3px; color: #102a45; font-size: 16px; }
.panel-head small { color: #7a8b9d; font-size: 9px; }
.section-kicker { color: #249a92; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.fulfillment-panel { overflow: hidden; }
.glass-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr) 18px) minmax(0, 1fr); align-items: center; gap: 4px; padding: 16px; background: linear-gradient(180deg, rgba(215, 232, 240, .58), rgba(247, 250, 252, .48)); }
.glass-flow > i { color: #78afbd; font-size: 28px; font-style: normal; text-align: center; }
.glass-node { position: relative; display: grid; align-content: center; min-height: 116px; padding: 13px 10px; text-align: center; border: 1px solid rgba(151, 187, 210, .5); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(218,235,244,.66)); box-shadow: inset 0 1px rgba(255,255,255,.9), 0 10px 18px rgba(54, 92, 120, .10); transform: perspective(500px) rotateY(-2deg); }
.glass-node::after { content: ""; position: absolute; inset: 5px; pointer-events: none; border: 1px solid rgba(255,255,255,.75); border-radius: 10px; }
.glass-node span { color: #6092a7; font-size: 9px; }
.glass-node b { margin: 9px 0; color: #153551; font-size: 13px; }
.glass-node small { color: #6b8193; font-size: 8px; }
.glass-node.active { border-color: rgba(62, 167, 145, .7); background: linear-gradient(145deg, rgba(233,255,248,.94), rgba(129,210,186,.7)); box-shadow: 0 10px 25px rgba(36, 143, 122, .2), inset 0 1px rgba(255,255,255,.9); }
.glass-node.risk small { color: #be604d; }
.dashboard-order-filters { margin: 13px 15px 5px; padding: 12px; border: 1px solid var(--jk-line); border-radius: 13px; background: rgba(247,250,252,.72); }
.dashboard-order-filters input, .dashboard-order-filters select { min-height: 38px; border-color: rgba(153,177,197,.28); border-radius: 9px; background-color: rgba(255,255,255,.85); }
.execution-day-list { padding: 8px 15px 15px; }
.execution-day-group { border-color: var(--jk-line); border-radius: 12px; background: rgba(255,255,255,.68); }
.execution-day-group summary { min-height: 50px; color: #2a4761; background: rgba(235,244,248,.7); }
.execution-table th { background: rgba(239, 246, 249, .82); }
.execution-table td { background: rgba(255,255,255,.42); }
.home-empty { display: grid; justify-items: center; gap: 8px; min-height: 210px; padding: 34px; color: #6b8092; text-align: center; }
.home-empty > span { display: grid; place-items: center; width: 46px; height: 46px; color: #4c9690; border: 1px dashed #8fc2bd; border-radius: 50%; font-size: 24px; }
.home-empty strong { color: #27455e; font-size: 15px; }
.home-empty p { max-width: 470px; margin: 0; font-size: 11px; line-height: 1.7; }
.home-insight-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; }
.insight-panel { min-height: 210px; overflow: hidden; }
.insight-empty { display: flex; align-items: center; justify-content: center; gap: 15px; min-height: 130px; padding: 18px; color: #71869a; text-align: center; }
.chart-placeholder { display: grid; place-items: center; width: 52px; height: 52px; color: #4f9690; border-radius: 15px; background: #e2f3f1; font-size: 27px; }
.insight-empty p { max-width: 330px; font-size: 10px; line-height: 1.7; }
.schedule-preview { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; padding: 15px; }
.schedule-preview > div:not(.insight-empty) { display: grid; gap: 7px; min-height: 104px; padding: 12px 10px; border: 1px solid var(--jk-line); border-radius: 12px; background: rgba(255,255,255,.72); }
.schedule-preview span { color: #6d8397; font-size: 9px; }
.schedule-preview strong { color: #244762; font-size: 10px; overflow-wrap: anywhere; }
.schedule-preview small { align-self: end; color: #317c76; font-size: 8px; }
.schedule-preview .insight-empty { grid-column: 1 / -1; min-height: 130px; }

.jk-assistant-panel { position: sticky; top: 87px; display: grid; gap: 12px; min-height: calc(100vh - 112px); padding: 13px; border: 1px solid rgba(255,255,255,.82); border-radius: 18px; background: rgba(249,252,253,.78); box-shadow: var(--jk-shadow); backdrop-filter: blur(24px) saturate(145%); }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; border-bottom: 1px solid var(--jk-line); }
.assistant-bot { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; border-radius: 11px; background: linear-gradient(145deg, #7fc3bb, #327d78); box-shadow: inset 0 1px rgba(255,255,255,.5); }
.assistant-head > div { display: grid; }
.assistant-head strong { color: #163550; font-size: 14px; }
.assistant-head small { margin-top: 3px; color: #8292a1; font-size: 8px; }
.assistant-focus, .assistant-activity { padding: 12px; border: 1px solid var(--jk-line); border-radius: 13px; background: rgba(255,255,255,.7); }
.assistant-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #2b4963; font-size: 11px; }
.assistant-section-title b { color: #d24e48; }
.assistant-list { display: grid; gap: 7px; }
.assistant-list > a { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 8px; padding: 9px; color: #29465e; border: 1px solid rgba(166,187,204,.2); border-radius: 10px; background: rgba(248,250,252,.82); }
.assistant-list > a:hover { color: var(--jk-brand-dark); border-color: rgba(83,154,146,.35); }
.assistant-list a > div { display: grid; min-width: 0; }
.assistant-list a strong { overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.assistant-list a small { margin-top: 3px; overflow: hidden; color: #7b8d9e; font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.assistant-list a > b { padding: 3px 5px; color: #a4623c; border-radius: 6px; background: #fff0dd; font-size: 7px; }
.risk-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.risk-icon.orange { color: #b76b20; background: #fff0db; }.risk-icon.red { color: #bd4d4a; background: #ffe7e5; }.risk-icon.purple { color: #775584; background: #f0e7f4; }
.assistant-empty { display: grid; justify-items: center; gap: 5px; padding: 18px 8px; color: #71869a; text-align: center; }
.assistant-empty > span { display: grid; place-items: center; width: 32px; height: 32px; color: #2c887f; border-radius: 50%; background: #e0f3ee; }
.assistant-empty strong { color: #2e5068; font-size: 10px; }.assistant-empty p { margin: 0; font-size: 8px; line-height: 1.6; }
.assistant-action { display: block; margin-top: 10px; padding: 9px; color: #fff; border-radius: 9px; background: linear-gradient(135deg, #5ca79f, #287c76); font-size: 10px; font-weight: 750; text-align: center; }
.assistant-action:hover { color: #fff; }
.assistant-activity ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.assistant-activity li { display: flex; align-items: flex-start; gap: 7px; color: #657b8e; font-size: 8px; line-height: 1.45; }
.assistant-activity li span { flex: 0 0 auto; width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: #47a497; }
.assistant-input { align-self: end; display: flex; align-items: center; justify-content: space-between; padding: 12px; color: #8797a5; border: 1px solid var(--jk-line); border-radius: 11px; background: rgba(255,255,255,.68); font-size: 9px; }
.assistant-input b { color: #2f8f87; font-size: 17px; }
.dashboard-footnote { margin: 12px 0 0; border-color: rgba(255,255,255,.82); border-radius: 13px; background: rgba(255,255,255,.58); }

/* Keep business pages in the same visual language. */
.page-heading, .stage4-hero, .stage5-hero, .stage6-hero, .trial-form-section, .detail-hero, .permission-note { border-color: rgba(255,255,255,.82) !important; border-radius: 17px !important; background: rgba(255,255,255,.78) !important; box-shadow: var(--jk-shadow-soft) !important; }
.page-heading h2, .stage4-hero h2, .stage5-hero h2, .stage6-hero h2 { color: #102a45; }
.table-wrap { border-color: var(--jk-line); border-radius: 12px; background: rgba(255,255,255,.62); }
table { color: #243f57; }
th { color: #667c90; background: rgba(235,244,248,.78); font-size: 10px; }
td { border-color: rgba(171,190,205,.25); font-size: 11px; }
.button.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #58a69e, #287d77); box-shadow: 0 7px 16px rgba(43,125,119,.16); }
.button.ghost { color: #327d77; border-color: rgba(58,143,134,.25); background: rgba(238,249,247,.7); }
.text-link, .inline-action { color: #228d85; }

html[data-font-size="small"] body { font-size: 13px; }
html[data-font-size="standard"] body { font-size: 15px; }
html[data-font-size="large"] body { font-size: 17px; }
html[data-font-size="large"] .executive-metrics { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
html[data-font-size="large"] .executive-metrics .metric-label,
html[data-font-size="large"] .executive-metrics small,
html[data-font-size="large"] .assistant-list a strong,
html[data-font-size="large"] .assistant-list a small,
html[data-font-size="large"] th,
html[data-font-size="large"] td { font-size: max(1em, 12px); }

@media (max-width: 1480px) {
  .app-shell { grid-template-columns: 218px minmax(0,1fr); }
  .home-stage { grid-template-columns: minmax(0,1fr) 244px; }
  .executive-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .global-search { width: min(330px, 29vw); }
}
@media (max-width: 1180px) {
  .app-shell { display: block; padding: 8px; }
  .sidebar { position: static; height: auto; min-height: 0; }
  .brand { min-height: 78px; }
  .nav-list { display: flex; gap: 5px; padding: 8px; overflow-x: auto; }
  .nav-group { flex: 0 0 180px; }.nav-primary { flex: 0 0 150px; }
  .sidebar-foot { display: none; }
  .topbar { top: 8px; }
  .home-stage { grid-template-columns: 1fr; }
  .jk-assistant-panel { position: static; min-height: 0; grid-template-columns: 1fr 1fr; }
  .assistant-head, .assistant-input { grid-column: 1 / -1; }
}

/* V0.9.0-RC1 approved home-shell restoration: one navigation, one dashboard, one reminder rail. */
body .brand { min-height: 136px; justify-content: center; padding: 22px 18px; }
body .brand .brand-logo { width: 188px; max-width: 100%; }
body .topbar { min-height: 72px; height: 72px; padding: 0 18px; border: 1px solid rgba(185, 205, 220, .55); border-radius: 18px; box-shadow: 0 8px 22px rgba(67, 111, 134, .09); }
body .topbar-scope { min-width: 255px; max-width: 330px; overflow: hidden; }
body .scope-company { overflow: hidden; text-overflow: ellipsis; }
.topbar-todo, .topbar-help, .account-token { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; color: #31506b; border: 1px solid rgba(176, 199, 214, .55); border-radius: 9px; background: rgba(255,255,255,.68); font-size: 12px; font-weight: 800; text-decoration: none; }
.topbar-todo { gap: 5px; padding: 0 9px; }
.topbar-todo b { display: grid; place-items: center; min-width: 18px; height: 18px; color: #fff; border-radius: 50%; background: #df5653; font-size: 10px; }
.topbar-help { padding: 0 10px; }
.account-token { width: 34px; cursor: pointer; background: linear-gradient(145deg, #79b7d2, #386eb0); color: #fff; border-color: transparent; }
.account-menu[open] .account-token { box-shadow: 0 0 0 3px rgba(64, 151, 208, .18); }
.home-intro-target { align-items: center; min-height: 64px; margin: 0 0 12px; padding: 13px 18px; border: 1px solid rgba(202, 219, 229, .72); border-radius: 16px; background: rgba(255,255,255,.72); }
.home-intro-target h2 { margin: 2px 0 0; font-size: 27px; }
.business-line-tabs { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid #d2e1ea; border-radius: 11px; background: #f4f8fb; }
.business-line-tabs a { min-width: 62px; padding: 9px 13px; color: #58718a; font-size: 12px; font-weight: 800; text-align: center; text-decoration: none; }
.business-line-tabs a.active { color: #fff; background: linear-gradient(135deg, #299a95, #327f82); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.metric-grid.executive-metrics { gap: 10px; margin-bottom: 12px; }
.home-stage-main .metric-grid.executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-height: 112px; padding: 16px 14px; }
.metric-card .metric-symbol { width: 38px; height: 38px; font-size: 17px; }
.metric-card strong { font-size: 27px; }
.fulfillment-panel .panel-head { min-height: 70px; padding: 13px 18px; }
.glass-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; padding: 12px; }
.glass-flow > i { display: none; }
.glass-node { min-width: 112px; min-height: 102px; padding: 10px 8px; transform: none; }
.glass-node b { margin: 7px 0; font-size: 12px; line-height: 1.25; }
.glass-node small { font-size: 9px; line-height: 1.4; }
.execution-panel .panel-head { min-height: 74px; padding: 13px 18px; }
.execution-panel .panel-head small { display: none; }
.jk-assistant-panel { top: 100px; gap: 10px; min-height: auto; padding: 12px; }
.assistant-head { padding-bottom: 10px; }
.assistant-bot { width: 34px; height: 34px; font-size: 10px; background: linear-gradient(145deg, #54aaa1, #287f7d); }
.assistant-focus, .assistant-activity { padding: 11px; border-radius: 12px; }
.assistant-empty { min-height: 110px; }
.assistant-empty.compact { min-height: 70px; }
.assistant-activity ul, .assistant-input { display: none; }
.home-insight-grid { gap: 12px; }

@media (max-width: 1420px) {
  body .topbar-scope { min-width: 190px; max-width: 230px; }
  .home-stage { grid-template-columns: minmax(0, 1fr) 238px; }
  .glass-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .home-stage { grid-template-columns: 1fr; }
  .jk-assistant-panel { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assistant-head { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .topbar-scope .scope-company, .topbar-scope .scope-divider, .organization-switcher, .topbar-icon { display: none; }
  .global-search { width: 42vw; }
  .new-business-button { padding: 0 10px; font-size: 0; }.new-business-button span { font-size: 18px; }
  .executive-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .glass-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }.glass-flow > i { display: none; }
  .home-insight-grid, .jk-assistant-panel { grid-template-columns: 1fr; }
  .assistant-head, .assistant-input { grid-column: auto; }
  .schedule-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.feed-item:last-child { border-bottom: 0; }
.feed-item strong { display: block; color: var(--slate-900); font-size: 11px; }
.feed-item small { display: block; margin-top: 3px; color: var(--slate-500); font-size: 9px; }
.severity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber-500); }
.severity-dot.severity-high { background: var(--red-500); }.severity-dot.severity-low { background: var(--green-500); }
.exception-feed + .button { width: calc(100% - 36px); margin: 0 18px 18px; }
.empty-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 95px; color: var(--slate-500); font-size: 11px; }
.empty-state span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--green-500); background: #eaf7f1; border-radius: 50%; }
.empty-state.compact { min-height: 120px; flex-direction: column; }
.evidence-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 12px; }
.evidence-strip > div { display: flex; align-items: center; gap: 11px; padding: 14px 17px; background: white; }
.evidence-strip p { margin: 0; color: var(--slate-500); font-size: 10px; }
.evidence-strip strong { display: block; margin-bottom: 2px; color: var(--slate-900); font-size: 11px; }
.evidence-icon { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; color: #14704a; background: #e7f7ef; border-radius: 8px; font-weight: 800; }
.evidence-icon.pending { color: #966118; background: #fff3dc; }

.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.showcase-card { position: relative; overflow: hidden; padding: 22px; }
.showcase-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.showcase-card-head { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; }
.showcase-code { display: grid; place-items: center; width: 44px; height: 44px; color: white; background: var(--accent); border-radius: 12px; font-size: 14px; font-weight: 850; }
.showcase-card h3 { margin: 4px 0 0; color: var(--navy-950); font-size: 17px; }
.showcase-story { min-height: 42px; margin: 18px 0 13px; color: var(--slate-500); font-size: 11px; line-height: 1.8; }
.showcase-fact { display: flex; justify-content: space-between; gap: 16px; padding: 11px 13px; background: var(--slate-050); border-radius: 9px; font-size: 10px; }
.showcase-fact span { color: var(--slate-500); }.showcase-fact strong { color: var(--slate-900); }
.showcase-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.showcase-status-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 9px; }
.showcase-status-list div { padding: 9px 11px; background: white; }.showcase-status-list dt { color: var(--slate-500); font-size: 8px; }.showcase-status-list dd { margin: 4px 0 0; color: var(--slate-900); font-size: 10px; font-weight: 750; }
.showcase-finance { margin-top: 18px; }.showcase-finance-body { display: grid; grid-template-columns: 1fr 1fr 2fr auto; align-items: center; gap: 20px; padding: 18px 20px; }
.showcase-finance-body small { display: block; margin-bottom: 5px; color: var(--slate-500); font-size: 8px; }.showcase-finance-body strong { color: var(--slate-900); font-size: 11px; }

.filter-bar { display: flex; align-items: end; gap: 10px; margin-bottom: 16px; padding: 13px; background: white; border: 1px solid var(--slate-200); border-radius: 12px; }
.filter-bar label { display: grid; gap: 5px; min-width: 150px; color: var(--slate-500); font-size: 9px; font-weight: 650; }
.filter-bar .search-field { position: relative; flex: 1; min-width: 260px; }
.search-field > span[aria-hidden] { position: absolute; left: 11px; bottom: 10px; color: var(--slate-500); font-size: 16px; }
input, select, textarea { width: 100%; color: var(--slate-900); background: white; border: 1px solid var(--slate-300); border-radius: 8px; outline: none; }
input, select { height: 36px; padding: 0 10px; }
textarea { padding: 10px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan-600); box-shadow: 0 0 0 3px rgba(22,198,202,.12); }
.search-field input { padding-left: 34px; }
.order-table table { min-width: 1120px; }

.line-chip { display: inline-flex; align-items: center; width: max-content; min-height: 22px; margin: 2px 4px 2px 0; padding: 0 8px; color: #1a6770; background: var(--cyan-050); border: 1px solid #c7ecee; border-radius: 6px; font-size: 9px; font-weight: 700; }
.button.danger { color: #983f3f; background: #fff2f2; border-color: #f0caca; }
.hero-actions { display: flex; align-items: center; gap: 8px; }
.hero-actions form { margin: 0; }
.document-form { display: grid; gap: 18px; }
.form-section { overflow: hidden; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.form-grid label { display: grid; align-content: start; gap: 6px; color: var(--slate-700); font-size: 9px; font-weight: 650; }
.form-grid label > span b { margin-left: 3px; color: var(--red-500); }
.form-grid .span-all { grid-column: 1 / -1; }
.form-grid input[type="checkbox"] { width: 18px; height: 18px; margin-top: 8px; }
.field-error { color: var(--red-500); font-weight: 600; }
.form-errors { margin: 14px 20px 0; padding: 10px 13px; color: #913838; background: #fff0f0; border: 1px solid #f0caca; border-radius: 8px; font-size: 10px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.line-form-stack { display: grid; gap: 12px; padding: 18px; }
.line-form-card { overflow: hidden; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 11px; }
.line-form-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: white; border-bottom: 1px solid var(--slate-200); }
.line-form-title strong { color: var(--navy-950); font-size: 11px; }.line-form-title span { color: var(--slate-500); font-size: 9px; }
.line-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 14px; }
.form-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; background: rgba(246,248,250,.94); border: 1px solid var(--slate-200); border-radius: 12px; backdrop-filter: blur(12px); }
.business-line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.business-card { position: relative; padding: 20px; }
.business-card h3 { margin: 5px 0 22px; font-size: 18px; }.business-card strong { display: block; color: var(--navy-950); font-size: 30px; }.business-card span { color: var(--slate-500); font-size: 9px; }
.sync-metrics { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.source-card { padding: 18px; }
.source-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.source-card h3 { margin: 4px 0 0; font-size: 16px; }
.source-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 18px 0 0; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 9px; }
.source-card dl div { padding: 10px; background: white; }.source-card dt { color: var(--slate-500); font-size: 8px; }.source-card dd { margin: 4px 0 0; color: var(--slate-900); font-size: 10px; font-weight: 700; }
.sync-error { margin: 11px 0 0; padding: 9px; color: #913838; background: #fff0f0; border-radius: 7px; font-size: 9px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; margin: -4px 0 15px; color: var(--slate-500); font-size: 10px; }
.breadcrumb a { color: var(--cyan-600); font-weight: 700; }
.order-hero, .exception-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 20px 24px; color: white; background: linear-gradient(112deg, var(--navy-950), #113c5c); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.order-hero h2, .exception-hero h2 { margin: 0; font-size: 23px; }
.order-hero p, .exception-hero p { margin: 7px 0 0; color: #a8becd; font-size: 10px; }
.title-line { display: flex; align-items: center; gap: 11px; }
.hero-progress { display: flex; align-items: center; gap: 11px; }
.hero-progress p { margin: 0; width: 55px; line-height: 1.45; }
.progress-ring { --size: 58px; display: grid; place-items: center; width: var(--size); height: var(--size); background: conic-gradient(var(--cyan-500) calc(var(--progress) * 1%), rgba(255,255,255,.13) 0); border-radius: 50%; }
.progress-ring::before { content: ""; grid-area: 1/1; width: 44px; height: 44px; background: var(--navy-900); border-radius: 50%; }
.progress-ring span { grid-area: 1/1; z-index: 1; font-size: 11px; font-weight: 800; }
.detail-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 18px 20px; }
.detail-list > div { padding: 5px 15px; border-right: 1px solid var(--slate-100); }
.detail-list > div:first-child { padding-left: 0; }.detail-list > div:nth-child(4n) { border-right: 0; }
.detail-list dt { margin-bottom: 7px; color: var(--slate-500); font-size: 9px; }
.detail-list dd { margin: 0; color: var(--slate-900); font-size: 11px; font-weight: 700; }
.work-order-details { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--slate-100); }
.work-order-details > div:nth-child(3n) { border-right: 0; }
.work-order-tabs { display: flex; gap: 6px; padding: 0 20px 15px; }
.work-order-tabs a { padding: 7px 10px; color: var(--slate-500); background: var(--slate-050); border-radius: 7px; font-size: 9px; }
.work-order-tabs a.active { color: var(--navy-900); background: var(--cyan-050); font-weight: 750; }
.check-list { display: grid; gap: 2px; margin: 0; padding: 12px 18px 17px; list-style: none; }
.check-list li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--slate-100); }
.check-list li:last-child { border-bottom: 0; }
.check-list li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.check-list .ok > span { color: #14704a; background: #e7f7ef; }.check-list .pending > span { color: #966118; background: #fff3dc; }
.check-list p { margin: 0; color: var(--slate-500); font-size: 9px; line-height: 1.5; }
.check-list strong { display: block; color: var(--slate-900); font-size: 10px; }
.process-panel { margin-top: 18px; }
.process-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; padding: 18px; }
.process-step { position: relative; padding-top: 12px; }
.process-step::before { content: ""; position: absolute; left: 18px; right: -18px; top: 25px; height: 2px; background: var(--slate-200); }
.process-step:last-child::before { display: none; }
.step-marker { position: relative; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; margin: 0 0 -5px 7px; color: var(--slate-500); background: white; border: 2px solid var(--slate-300); border-radius: 50%; font-size: 9px; font-weight: 800; }
.process-step.done .step-marker { color: white; background: var(--green-500); border-color: var(--green-500); }
.process-step.current .step-marker { color: var(--navy-950); background: var(--cyan-500); border-color: var(--cyan-500); box-shadow: 0 0 0 5px rgba(22,198,202,.12); }
.step-card { min-height: 155px; padding: 21px 12px 12px; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 10px; }
.step-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.step-card strong { font-size: 10px; }
.step-progress { display: flex; align-items: center; gap: 7px; margin: 13px 0; }
.step-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0; }
.step-card dl > div { min-width: 0; }
.step-card dt { color: var(--slate-500); font-size: 7px; }.step-card dd { margin: 3px 0 0; color: var(--slate-900); font-size: 8px; font-weight: 700; }
.source-ref { display: block; margin-top: 9px; overflow: hidden; color: var(--slate-500); font-family: monospace; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.exception-section { margin-top: 18px; }
.exception-list { padding: 5px 18px 14px; }
.exception-row { display: grid; grid-template-columns: 52px 1fr auto 15px; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.exception-row:last-child { border-bottom: 0; }
.exception-row strong { display: block; color: var(--slate-900); font-size: 11px; }.exception-row small { display: block; margin-top: 3px; color: var(--slate-500); font-size: 8px; }
.severity-label { min-width: 40px; border-radius: 6px; }.severity-bg-high { color: #a63f3f; background: #feecec; }.severity-bg-medium { color: #9b6819; background: #fff3dc; }.severity-bg-low { color: #14704a; background: #e7f7ef; }
.stack-form { display: grid; gap: 12px; }
.organization-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.organization-flow-card { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, #f7fcfd, #ffffff); }
.organization-flow-card small { color: var(--cyan-700); font-weight: 750; letter-spacing: .08em; }
.organization-flow-card strong { color: var(--navy-900); font-size: var(--text-lg); }
.organization-flow-card p { margin: 0; color: var(--slate-600); }
@media (max-width: 900px) { .organization-flow { grid-template-columns: 1fr; } }
.form-panel .stack-form, .action-panel .stack-form { padding: 16px 18px 19px; }
.stack-form label { display: grid; gap: 6px; color: var(--slate-700); font-size: 9px; font-weight: 650; }
.stack-form label small { color: var(--slate-500); font-weight: 400; }
.permission-note { margin: 18px; padding: 16px; color: var(--slate-500); background: var(--slate-050); border: 1px dashed var(--slate-300); border-radius: 10px; font-size: 10px; line-height: 1.6; }
.permission-note span { display: inline-block; margin-bottom: 6px; padding: 3px 7px; color: #536678; background: #e8edf1; border-radius: 5px; font-weight: 800; }
.permission-note p { margin: 0; }

.summary-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 15px; }
.summary-tabs a { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 17px; background: white; border: 1px solid var(--slate-200); border-radius: 11px; }
.summary-tabs a.active { border-color: var(--cyan-500); box-shadow: inset 0 -3px 0 var(--cyan-500); }
.summary-tabs span { color: var(--slate-500); font-size: 10px; }.summary-tabs strong { color: var(--navy-950); font-size: 21px; }
.exception-hero { color: var(--slate-900); background: white; border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); }
.exception-hero p { color: var(--slate-500); }
.severity-border-high { border-left: 4px solid var(--red-500); }.severity-border-medium { border-left: 4px solid var(--amber-500); }.severity-border-low { border-left: 4px solid var(--green-500); }
.narrative, .resolution { margin: 0 20px 20px; padding: 16px; background: var(--slate-050); border-radius: 10px; }
.narrative h4, .resolution h4 { margin: 0 0 7px; font-size: 11px; }.narrative p, .resolution p { margin: 0; color: var(--slate-700); font-size: 11px; line-height: 1.7; }
.resolution { background: #eaf8f2; border: 1px solid #c9eadc; }.resolution small { display: block; margin-top: 8px; color: #428066; font-size: 8px; }
.audit-panel { margin-top: 18px; }
.audit-timeline { margin: 0; padding: 18px 25px 24px 34px; list-style: none; }
.audit-timeline li { position: relative; display: grid; grid-template-columns: 17px 1fr; gap: 12px; padding-bottom: 19px; }
.audit-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--slate-200); }
.audit-marker { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 2px; background: var(--cyan-500); border: 3px solid #dff9fa; border-radius: 50%; }
.audit-timeline strong { font-size: 10px; }.audit-timeline p { margin: 4px 0; color: var(--slate-700); font-size: 10px; }.audit-timeline small { color: var(--slate-500); font-size: 8px; }

.login-body { min-width: 960px; min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 72% 14%, rgba(22,198,202,.12), transparent 30%), var(--slate-050); }
.login-shell { display: grid; grid-template-columns: 1.35fr 1fr; width: min(1040px, 100%); min-height: 620px; overflow: hidden; background: white; border-radius: 20px; box-shadow: 0 30px 75px rgba(8,32,52,.18); }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 46px 52px; color: white; background: linear-gradient(145deg, var(--navy-950), #0d3857); }
.login-brand::after { content: ""; position: absolute; right: -115px; bottom: -95px; width: 360px; height: 360px; border: 1px solid rgba(22,198,202,.35); border-radius: 50%; box-shadow: 0 0 0 50px rgba(22,198,202,.035), 0 0 0 100px rgba(22,198,202,.02); }
.login-brand img { position: relative; z-index: 1; width: 184px; }
.login-brand > div { position: relative; z-index: 1; margin-top: 92px; }
.login-brand > div p { margin: 0 0 14px; color: var(--cyan-500); font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.login-brand h1 { margin: 0 0 16px; font-size: 34px; line-height: 1.35; letter-spacing: -.04em; }
.login-brand > div span { color: #9eb4c4; font-size: 10px; }
.login-brand ul { position: relative; z-index: 1; display: flex; gap: 20px; margin: auto 0 0; padding: 0; list-style: none; }
.login-brand li { display: grid; gap: 5px; color: #abc0ce; font-size: 9px; }.login-brand li b { color: var(--cyan-500); font-size: 16px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 55px 52px; }
.login-panel h2 { margin: 7px 0; color: var(--navy-950); font-size: 25px; }.login-panel > div > p:not(.section-kicker) { margin: 0; color: var(--slate-500); font-size: 11px; }
.login-form { margin-top: 28px; }.login-form input { height: 42px; }.login-form .button { min-height: 43px; margin-top: 5px; }
.login-foot { margin: 28px 0 0; padding-top: 17px; color: var(--slate-500); border-top: 1px solid var(--slate-100); font-size: 9px; line-height: 1.6; }

@media (max-width: 1280px) {
  :root { --sidebar: 226px; }
  .content, .topbar { padding-left: 24px; padding-right: 24px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* Stage 2: materials, BOM, inventory, procurement and line-side control */
.page-actions { justify-content: flex-end; margin-bottom: 14px; }
.compact-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.danger-card strong { color: var(--red-500); }
.material-plan-panel { margin-top: 18px; }
.material-actions { margin-top: 18px; align-items: start; }
.movement-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--slate-200); }
.compact-stack { padding: 16px; background: white; }
.compact-stack h4 { margin: 0 0 4px; color: var(--navy-950); font-size: 12px; }
.form-hint { margin: 0 0 8px; color: var(--slate-500); font-size: 11px; line-height: 1.55; }
.compact-stack label { gap: 4px; }
.compact-stack input, .compact-stack select { height: 33px; }
.stage2-opening { margin-top: 18px; }
.stage2-opening .form-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
.status-not_planned { color: #536678; background: #edf2f5; }
.status-shortage, .status-variance { color: #9b3c3c; background: #feecec; }
.status-ready, .status-settled { color: #11734b; background: #e6f7ef; }
.status-issued, .status-requested, .status-ordered, .status-partial, .status-effective { color: #1762a8; background: #e8f3ff; }
.status-obsolete { color: #536678; background: #edf2f5; }

@media (max-width: 1500px) {
  .movement-form-grid { grid-template-columns: 1fr; }
  .stage2-opening .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Stage 3: scheduling, execution, quality release and finished-goods control */
.compact-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.compact-metrics article { min-height: 98px; }
.inline-form { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.inline-form input, .inline-form select { width: auto; min-width: 92px; height: 31px; }
.inline-form .button.small, .button.small { min-height: 30px; padding: 6px 10px; font-size: 9px; }
.form-strip { padding: 0 18px 18px; align-items: end; }
.form-strip label { display: grid; gap: 5px; color: var(--slate-600); font-size: 9px; }
.receipt-line + .receipt-line { margin-top: 7px; }
.muted { color: var(--slate-400); }
.status-available { color: #11734b; background: #e6f7ef; }
.status-pending, .status-not_ready, .status-not_received { color: #8a6719; background: #fff4dc; }
.status-frozen, .status-defective, .status-reversed { color: #9b3c3c; background: #feecec; }
.status-closed, .status-received, .status-released { color: #11734b; background: #e6f7ef; }

@media (max-width: 1280px) {
  .compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Stage 4: imagegen-led fulfillment, reconciliation and RMA control tower */
.sidebar { overflow-y: auto; }
.stage4-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 18px; padding: 26px 30px; color: white; background: radial-gradient(circle at 82% 15%, rgba(24,202,205,.22), transparent 25%), linear-gradient(118deg, #071d31, #0d3b5b); border-radius: 16px; box-shadow: var(--shadow-md); }
.stage4-hero p { margin: 0 0 8px; color: var(--cyan-500); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.stage4-hero h2 { max-width: 780px; margin: 0 0 9px; font-size: 23px; line-height: 1.35; }
.stage4-hero span { color: #a7bdcb; font-size: 10px; }
.button.inverse { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.stage4-metrics article { position: relative; overflow: hidden; }
.stage4-metrics article::after { content: ""; position: absolute; right: -22px; bottom: -32px; width: 85px; height: 85px; border: 1px solid rgba(22,198,202,.16); border-radius: 50%; box-shadow: 0 0 0 15px rgba(22,198,202,.025); }
.stage4-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 16px; }
.stage4-section { margin-top: 18px; }
.stage4-queue { display: grid; gap: 0; margin: 0; padding: 4px 18px 16px; list-style: none; }
.stage4-queue li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.stage4-queue li:last-child { border-bottom: 0; }
.stage4-queue a { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.stage4-queue strong { color: var(--navy-950); font-size: 10px; }
.stage4-queue span { grid-column: 1; color: var(--slate-500); font-size: 9px; }
.stage4-queue em { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #14704a; font-size: 8px; font-style: normal; font-weight: 750; }
.boundary-pill { padding: 5px 9px; color: #176b72; background: var(--cyan-050); border: 1px solid #c6ecee; border-radius: 999px; font-size: 8px; font-weight: 800; }
.boundary-callout, .boundary-note { display: flex; align-items: center; gap: 16px; margin: 0 0 17px; padding: 13px 16px; color: #735615; background: #fff8e8; border: 1px solid #f0dfad; border-radius: 10px; font-size: 9px; line-height: 1.55; }
.boundary-callout strong { color: #805c0f; white-space: nowrap; }
.boundary-note { margin: 15px 20px 0; }
.serial-chip { display: inline-flex; margin: 2px 3px 2px 0; padding: 3px 6px; color: #275c6a; background: #edf9fa; border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7px; }
.danger-zone { margin: 12px 18px 18px; padding: 14px; background: #fff8f8; border: 1px solid #f1d1d1; border-radius: 9px; }
.pop-form { min-width: 330px; margin-top: 10px; padding: 13px; background: white; border: 1px solid var(--slate-200); border-radius: 9px; box-shadow: var(--shadow-md); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.stage4-timeline { padding-top: 28px; }
.status-draft { color: #536678; background: #edf2f5; }
.status-submitted, .status-approved, .status-picked, .status-reviewed, .status-shipped, .status-awaiting_return, .status-received_pending, .status-repairing, .status-ready_to_return, .status-supplement_pending { color: #1762a8; background: #e8f3ff; }
.status-posted, .status-signed, .status-confirmed, .status-passed, .status-inspected { color: #11734b; background: #e6f7ef; }
.status-rejected, .status-disputed, .status-failed, .status-void, .status-cancelled { color: #9b3c3c; background: #feecec; }
.status-locked, .status-authorized { color: #77540f; background: #fff3dc; }

@media (max-width: 1280px) {
  .stage4-grid { grid-template-columns: 1fr; }
  .stage4-hero { align-items: flex-start; flex-direction: column; }
}

/* RC4: unified navigation, account access center and BOM production package */
.bom-summary-card { margin-bottom: 18px; overflow: hidden; }
.bom-summary-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px 18px; }
.bom-summary-main h2 { margin: 5px 0 0; color: var(--navy-950); font-size: 24px; letter-spacing: -.025em; }
.bom-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0 24px 20px; }
.bom-summary-grid > div { min-height: 64px; padding: 12px 18px; background: #fbfcfd; border-top: 1px solid var(--slate-100); border-right: 1px solid var(--slate-100); }
.bom-summary-grid > div:nth-child(4n) { border-right: 0; }
.bom-summary-grid dt { margin-bottom: 7px; color: var(--slate-500); font-size: 9px; }
.bom-summary-grid dd { margin: 0; color: var(--slate-900); font-size: 11px; font-weight: 750; }
.bom-package-panel { overflow: hidden; }
.bom-package-head { align-items: center; }
.info-banner { display: flex; align-items: center; gap: 9px; max-width: 610px; padding: 9px 12px; color: #315b73; background: #eaf7ff; border: 1px solid #cceaf8; border-radius: 8px; font-size: 9px; line-height: 1.55; }
.info-banner strong { flex: 0 0 auto; color: #176a91; }
.production-package + .production-package { border-top: 9px solid var(--slate-050); }
.package-readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 18px 20px 10px; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 11px; }
.readiness-card { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; min-height: 82px; padding: 13px 15px; background: white; }
.readiness-card:hover { background: #fbfefe; }
.readiness-card > span:nth-child(2) { min-width: 0; }
.readiness-card small { display: block; margin-bottom: 5px; overflow: hidden; color: var(--slate-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.readiness-card strong { display: block; overflow: hidden; color: var(--slate-900); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.readiness-card em { grid-column: 2; overflow: hidden; color: var(--slate-500); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.readiness-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; color: #176a91; background: #eaf7ff; border-radius: 10px; font-size: 18px; font-weight: 850; }
.readiness-icon.cyan { color: #157379; background: var(--cyan-050); }
.readiness-icon.amber { color: #a56c15; background: #fff4df; }
.readiness-icon.violet { color: #704ab0; background: #f2ecff; }
.readiness-icon.green { color: #14704a; background: #e9f8f0; }
.production-definition-bar { display: grid; grid-template-columns: 1fr 1.35fr 1fr auto; align-items: center; gap: 20px; margin: 16px 20px 0; padding: 12px 15px; background: #f8fbfc; border: 1px solid var(--slate-200); border-radius: 10px; }
.production-definition-bar > div { min-width: 0; }
.production-definition-bar small { display: block; margin-bottom: 5px; color: var(--slate-500); font-size: 8px; }
.production-definition-bar strong { color: var(--slate-900); font-size: 10px; }
.production-definition-bar .status-pill { display: inline-flex; margin-left: 7px; }
.production-definition-bar .text-link { white-space: nowrap; }
.production-document-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.package-document-table { margin: 0 20px; border: 1px solid var(--slate-200); border-radius: 10px; }
.package-document-table table { min-width: 920px; }
.binding-actions { display: flex; align-items: center; gap: 6px; min-width: 176px; }
.binding-actions form { margin: 0; }
.inline-action { padding: 0; color: var(--cyan-600); background: transparent; border: 0; font-size: 9px; font-weight: 750; cursor: pointer; }
.inline-action:hover { text-decoration: underline; }
.inline-action.exclude { color: #8e5d5d; }
.inline-action.exclude::before { content: "|"; margin-right: 6px; color: var(--slate-300); }
.verified-label { color: #14704a; font-size: 9px; font-weight: 750; }
.readonly-label { color: var(--slate-500); font-size: 9px; }
.package-foot { display: flex; align-items: center; gap: 16px; padding: 12px 22px 18px; color: var(--slate-500); font-size: 9px; }
.package-foot .text-link { margin-left: auto; }
.package-empty { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 150px; margin: 18px 20px 20px; color: var(--slate-500); background: #fbfcfd; border: 1px dashed var(--slate-300); border-radius: 11px; }
.package-empty > span { display: grid; place-items: center; width: 45px; height: 45px; color: var(--cyan-600); background: var(--cyan-050); border-radius: 12px; font-size: 21px; }
.package-empty strong { color: var(--slate-900); font-size: 12px; }
.package-empty p { max-width: 620px; margin: 5px 0 0; font-size: 10px; line-height: 1.65; }
.bom-material-section, .bom-bulk-panel { margin-top: 18px; }
.bom-bulk-form { padding: 18px 20px 20px; }

.home-heading { align-items: center; }
.home-status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 12px; box-shadow: var(--shadow-sm); }
.home-status-strip > div { padding: 15px 18px; background: white; }
.home-status-strip small { display: block; margin-bottom: 6px; color: var(--slate-500); font-size: 8px; }
.home-status-strip strong { color: var(--navy-950); font-size: 12px; }
.home-module-section { margin-top: 18px; padding: 20px; background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.home-section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.home-section-title > span { display: grid; place-items: center; width: 36px; height: 36px; color: var(--cyan-600); background: var(--cyan-050); border-radius: 10px; font-weight: 850; }
.home-section-title h3 { margin: 3px 0 0; color: var(--navy-950); font-size: 16px; }
.home-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.home-module-card { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 11px; min-height: 105px; padding: 15px; background: #fbfdfd; border: 1px solid var(--slate-200); border-radius: 11px; transition: .18s ease; }
.home-module-card:hover { transform: translateY(-2px); border-color: #9de2e4; box-shadow: 0 9px 24px rgba(12,37,59,.08); }
.home-module-card.locked { background: #fafbfc; }
.module-code { display: grid; place-items: center; width: 42px; height: 42px; color: var(--navy-900); background: var(--cyan-050); border-radius: 10px; font-size: 12px; font-weight: 850; }
.home-module-card.locked .module-code { color: #778899; background: #edf1f4; }
.home-module-card strong { display: block; margin: 3px 0 6px; color: var(--slate-900); font-size: 11px; }
.home-module-card p { margin: 0; color: var(--slate-500); font-size: 8px; line-height: 1.55; }
.home-module-card em { position: absolute; right: 12px; bottom: 10px; color: #14704a; font-size: 8px; font-style: normal; font-weight: 750; }
.home-module-card.locked em { color: #8a6870; }

/* RC4.1: operating dashboard and reference-aligned BOM detail */
.operations-heading { align-items: center; }
.operations-heading h2 { max-width: 920px; }
.operation-flow { display: grid; grid-template-columns: repeat(4, minmax(132px, 1fr) 24px) minmax(132px, 1fr); align-items: center; gap: 5px; margin-bottom: 18px; padding: 13px 16px; background: linear-gradient(100deg, #082840, #0d3f5d); border: 1px solid #174d68; border-radius: 13px; box-shadow: var(--shadow-sm); }
.operation-flow > div { display: grid; grid-template-columns: 31px 1fr; column-gap: 9px; align-items: center; min-width: 0; }
.operation-flow > div span { grid-row: 1 / span 2; display: grid; place-items: center; width: 31px; height: 31px; color: #0c3851; background: #62e2e3; border-radius: 9px; font-size: 9px; font-weight: 850; }
.operation-flow > div strong { overflow: hidden; color: white; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.operation-flow > div small { overflow: hidden; margin-top: 3px; color: #a9c5d4; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.operation-flow > i { color: #68acbf; font-size: 15px; font-style: normal; text-align: center; }
.operations-metrics { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.operations-metrics .metric-card { min-height: 116px; }
.operations-metrics .metric-card strong em { color: var(--slate-300); font-style: normal; }
.operations-grid { grid-template-columns: minmax(0, 2.25fr) minmax(310px, .75fr); align-items: start; }
.execution-panel { overflow: hidden; }
.execution-table { min-width: 1120px; }
.execution-table td { padding-top: 13px; padding-bottom: 13px; }
.execution-table .status-pill { text-decoration: none; }
.permission-mini { display: inline-flex; padding: 4px 7px; color: var(--slate-500); background: var(--slate-100); border-radius: 6px; font-size: 8px; }
.muted { color: var(--slate-400); font-size: 9px; }
.risk-text { color: #a24848; }
.operations-queue { display: grid; gap: 18px; }
.queue-panel { overflow: hidden; }
.queue-list { padding: 5px 14px 12px; }
.queue-list.compact { padding-top: 0; }
.queue-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 55px; padding: 8px 2px; border-bottom: 1px solid var(--slate-100); }
.queue-row:last-child { border-bottom: 0; }
.queue-row:hover strong { color: var(--cyan-600); }
.queue-row strong { display: block; overflow: hidden; color: var(--slate-900); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.queue-row small { display: block; overflow: hidden; margin-top: 4px; color: var(--slate-500); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.queue-row b { color: var(--slate-500); font-size: 8px; font-weight: 700; white-space: nowrap; }
.queue-dot { width: 7px; height: 7px; border-radius: 50%; }
.queue-dot.danger { background: var(--red-500); box-shadow: 0 0 0 4px #fff0f0; }
.queue-dot.warning { background: var(--amber-500); box-shadow: 0 0 0 4px #fff5e6; }
.queue-subhead { display: flex; align-items: center; justify-content: space-between; min-height: 37px; margin: 0 14px; padding-top: 5px; border-top: 1px solid var(--slate-200); color: var(--slate-700); font-size: 9px; font-weight: 750; }
.queue-subhead a { color: var(--cyan-600); }
.queue-empty, .queue-locked { margin: 10px 14px 14px; padding: 16px; color: var(--slate-500); background: #f8fafb; border: 1px dashed var(--slate-200); border-radius: 9px; font-size: 8px; line-height: 1.65; text-align: center; }
.dashboard-footnote { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1px; margin-top: 18px; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 11px; }
.dashboard-footnote > div { padding: 13px 16px; background: white; }
.dashboard-footnote strong { display: block; margin-bottom: 4px; color: var(--slate-700); font-size: 8px; }
.dashboard-footnote span { color: var(--slate-500); font-size: 8px; line-height: 1.6; }
.status-shortage, .status-variance { color: #9b3c3c; background: #feecec; }
.status-ready, .status-issued, .status-settled { color: #11734b; background: #e6f7ef; }
.status-not_planned { color: #536678; background: #edf2f5; }
.status-ordered, .status-partial, .status-requested { color: #1762a8; background: #e8f3ff; }

.bom-overview-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(390px, .95fr); }
.bom-overview-primary { min-width: 0; border-right: 1px solid var(--slate-200); }
.bom-overview-primary .bom-summary-main { padding-bottom: 10px; }
.bom-overview-primary .bom-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 24px 21px; }
.bom-overview-primary .bom-summary-grid > div { min-height: 58px; background: transparent; border: 0; }
.bom-overview-primary .bom-summary-grid > div:nth-child(6) { grid-column: 1 / span 2; }
.bom-material-summary { padding: 22px 24px 18px; }
.bom-material-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bom-material-summary-head h3 { margin: 5px 0 0; color: var(--navy-950); font-size: 14px; }
.bom-material-summary-head > span { padding: 5px 8px; color: var(--cyan-700); background: var(--cyan-050); border-radius: 7px; font-size: 8px; font-weight: 800; }
.bom-material-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 25px; }
.bom-material-metrics > div { min-width: 0; padding: 2px 12px; border-right: 1px solid var(--slate-200); }
.bom-material-metrics > div:first-child { padding-left: 0; }
.bom-material-metrics > div:last-child { padding-right: 0; border-right: 0; }
.bom-material-metrics small { display: block; overflow: hidden; color: var(--slate-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.bom-material-metrics strong { display: block; margin-top: 8px; color: var(--navy-950); font-size: 22px; line-height: 1; }
.bom-material-metrics em { display: block; overflow: hidden; margin-top: 7px; color: var(--slate-400); font-size: 6px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.bom-summary-note { margin: 23px 0 0; padding-top: 13px; color: var(--slate-500); border-top: 1px solid var(--slate-100); font-size: 8px; line-height: 1.6; }
.bom-package-panel { margin-top: 18px; }
.package-readiness { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.package-document-table { box-shadow: inset 0 2px 0 rgba(22,198,202,.13); }
.package-document-table th { padding-top: 14px; padding-bottom: 14px; color: var(--slate-700); }
.package-document-table td { padding-top: 15px; padding-bottom: 15px; }

.permission-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.account-list-panel { position: sticky; top: 18px; overflow: hidden; }
.account-list { max-height: calc(100vh - 250px); overflow-y: auto; padding: 8px; }
.account-row { display: grid; grid-template-columns: 36px 1fr 12px; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border-radius: 9px; }
.account-row:hover, .account-row.active { background: var(--cyan-050); }
.account-row.active { box-shadow: inset 3px 0 0 var(--cyan-500); }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; color: var(--navy-950); background: #d8f5f6; border-radius: 9px; font-weight: 850; }
.account-row strong { display: block; color: var(--slate-900); font-size: 10px; }
.account-row small { display: block; margin-top: 3px; overflow: hidden; color: var(--slate-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.account-row em { color: var(--slate-400); font-style: normal; }
.permission-editor { overflow: hidden; }
.permission-editor-head { display: grid; grid-template-columns: 1fr minmax(330px, .7fr); gap: 24px; align-items: end; padding: 20px; border-bottom: 1px solid var(--slate-100); }
.permission-editor-head h3 { margin: 4px 0 3px; color: var(--navy-950); font-size: 20px; }
.permission-editor-head > div > span { color: var(--slate-500); font-size: 9px; }
.permission-editor-head label { display: grid; gap: 5px; color: var(--slate-700); font-size: 9px; font-weight: 700; }
.permission-editor-head label small { color: var(--slate-500); font-size: 8px; font-weight: 400; line-height: 1.5; }
.permission-sections { display: grid; gap: 14px; padding: 18px; background: var(--slate-050); }
.permission-section { overflow: hidden; background: white; border: 1px solid var(--slate-200); border-radius: 11px; }
.permission-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 15px; background: #fbfcfd; border-bottom: 1px solid var(--slate-100); }
.permission-section-head h4 { margin: 0; color: var(--navy-950); font-size: 12px; }
.permission-section-head span { color: var(--slate-500); font-size: 8px; }
.permission-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 92px; align-items: center; min-height: 60px; padding: 9px 15px; border-bottom: 1px solid var(--slate-100); }
.permission-row:last-child { border-bottom: 0; }
.permission-row strong { display: block; color: var(--slate-900); font-size: 10px; }
.permission-row small { display: block; margin-top: 4px; color: var(--slate-500); font-size: 8px; }
.permission-check { display: flex; align-items: center; gap: 7px; color: var(--slate-700); font-size: 9px; font-weight: 700; cursor: pointer; }
.permission-check input { width: 17px; height: 17px; accent-color: var(--cyan-600); }
.permission-check.manage { color: #1762a8; }
.permission-na { color: var(--slate-300); font-size: 11px; }
.permission-save-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; background: rgba(255,255,255,.96); border-top: 1px solid var(--slate-200); box-shadow: 0 -8px 22px rgba(12,37,59,.05); }
.permission-save-bar span { color: var(--slate-500); font-size: 9px; }
.scope-section { margin: 18px 18px 0; }
.scope-section .permission-section-head { min-height: 62px; gap: 18px; }
.scope-section .permission-section-head p { margin: 4px 0 0; color: var(--slate-500); font-size: 8px; font-weight: 400; line-height: 1.5; }
.scope-global-note { margin: 12px 15px 0; padding: 10px 12px; color: #1762a8; background: #edf7ff; border: 1px solid #cce8fb; border-radius: 8px; font-size: 8px; line-height: 1.6; }
.scope-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 12px 15px; color: var(--slate-600); border-bottom: 1px solid var(--slate-100); font-size: 9px; }
.scope-table th, .scope-table td { padding: 10px 12px; }
.scope-table th:nth-child(n+3), .scope-table td:nth-child(n+3) { text-align: center; }
.scope-check { display: inline-flex; align-items: center; gap: 5px; color: var(--slate-600); font-size: 8px; cursor: pointer; }
.scope-check input { width: 16px; height: 16px; accent-color: var(--cyan-600); }
.scope-help { margin: 0; padding: 10px 15px 13px; color: var(--slate-500); background: var(--slate-050); border-top: 1px solid var(--slate-100); font-size: 8px; line-height: 1.6; }

.access-denied-card { display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 430px; padding: 55px; }
.access-denied-icon { display: grid; place-items: center; flex: 0 0 auto; width: 86px; height: 86px; color: #b56969; background: #fff0f0; border-radius: 24px; font-size: 40px; }
.access-denied-card h2 { margin: 8px 0; color: var(--navy-950); font-size: 25px; }
.access-denied-card p:not(.section-kicker) { max-width: 650px; margin: 0; color: var(--slate-500); font-size: 11px; line-height: 1.8; }
.denied-actions { display: flex; gap: 9px; margin-top: 20px; }

@media (max-width: 1450px) {
  .home-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-readiness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bom-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bom-summary-grid > div:nth-child(2n) { border-right: 0; }
  .permission-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .bom-overview-layout { grid-template-columns: 1fr; }
  .bom-overview-primary { border-right: 0; border-bottom: 1px solid var(--slate-200); }
  .operations-grid { grid-template-columns: 1fr; }
  .operations-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-definition-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-definition-bar .text-link { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .operation-flow { grid-template-columns: repeat(5, minmax(130px, 1fr)); overflow-x: auto; }
  .operation-flow > i { display: none; }
  .operations-metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .operations-queue, .dashboard-footnote { grid-template-columns: 1fr; }
  .bom-overview-primary .bom-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bom-overview-primary .bom-summary-grid > div:nth-child(6) { grid-column: auto; }
  .package-readiness, .production-definition-bar { grid-template-columns: 1fr; }
  .production-definition-bar .text-link { grid-column: auto; }
}

/* RC4.2: plain-language product production package */
.production-pack-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 18px; padding: 24px 28px; overflow: hidden; color: white; background: linear-gradient(118deg, #08283f 0%, #0b3c59 72%, #0d596d 100%); border: 1px solid #184d66; border-radius: 14px; box-shadow: var(--shadow-sm); }
.production-pack-identity { min-width: 0; }
.production-pack-identity .section-kicker { color: #66e2e4; }
.production-pack-identity .title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 7px; }
.production-pack-identity h2 { margin: 0; color: white; font-size: 25px; letter-spacing: -.025em; }
.production-pack-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.production-pack-code span { padding: 5px 9px; color: #bad3df; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 7px; font-size: 9px; }
.production-pack-purpose { max-width: 920px; margin: 14px 0 0; color: #d6e5ec; font-size: 10px; line-height: 1.75; }
.production-pack-actions { flex: 0 0 auto; }
.production-pack-actions form { margin: 0; }
.production-pack-overview { margin-bottom: 18px; overflow: hidden; }
.production-pack-components { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 20px; overflow: hidden; background: var(--slate-200); border: 1px solid var(--slate-200); border-radius: 11px; }
.production-component-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 102px; padding: 16px; color: inherit; background: white; transition: .18s ease; }
a.production-component-card:hover { position: relative; z-index: 1; background: #f9ffff; box-shadow: inset 0 0 0 1px #8bdcdf; }
.production-component-card > span:last-child { min-width: 0; }
.production-component-card small, .production-component-card strong, .production-component-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-component-card small { margin-bottom: 6px; color: var(--slate-500); font-size: 8px; }
.production-component-card strong { color: var(--navy-950); font-size: 12px; }
.production-component-card em { margin-top: 7px; color: var(--slate-500); font-size: 8px; font-style: normal; }
.component-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #176a91; background: #eaf7ff; border-radius: 11px; font-size: 13px; font-weight: 900; }
.component-icon.route { color: #16777b; background: #e6f9f8; }
.component-icon.traveler { color: #a56c15; background: #fff4df; }
.component-icon.document { color: #704ab0; background: #f2ecff; }
.production-pack-flow { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr; align-items: center; margin: 15px 20px 20px; padding: 11px 15px; color: var(--slate-600); background: #f8fbfc; border: 1px solid var(--slate-200); border-radius: 9px; font-size: 8px; text-align: center; }
.production-pack-flow span { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; }
.production-pack-flow b { display: grid; place-items: center; flex: 0 0 auto; width: 21px; height: 21px; color: var(--cyan-700); background: var(--cyan-050); border-radius: 50%; font-size: 8px; }
.production-pack-flow i { color: var(--slate-300); font-size: 12px; font-style: normal; }
.production-pack-layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(310px, .85fr); gap: 18px; align-items: start; }
.production-documents-panel { min-width: 0; overflow: hidden; }
.production-documents-head { align-items: center; }
.production-doc-summary { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.document-group-chip { padding: 6px 8px; color: var(--slate-600); background: #f3f6f8; border: 1px solid var(--slate-200); border-radius: 7px; font-size: 8px; white-space: nowrap; }
.document-group-chip b { margin-left: 4px; color: var(--navy-950); }
.production-document-table { margin: 0; border-top: 1px solid var(--slate-100); }
.production-document-table table { min-width: 820px; }
.production-document-table th, .production-document-table td { padding-top: 14px; padding-bottom: 14px; }
.document-type-label { display: inline-flex; padding: 5px 8px; color: #176a91; background: #eaf7ff; border-radius: 7px; font-size: 8px; font-weight: 750; }
.production-pack-side { display: grid; gap: 18px; }
.version-management-card, .add-production-document-card { overflow: hidden; }
.production-pack-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 5px 18px 16px; }
.production-pack-meta > div { min-width: 0; padding: 12px; border-bottom: 1px solid var(--slate-100); }
.production-pack-meta dt { margin-bottom: 6px; color: var(--slate-500); font-size: 8px; }
.production-pack-meta dd { margin: 0; overflow: hidden; color: var(--slate-900); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.version-rule-note { margin: 0 18px 18px; padding: 12px; color: #536b78; background: #f2f8fa; border-left: 3px solid var(--cyan-500); border-radius: 0 8px 8px 0; font-size: 8px; line-height: 1.75; }
.advanced-tech-details { overflow: hidden; }
.advanced-tech-details summary { padding: 15px 18px; color: var(--slate-600); background: #fbfcfd; cursor: pointer; font-size: 9px; font-weight: 750; list-style-position: inside; }
.advanced-tech-details[open] summary { border-bottom: 1px solid var(--slate-100); }
.advanced-tech-details dl { margin: 0; padding: 8px 18px; }
.advanced-tech-details dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--slate-100); }
.advanced-tech-details dt { color: var(--slate-500); font-size: 8px; }
.advanced-tech-details dd { margin: 0; overflow-wrap: anywhere; color: var(--slate-800); font-size: 8px; }
.advanced-tech-details p { margin: 2px 18px 16px; color: var(--slate-500); font-size: 8px; line-height: 1.7; }
.bulk-maintenance-panel { margin-top: 18px; overflow: hidden; }
.bulk-maintenance-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; cursor: pointer; background: #f5fbfc; border-bottom: 1px solid transparent; }
.bulk-maintenance-panel[open] > summary { border-bottom-color: var(--slate-200); }
.bulk-maintenance-panel > summary span { color: var(--slate-500); font-size: var(--text-xs); }
.bulk-maintenance-panel .stack-form { padding: 20px; }

@media (max-width: 1450px) {
  .production-pack-components { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-pack-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); }
}

@media (max-width: 1100px) {
  .production-pack-hero { align-items: flex-start; flex-direction: column; }
  .production-pack-components, .production-pack-layout { grid-template-columns: 1fr; }
  .production-pack-flow { grid-template-columns: 1fr; gap: 6px; }
  .production-pack-flow i { transform: rotate(90deg); }
}

/* RC4 readability: one scalable type system and production-detail alignment */
body { font-size: var(--text-sm); line-height: var(--line-readable); }
.nav-item { font-size: var(--text-base); }
.nav-group summary { font-size: var(--text-sm); }
.nav-subitem, .role-chip, .button { font-size: var(--text-xs); }
.topbar h1 { font-size: var(--text-xl); }
.page-heading h2 { font-size: var(--text-2xl); }
.panel-head h3 { font-size: var(--text-lg); }
.eyebrow, .section-kicker, th, .subline, .status-pill, .risk-badge, .data-chip, .severity-label { font-size: var(--text-2xs); }
table, td strong, .detail-list dd { font-size: var(--text-xs); }
.detail-list dt, .stack-form label, .form-grid label, .filter-bar label { font-size: var(--text-2xs); }

/* RC5 readability gate: every previously hard-coded micro label follows the
   user's small/standard/large setting and never drops below the 12px baseline. */
.brand span, .nav-item small, .nav-subitem small, .sidebar-foot p,
.role-chip small, .readonly-banner, .metric-card small, .metric-label,
.feed-item strong, .feed-item small, .empty-state, .evidence-strip p,
.evidence-strip strong, .showcase-story, .showcase-fact,
.showcase-status-list dt, .showcase-status-list dd,
.showcase-finance-body small, .showcase-finance-body strong,
.line-chip, .form-errors, .line-form-title strong, .line-form-title span,
.business-card span, .source-card dt, .source-card dd, .sync-error,
.breadcrumb, .order-hero p, .exception-hero p, .progress-ring span,
.work-order-tabs a, .check-list li > span, .check-list p, .check-list strong,
.step-marker, .step-card strong, .step-card dt, .step-card dd,
.exception-row strong, .exception-row small, .permission-note,
.summary-tabs span, .resolution small, .audit-timeline strong,
.audit-timeline p, .audit-timeline small, .login-brand > div p,
.login-brand > div span, .login-brand li, .login-foot,
.inline-form .button.small, .button.small, .form-strip label,
.stage4-hero p, .stage4-hero span, .stage4-queue strong,
.stage4-queue span, .stage4-queue em, .boundary-pill,
.boundary-callout, .boundary-note, .bom-summary-grid dt,
.bom-summary-grid dd, .info-banner, .readiness-card small,
.readiness-card em, .production-definition-bar small,
.production-definition-bar strong, .inline-action, .verified-label,
.readonly-label, .package-foot, .package-empty p,
.home-status-strip small, .home-module-card strong,
.home-module-card p, .home-module-card em, .operation-flow > div span,
.operation-flow > div strong, .permission-mini, .muted,
.queue-row strong, .queue-row b, .queue-subhead, .queue-empty,
.queue-locked, .dashboard-footnote strong, .dashboard-footnote span,
.bom-material-summary-head > span, .bom-material-metrics small,
.bom-summary-note, .account-row strong, .account-row small,
.permission-editor-head > div > span, .permission-editor-head label,
.permission-editor-head label small, .permission-section-head span,
.permission-row strong, .permission-row small, .permission-check,
.permission-na, .permission-save-bar span,
.scope-section .permission-section-head p, .scope-global-note,
.scope-summary, .scope-check, .scope-help, .production-pack-code span,
.production-pack-purpose, .production-component-card small,
.production-component-card em, .production-pack-flow,
.production-pack-flow b, .document-group-chip, .document-type-label,
.production-pack-meta dt, .production-pack-meta dd,
.version-rule-note, .advanced-tech-details summary,
.advanced-tech-details dt, .advanced-tech-details dd,
.advanced-tech-details p { font-size: var(--text-2xs) !important; }

.compact-metrics > article {
  min-width: 0;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}
.compact-metrics > article > span { display: block; color: var(--slate-500); font-size: var(--text-xs); font-weight: 700; }
.compact-metrics > article > strong { display: block; margin: 10px 0 7px; color: var(--navy-950); font-size: var(--text-xl); line-height: 1.15; }
.compact-metrics > article > small { display: block; color: var(--slate-500); font-size: var(--text-2xs); line-height: 1.45; }

.closure-summary { align-items: stretch; gap: 12px; padding: 18px 20px 20px; }
.closure-summary .closure-metric {
  display: grid;
  grid-template-rows: auto minmax(34px, auto) auto;
  align-content: center;
  min-height: 122px;
  border-top: 3px solid var(--cyan-500);
}
.closure-summary .closure-metric > span,
.closure-summary .closure-metric > strong,
.closure-summary .closure-metric > small { align-self: center; }
.closure-summary .closure-metric > strong { display: flex; align-items: center; min-height: 34px; margin: 7px 0; }
.closure-summary .closure-status { font-size: var(--text-lg); line-height: 1.25; }

.process-timeline { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.step-marker { width: 34px; height: 34px; font-size: var(--text-xs); }
.process-step::before { top: 27px; }
.step-card { min-height: 196px; padding: 25px 16px 16px; }
.step-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; }
.step-card strong { min-width: 0; overflow-wrap: anywhere; font-size: var(--text-md); line-height: 1.35; }
.step-card .status-pill.compact { flex: 0 0 auto; min-height: 24px; font-size: var(--text-2xs); }
.step-progress { gap: 10px; margin: 15px 0; }
.step-progress .progress-track { height: 8px; }
.progress-cell b, .step-progress b { min-width: 42px; font-size: var(--text-xs); text-align: right; }
.step-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step-card dl > div { padding: 9px 10px; background: var(--white); border-radius: 8px; }
.step-card .step-last-report { grid-column: 1 / -1; }
.step-card dt { font-size: var(--text-2xs); line-height: 1.35; }
.step-card dd { margin-top: 5px; overflow: hidden; font-size: var(--text-sm); line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1350px) {
  .process-timeline { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .topbar-actions { gap: 8px; }
  .role-chip { max-width: 220px; }
}

@media (min-width: 1800px) {
  .content { max-width: 1780px; margin: 0 auto; }
  .process-timeline { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 1280px) {
  .closure-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readonly-banner { gap: 10px; }
  .banner-note { max-width: 420px; text-align: right; }
}

/* RC5 MES and cost-management candidate */
.mes-hero .hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.mes-metrics, .cost-metrics { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.cost-dashboard-metrics { grid-template-columns: repeat(4, minmax(190px, 1fr)); }
.cost-dashboard-heading { align-items: stretch; }
.cost-freshness { min-width: 260px; padding: 16px 18px; background: #eefbfd; border: 1px solid #b9edf0; border-radius: 12px; }
.cost-freshness span, .cost-freshness strong, .cost-freshness a { display: block; }
.cost-freshness span { color: var(--slate-500); font-size: var(--text-xs); }
.cost-freshness strong { margin: 6px 0 12px; color: var(--navy-950); font-size: var(--text-md); }
.cost-freshness a { color: var(--cyan-700); font-weight: 750; text-decoration: none; }
.cost-filter { grid-template-columns: minmax(240px, 1.4fr) minmax(240px, 1.4fr) 160px 160px auto; }
.cost-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.cost-chart-card { min-width: 0; }
.cost-chart { min-height: 300px; padding: 8px 12px 0; }
.cost-chart svg { display: block; width: 100%; height: auto; min-height: 280px; overflow: visible; }
.chart-grid-line { stroke: #dfe9f0; stroke-width: 1; stroke-dasharray: 4 5; }
.chart-axis-text { fill: #667c8d; font-size: var(--text-2xs); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
.chart-caption { margin: 0; padding: 0 22px 18px; color: var(--slate-500); font-size: var(--text-xs); }
.danger-text { color: #d64b4b !important; }
.data-boundary-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 18px; border: 1px solid #f0c36a; border-radius: 14px; background: #fff8e8; color: #6a4a08; }
.data-boundary-banner strong { flex: 0 0 auto; font-size: var(--text-md); }
.data-boundary-banner span { font-size: var(--text-sm); line-height: 1.7; }

@media (max-width: 1280px) {
  .mes-metrics, .cost-metrics, .cost-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-chart-grid { grid-template-columns: 1fr; }
  .cost-filter { grid-template-columns: 1fr 1fr; }
}

/* Account and system settings */
.topbar { position: relative; z-index: 30; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary b { margin-left: 4px; color: var(--slate-400); font-size: var(--text-xs); }
.account-menu[open] > summary { border-color: #9ee2e5; box-shadow: 0 0 0 3px rgba(22, 198, 202, .1); }
.account-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 100; display: grid; width: 286px; padding: 8px; background: white; border: 1px solid var(--slate-200); border-radius: 13px; box-shadow: 0 18px 45px rgba(5, 31, 51, .18); }
.account-menu-identity { display: grid; gap: 3px; margin: 0 4px 6px; padding: 10px 10px 12px; border-bottom: 1px solid var(--slate-100); }
.account-menu-identity strong { color: var(--navy-950); font-size: var(--text-sm); }
.account-menu-identity span { color: var(--slate-500); font-size: var(--text-2xs); }
.account-menu-panel > a { display: grid; gap: 3px; padding: 10px; color: var(--slate-800); border-radius: 8px; text-decoration: none; }
.account-menu-panel > a:hover { background: var(--cyan-050); }
.account-menu-panel > a span { font-size: var(--text-sm); font-weight: 750; }
.account-menu-panel > a small { color: var(--slate-500); font-size: var(--text-2xs); }
.account-menu-panel form { margin-top: 5px; padding-top: 7px; border-top: 1px solid var(--slate-100); }
.account-menu-panel form button { width: 100%; min-height: 38px; color: #9b3f3f; background: #fff3f3; border: 1px solid #f1cdcd; border-radius: 8px; font-weight: 750; cursor: pointer; }
.account-menu-panel form button:hover { background: #ffe8e8; }

.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.settings-card { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 13px; min-height: 150px; padding: 19px; color: inherit; background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; transition: .16s ease; }
.settings-card:hover { border-color: #9fdee1; box-shadow: 0 10px 28px rgba(11, 55, 78, .1); transform: translateY(-2px); }
.settings-card.restricted { background: #fafbfc; }
.settings-icon { display: grid; place-items: center; width: 46px; height: 46px; color: var(--navy-900); background: var(--cyan-050); border-radius: 12px; font-size: var(--text-md); font-weight: 850; }
.settings-card small { color: var(--cyan-700); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .08em; }
.settings-card h3 { margin: 5px 0 7px; color: var(--navy-950); font-size: var(--text-lg); }
.settings-card p { margin: 0 0 24px; color: var(--slate-500); font-size: var(--text-xs); line-height: 1.65; }
.settings-card > b { position: absolute; right: 18px; bottom: 16px; color: var(--cyan-700); font-size: var(--text-xs); }
.settings-card.restricted > b { color: var(--slate-400); }
.settings-status-panel { overflow: hidden; }
.settings-status-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.settings-status-grid dl { margin: 0; padding: 18px 20px; border-top: 1px solid var(--slate-100); border-right: 1px solid var(--slate-100); }
.settings-status-grid dl:last-child { border-right: 0; }
.settings-status-grid dt { color: var(--slate-500); font-size: var(--text-2xs); }
.settings-status-grid dd { margin: 7px 0 0; color: var(--slate-900); font-size: var(--text-sm); font-weight: 750; }
.organization-summary-grid { margin-bottom: 18px; }
.organization-summary-grid .organization-warning { background: #fff7e8; border-color: #f3c977; }
.organization-gate-note { margin-top: 18px; }
.status-warning { color: #8b5d00; background: #fff1cf; }

.settings-two-column { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr); gap: 18px; align-items: start; }
.settings-form-panel { overflow: hidden; }
.settings-form { max-width: 820px; padding: 20px 22px 24px; }
.settings-form > label > small:not(.field-error) { color: var(--slate-500); font-size: var(--text-2xs); line-height: 1.55; }
.field-error { color: #a83d3d !important; font-size: var(--text-2xs); }
.preference-fieldset { margin: 0; padding: 0; border: 0; }
.preference-fieldset legend { margin-bottom: 9px; color: var(--slate-700); font-size: var(--text-2xs); font-weight: 750; }
.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-card { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 10px !important; min-height: 64px; padding: 10px 12px; background: #fafcfd; border: 1px solid var(--slate-200); border-radius: 10px; cursor: pointer; }
.choice-card:has(input:checked) { background: var(--cyan-050); border-color: #8edee1; box-shadow: inset 0 0 0 1px #8edee1; }
.choice-card input { width: 17px; height: 17px; margin: 0; accent-color: var(--cyan-600); }
.choice-card span { display: grid; gap: 3px; }
.choice-card b { color: var(--slate-900); font-size: var(--text-sm); }
.choice-card small { color: var(--slate-500); font-size: var(--text-2xs); }
.settings-side-stack { display: grid; gap: 16px; }
.account-summary-card { padding: 24px; text-align: center; }
.account-summary-avatar { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; color: var(--navy-950); background: linear-gradient(135deg, #caf6f7, var(--cyan-500)); border-radius: 18px; font-size: var(--text-xl); font-weight: 850; }
.account-summary-card h3 { margin: 0; color: var(--navy-950); font-size: var(--text-lg); }

.ui-preview-banner { display: flex; align-items: center; gap: 14px; padding: 10px 28px; color: #594313; background: #fff6d9; border-bottom: 1px solid #f0d887; font-size: var(--text-sm); }
.ui-preview-banner strong { color: #7d5700; }
.ui-preview-banner a { margin-left: auto; color: #0d7377; font-weight: 800; }
.operations-grid-single { grid-template-columns: minmax(0, 1fr); }
.operations-grid-single .span-2 { grid-column: auto; }
.designer-heading { align-items: flex-start; }
.designer-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.designer-status-grid article { min-height: 124px; padding: 20px; background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; box-shadow: 0 8px 24px rgba(15, 44, 68, .05); }
.designer-status-grid small, .designer-status-grid span { display: block; color: var(--slate-500); font-size: var(--text-xs); }
.designer-status-grid strong { display: block; margin: 8px 0; color: var(--navy-950); font-size: var(--text-xl); }
.page-designer-form { display: grid; gap: 18px; }
.designer-section { overflow: visible; }
.designer-root-list, .designer-group-list { display: grid; gap: 10px; padding: 16px 20px 20px; }
.designer-row { display: grid; grid-template-columns: 110px minmax(260px, 1fr) 120px 190px; align-items: end; gap: 14px; padding: 14px; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 12px; }
.designer-row label > span, .designer-copy-grid label > span { display: block; margin-bottom: 6px; color: var(--slate-600); font-size: var(--text-xs); font-weight: 750; }
.designer-row input[type="text"], .designer-row input:not([type]), .designer-row input[type="number"], .designer-copy-grid input, .designer-copy-grid textarea, .designer-metric-table input, .designer-metric-table select { width: 100%; }
.designer-visible { align-self: center; display: flex; align-items: center; gap: 9px; min-height: 42px; }
.designer-visible > span { margin: 0 !important; }
.designer-visible input, .designer-toggle-grid input { width: 20px; height: 20px; accent-color: var(--cyan-500); }
.designer-type { align-self: center; color: var(--slate-500); font-size: var(--text-xs); word-break: break-all; }
.designer-group { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 14px; background: #fff; }
.designer-group > summary { display: grid; grid-template-columns: 30px minmax(180px, 1fr) auto auto; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; background: #f4f8fa; list-style: none; }
.designer-group > summary::-webkit-details-marker { display: none; }
.designer-group > summary strong { color: var(--navy-950); font-size: var(--text-md); }
.designer-group > summary small, .designer-group > summary b { color: var(--slate-500); font-size: var(--text-xs); }
.designer-group-body { display: grid; gap: 8px; padding: 12px; }
.designer-group-row { background: #eefbfb; }
.designer-child-row { margin-left: 30px; }
.designer-copy-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; padding: 18px 20px 10px; }
.designer-copy-grid .span-2 { grid-column: 1 / -1; }
.designer-toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 20px 18px; }
.designer-toggle-grid label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--slate-200); border-radius: 12px; background: var(--slate-050); }
.designer-toggle-grid strong, .designer-toggle-grid small { display: block; }
.designer-toggle-grid strong { color: var(--navy-950); font-size: var(--text-sm); }
.designer-toggle-grid small { margin-top: 4px; color: var(--slate-500); font-size: var(--text-xs); }
.designer-metric-table { margin: 0 20px 20px; border: 1px solid var(--slate-200); border-radius: 12px; }
.designer-metric-table td:first-child, .designer-metric-table th:first-child { width: 72px; text-align: center; }
.designer-metric-table td:nth-child(2) { min-width: 180px; }
.designer-order-input { max-width: 90px; }
.designer-action-bar { position: sticky; z-index: 8; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: #d6e7ef; background: rgba(7, 40, 63, .96); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; box-shadow: 0 14px 36px rgba(4, 29, 46, .24); backdrop-filter: blur(12px); }
.designer-action-bar div { flex: 1; }
.designer-action-bar strong { color: #fff; }
.designer-version-panel { margin-top: 18px; }
.designer-version-list { display: grid; gap: 8px; padding: 0 20px 20px; }
.designer-version-list > div { display: grid; grid-template-columns: 80px 160px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.designer-version-list form { margin: 0; }
.designer-page-list { display: grid; gap: 10px; padding: 16px 20px 22px; }
.designer-page { overflow: hidden; background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; }
.designer-page > summary { display: grid; grid-template-columns: 46px minmax(220px, 1fr) auto 110px; align-items: center; gap: 14px; min-height: 74px; padding: 12px 16px; cursor: pointer; background: linear-gradient(90deg, #f7fbfc, #fff); list-style: none; }
.designer-page > summary::-webkit-details-marker { display: none; }
.designer-page > summary > span:nth-child(2) { display: grid; gap: 4px; }
.designer-page > summary strong { color: var(--navy-950); font-size: var(--text-sm); }
.designer-page > summary small, .designer-page > summary b { color: var(--slate-500); font-size: var(--text-xs); }
.designer-page-index { display: grid; place-items: center; width: 38px; height: 38px; color: var(--cyan-800); background: var(--cyan-050); border-radius: 10px; font-weight: 850; }
.designer-capability { padding: 6px 10px; color: var(--cyan-800); background: #ecfbfb; border: 1px solid #c6eeee; border-radius: 999px; font-size: var(--text-xs); font-weight: 750; }
.designer-page-body { display: grid; gap: 16px; padding: 18px; border-top: 1px solid var(--slate-200); }
.designer-page-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; background: var(--slate-050); border: 1px solid var(--slate-200); border-radius: 12px; }
.designer-page-copy label > span, .designer-import-panel label > span { display: block; margin-bottom: 6px; color: var(--slate-600); font-size: var(--text-xs); font-weight: 750; }
.designer-page-copy input, .designer-page-copy textarea, .designer-page-copy select { width: 100%; }
.designer-page-copy .span-2 { grid-column: 1 / -1; }
.designer-preview-link { align-self: end; justify-self: start; }
.designer-component-block { display: grid; gap: 8px; }
.designer-component-block h4 { margin: 0; color: var(--navy-950); font-size: var(--text-sm); }
.designer-component-table { border: 1px solid var(--slate-200); border-radius: 12px; }
.designer-component-table td:first-child, .designer-component-table th:first-child { width: 72px; text-align: center; }
.designer-component-table input:not([type="checkbox"]), .designer-component-table select { width: 100%; min-width: 120px; }
.designer-component-table input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--cyan-600); }
.designer-page-safe-note { padding: 13px 15px; color: var(--slate-600); background: #fff8e8; border: 1px solid #f1dfae; border-radius: 10px; font-size: var(--text-xs); line-height: 1.65; }
.designer-import-panel { margin-top: 18px; }
.designer-import-panel form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 12px; padding: 0 20px 20px; }
.designer-import-panel input { width: 100%; }
.topbar-design-link { padding: 7px 11px; color: var(--cyan-800); background: var(--cyan-050); border: 1px solid #bcebed; border-radius: 9px; font-size: var(--text-xs); font-weight: 800; white-space: nowrap; }
.topbar-design-link:hover { color: var(--navy-950); background: #dff8f8; }

.content.ui-page-layout-wide { max-width: none; }
.content.ui-page-layout-focused > * { max-width: 1180px; margin-right: auto; margin-left: auto; }
.content[data-ui-page] { display: flex; flex-direction: column; }
.content[data-ui-page] > * { order: 9999; }
[data-ui-module] { position: relative; }
.ui-module-accent-cyan { --ui-module-accent: var(--cyan-500); }
.ui-module-accent-blue { --ui-module-accent: #2f7ef7; }
.ui-module-accent-red { --ui-module-accent: #e45b62; }
.ui-module-accent-amber { --ui-module-accent: #e5a73d; }
.ui-module-accent-slate { --ui-module-accent: #6f8296; }
.panel[data-ui-module] { border-top: 3px solid var(--ui-module-accent, transparent); }
[data-ui-filter][hidden], [data-ui-module][hidden], [data-ui-column][hidden] { display: none !important; }

@media (max-width: 1280px) {
  .designer-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .designer-row { grid-template-columns: 100px minmax(220px, 1fr) 100px; }
  .designer-type { grid-column: 2 / -1; }
  .designer-toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .designer-page > summary { grid-template-columns: 42px minmax(180px, 1fr) auto; }
  .designer-page > summary > b { display: none; }
}

@media (max-width: 820px) {
  .designer-status-grid, .designer-copy-grid, .designer-toggle-grid { grid-template-columns: 1fr; }
  .designer-copy-grid .span-2 { grid-column: auto; }
  .designer-row { grid-template-columns: 1fr; align-items: stretch; }
  .designer-type { grid-column: auto; }
  .designer-child-row { margin-left: 0; }
  .designer-action-bar { position: static; flex-wrap: wrap; }
  .designer-action-bar div { flex-basis: 100%; }
  .designer-version-list > div { grid-template-columns: 70px 1fr; }
  .designer-page > summary { grid-template-columns: 40px 1fr; }
  .designer-capability { grid-column: 2; justify-self: start; }
  .designer-page-copy { grid-template-columns: 1fr; }
  .designer-page-copy .span-2 { grid-column: auto; }
  .designer-import-panel form { grid-template-columns: 1fr; }
}
.account-summary-card > p { margin: 5px 0 18px; color: var(--cyan-700); font-size: var(--text-xs); font-weight: 750; }
.account-summary-card dl { display: grid; grid-template-columns: 90px 1fr; margin: 0; padding-top: 15px; border-top: 1px solid var(--slate-100); text-align: left; }
.account-summary-card dt, .account-summary-card dd { margin: 0; padding: 7px 0; font-size: var(--text-xs); }
.account-summary-card dt { color: var(--slate-500); }
.account-summary-card dd { color: var(--slate-800); font-weight: 700; }
.security-actions { overflow: hidden; padding-bottom: 18px; }
.security-actions > a, .security-actions > form, .security-actions > p { margin-right: 18px; margin-left: 18px; }
.security-actions > form { margin-top: 9px; }
.security-actions > p { color: var(--slate-500); font-size: var(--text-2xs); line-height: 1.6; }
.password-panel { max-width: 760px; overflow: hidden; }

html[data-page-density="compact"] .content { padding-top: 20px; }
html[data-page-density="compact"] td { padding-top: 9px; padding-bottom: 9px; }
html[data-page-density="compact"] th { padding-top: 9px; padding-bottom: 9px; }
html[data-page-density="compact"] .panel-head { min-height: 62px; padding-top: 12px; padding-bottom: 12px; }
html[data-page-density="compact"] .metric-card { min-height: 108px; padding-top: 14px; padding-bottom: 14px; }

@media (max-width: 1280px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .organization-switcher label { display: none; }
  .organization-switcher select { max-width: 150px; }
}

@media (max-width: 900px) {
  .settings-grid, .settings-two-column { grid-template-columns: 1fr; }
  .settings-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .font-size-control { display: none; }
  .account-menu-panel { position: fixed; top: 74px; right: 12px; }
}

/* Final cascade guard for the V1.0 shell (must remain last). */
body .topbar { position: sticky; top: 14px; z-index: 30; }
body .sidebar { position: sticky; inset: auto; top: 14px; width: auto; padding: 0; }
body .workspace { grid-column: auto; }
body .brand { flex-direction: row; align-items: center; }
body .brand .brand-logo { display: block; width: 184px; height: auto; padding: 0; border: 0; border-radius: 0; }
body .nav-item { font-size: max(var(--text-sm), 14px); }
body .nav-group summary { font-size: max(var(--text-xs), 13px); }
body .nav-subitem { font-size: max(var(--text-2xs), 12px); }
body .readonly-banner { color: #55726e; background: rgba(226, 244, 242, .62); }
body .readonly-banner strong { color: #2e7973; background: transparent; padding: 0; }
body .readonly-banner span:not(.banner-note)::before { color: #42a59c; }
.compact-font-control { height: 32px; padding: 2px; gap: 1px; border-color: rgba(157,179,196,.28); border-radius: 9px; background: rgba(255,255,255,.64); }
.compact-font-control button { min-width: 25px; height: 26px; padding: 0; border-radius: 7px; font-size: 9px; }
.uat-start-panel > p { margin: 0 0 16px; color: var(--slate-500); line-height: 1.75; }
.quick-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-action-card { display: grid; gap: 7px; min-height: 92px; padding: 17px; border: 1px solid rgba(54, 117, 141, .16); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(231,245,247,.66)); color: var(--slate-900); box-shadow: inset 0 1px 0 rgba(255,255,255,.94); }
.quick-action-card:hover { border-color: rgba(26, 143, 142, .38); transform: translateY(-1px); }
.quick-action-card strong { color: var(--navy-800); font-size: 1rem; }
.quick-action-card small { color: var(--slate-500); line-height: 1.55; }

@media (max-width: 1180px) {
  .quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .sidebar { position: static; height: auto; }
  body .topbar { top: 8px; }
}
