:root {
  color-scheme: light;
  --ink: #142D36;
  --muted: #6B7D8C;
  --green: #087F8C;
  --green-dark: #076872;
  --green-light: #E8F4F5;
  --line: #DFE6EA;
  --canvas: #F4F7F8;
  --white: #FEFEFE;
  --amber: #946B2C;
  --amber-bg: #FFF8ED;
  --red: #B23B42;
  --red-bg: #FEF2F3;
  --blue: #3A6FA8;
  --blue-bg: #EFF6FD;
  --radius: 10px;
  --sidebar-width: 218px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #A0D3D8; outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.5px; line-height: 1.3; color: #0F2A34; }
h2 { font-size: 16px; font-weight: 600; color: #1A3642; }
h3 { font-size: 14px; font-weight: 600; }
p + p { margin-top: 8px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.eyebrow { color: #8999A5; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; margin-bottom: 6px; text-transform: uppercase; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: white; padding: 8px 12px; border: 1px solid var(--line); }
.skip-link:focus { top: 12px; }
.app-shell { display: flex; min-height: 100vh; min-width: 0; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width);
  display: flex; flex-direction: column; flex: none; padding: 20px 12px 13px;
  background: white; border-right: 1px solid var(--line);
}
.brand-row { flex: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 0 8px 19px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--green); color: white; font-size: 20px; font-weight: 600; }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 16px; letter-spacing: 0; color: #0F2A34; }
.brand small { display: block; margin-top: 2px; color: #7A8B98; font-size: 10px; letter-spacing: .3px; }
.nav-toggle { display: none; }
#navigation { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.nav-group { min-width: 0; }
.nav-group-title { padding: 1px 11px 6px; font-size: 10px; font-weight: 600; letter-spacing: .5px; color: #8997A4; text-transform: uppercase; }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 7px; min-height: 37px; color: #5A6E7E; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.nav-item:hover { text-decoration: none; background: #F6F9FA; color: var(--ink); }
.nav-item.active { color: var(--green-dark); background: var(--green-light); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 16px 9px 0; color: var(--muted); font-size: 11px; flex: none; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4BA5A8; flex: none; }
.main-shell { min-width: 0; flex: 1; margin-left: var(--sidebar-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 26px; background: white; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #758995; font-size: 12px; white-space: nowrap; }
.breadcrumb span:first-child { margin: 0 9px; color: #BCC8D0; }
.breadcrumb span:last-child { color: #4D616F; font-weight: 500; }
.top-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.top-actions { justify-content: flex-end; }
#clock-label { font-size: 11px; margin-right: 4px; }
#workspace { max-width: 1640px; min-width: 0; margin: 0 auto; padding: 22px 26px 19px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 18px; min-width: 0; }
.page-heading > div { min-width: 0; }
.page-heading .eyebrow { display: none; }
.page-heading .muted { color: #6A7C8A; font-size: 12px; margin-top: 6px; max-width: 760px; }
#page-actions { justify-content: flex-end; flex: none; max-width: 58%; gap: 6px; }

/* Controls share one primary/secondary hierarchy. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 12px; color: #40596f; background: white; border: 1px solid #d9e2eb; border-radius: 7px; font-size: 12px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.button:hover { background: #f4f8fb; border-color: #c2d2de; text-decoration: none; }
.button.primary { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 1px 2px #0b60701a; }
.button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button.ghost { background: transparent; border-color: transparent; color: var(--green); }
.button.ghost:hover { background: var(--green-light); }
.button.danger { color: var(--red); border-color: #f0d3d7; }
.small-button { min-height: 31px; padding: 5px 10px; font-size: 11px; }
.top-download { color: #64778b; background: #f8fafc; border-color: #e5ebf1; }
.button-icon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); font-size: inherit; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; color: #64748b; font-size: 23px; line-height: 1; }

/* Working surfaces and concise KPIs. */
.grid { display: grid; gap: 16px; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.metric { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px 15px; }
.metric-label { display: flex; justify-content: space-between; gap: 8px; color: #61758c; font-size: 12px; }
.metric-value { font-size: 29px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; margin: 11px 0 8px; font-variant-numeric: tabular-nums; color: #203e59; }
.metric-value.small-value { font-size: 20px; }
.metric-note { color: #8190a3; font-size: 11px; line-height: 1.55; }
.metric.accent { border-color: #c3e2e5; box-shadow: inset 0 3px var(--green); }
.metric.accent .metric-value { color: var(--green-dark); }
.empty-metrics { margin-bottom: 9px; }
.empty-metrics .metric { padding-block: 13px 12px; }
.empty-metrics .metric-value { font-size: 24px; color: #8ca0b3; margin-block: 7px; }
.empty-metrics .metric-note { display: none; }
.metrics-empty-note { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #7a8b9f; margin-bottom: 18px; }
.metrics-empty-note::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #8aa8ba; flex: none; }
.two-columns { grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); align-items: start; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px #1b365006; }
.card + .card, .section-gap { margin-top: 17px; }
.grid > .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 19px; }
.card-head > div { min-width: 0; }
.card-head p { color: #8090a2; font-size: 11px; margin-top: 4px; line-height: 1.65; }
.card-body { padding: 0 19px 18px; }
.card-body.padded { padding-top: 18px; }
.card-foot { padding: 11px 19px; background: #fafcfe; border-top: 1px solid #edf1f5; color: #77889a; font-size: 11px; }
.card-head .count { margin-left: 6px; }
.count { font-size: 10px; font-weight: 550; color: #60788e; background: #f0f5f9; border: 1px solid #e6edf3; border-radius: 5px; padding: 2px 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 500; line-height: 1.5; color: #677b91; background: #eef3f7; white-space: nowrap; }
.badge.green { color: #14775f; background: #e9f6ef; }
.badge.amber { color: var(--amber); background: var(--amber-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge.blue { color: var(--blue); background: var(--blue-bg); }
.notice { padding: 12px 15px; margin-bottom: 17px; border: 1px solid #d8e9ee; border-radius: 8px; background: #f0f8fa; color: #52707e; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.notice.danger { background: var(--red-bg); border-color: #f1d6da; color: var(--red); }
.notice.warning { background: var(--amber-bg); border-color: #eedfba; color: var(--amber); }
.notice > .button { margin-left: 7px; }

/* Filters and forms remain standard browser controls. */
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 11px; margin-bottom: 16px; padding: 15px 18px; border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 125px; }
.field.wide { flex: 2; }
.field.full { grid-column: 1 / -1; }
.field label, form > label { color: #62778d; font-size: 12px; font-weight: 500; line-height: 1.55; }
input, select, textarea { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid #dbe4ec; border-radius: 6px; background: white; color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: #b4c9d7; }
input[type=checkbox] { min-height: 16px; width: 16px; flex: none; padding: 0; accent-color: var(--green); }
input::placeholder, textarea::placeholder { color: #9aa8b8; }
textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
select { padding-right: 25px; }
input:read-only { background: #f7f9fb; }
input:disabled, select:disabled { background: #f1f5f9; color: #8192a6; }
.check-field { flex-direction: row; align-items: center; gap: 9px; }
.filters .field { max-width: 210px; }
.filters .field.wide { max-width: 330px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-help { color: #74869a; font-size: 12px; line-height: 1.75; margin: 12px 0; overflow-wrap: anywhere; }
.form-error { color: var(--red); font-size: 12px; line-height: 1.6; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Tabular data: local scrolling, aligned figures and distinct headers. */
.table-scroll { width: 100%; max-height: 640px; overflow: auto; scrollbar-width: thin; scrollbar-color: #bac9d4 #f5f8fb; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }
th { padding: 11px 16px; color: #5b7188; background: #f5f8fb; border-top: 1px solid #e7edf3; border-bottom: 1px solid #e4ebf2; white-space: nowrap; font-size: 11px; font-weight: 650; }
thead th { position: sticky; top: 0; z-index: 1; }
td { min-width: 94px; padding: 13px 16px; border-bottom: 1px solid #edf2f6; vertical-align: top; color: #365168; line-height: 1.65; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fcfdfe; }
tbody tr:hover td { background: #f4fafc; }
td strong { color: #24445e; font-size: 12px; font-weight: 600; }
.subtext { max-width: 340px; margin-top: 4px; color: #7b8c9f; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.amount, .secondary-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount { color: #096d79; font-weight: 650; }
td.amount, td.secondary-amount { text-align: right; }
.secondary-amount { color: #71869a; }
.room-name { min-width: 190px; max-width: 290px; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; min-width: 86px; }
.scroll-hint { display: none; padding: 6px 16px; color: #8b9aaa; font-size: 10px; text-align: right; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 17px; color: #72869b; font-size: 11px; background: #fcfdfe; border-top: 1px solid var(--line); }
.table-pagination .actions { gap: 5px; }
.source-text { color: #8393a4; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; margin-top: 5px; }
.source-text > summary { padding: 0; border: 0; font-size: 10px; font-weight: 400; color: #72899e; }
.source-text[open] > summary { border: 0; margin-bottom: 4px; }
.source-text[open] { max-width: 320px; color: #738597; }
.empty { padding: 37px 20px; text-align: center; color: #8999aa; font-size: 12px; }
.empty strong { display: block; font-size: 14px; font-weight: 550; color: #62798f; margin-bottom: 6px; }
.loading-state { padding: 52px 20px; text-align: center; color: #7b8da2; font-size: 12px; }
.loading-state::before { content: ""; display: block; width: 22px; height: 22px; border: 2px solid #dcecf0; border-top-color: var(--green); border-radius: 50%; margin: 0 auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Existing overview, knowledge and connection modules. */
.item-list { margin: 0; padding: 0; list-style: none; }
.item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf2f6; }
.item-row:last-child { border-bottom: 0; }
.item-row h3 { font-size: 12px; }
.item-row p { font-size: 11px; line-height: 1.7; color: #7c8ea1; margin-top: 4px; overflow-wrap: anywhere; }
.item-main { flex: 1; min-width: 0; }
.item-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #dcebef; border-radius: 8px; color: var(--green); background: #f0f9fa; flex: none; font-size: 12px; }
.split-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-range { margin: 0 0 14px; color: #798a9d; font-size: 12px; }
.summary-range strong { color: #4e687f; font-size: 13px; font-weight: 600; margin-right: 10px; }
.coverage-progress { appearance: none; display: block; width: 100%; height: 6px; margin: 14px 0 10px; border: 0; border-radius: 5px; overflow: hidden; background: #edf3f7; }
.coverage-progress::-webkit-progress-bar { background: #edf3f7; border-radius: 5px; }
.coverage-progress::-webkit-progress-value { background: #45a7b0; border-radius: 5px; }
.coverage-progress::-moz-progress-bar { background: #45a7b0; border-radius: 5px; }
.progress-track { height: 6px; background: #edf3f7; border-radius: 5px; overflow: hidden; margin: 14px 0 10px; }
.progress-bar { height: 100%; background: #45a7b0; border-radius: 5px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e3ebf2; border-radius: 7px; color: #4a6c81; background: #fcfdfe; font-size: 12px; text-align: left; }
.quick-action:hover { background: #f0f8fa; border-color: #c9e1e7; text-decoration: none; }
.memory-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.memory-group .card-head { background: #f8fbfd; border-bottom: 1px solid #edf2f6; }
.memory-note { padding: 14px; margin-top: 12px; border: 1px solid #e1eaf1; border-radius: 8px; background: white; }
.memory-note p { max-height: 160px; overflow: auto; margin: 9px 0; color: #647b90; font-size: 12px; white-space: pre-wrap; }
.memory-note footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 10px; }
.connection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.connection-card { padding: 19px; }
.connection-card h3 { margin-bottom: 5px; }
.connection-card > .split-line { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.connection-detail { min-height: 40px; margin: 12px 0; color: #73889c; font-size: 12px; }
.definition-list { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 10px 15px; margin: 0; font-size: 12px; }
.definition-list dt { color: #8191a4; }
.definition-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.audit-label { margin-top: 9px; color: #8697a8; font-size: 11px; line-height: 1.6; }
.file-input { padding: 9px; background: #f8fafc; }
.inline-link { font-size: 11px; }
.panel-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.panel-tabs .button { background: #f8fafc; border-color: #e1e8f0; color: #6c8196; }
.panel-tabs button.active { color: var(--green-dark); background: var(--green-light); border-color: #bcdfe3; }

/* Dialogs, assistant and feedback. */
dialog { width: min(760px, calc(100vw - 28px)); max-height: 88vh; padding: 0; border: 1px solid #dce5ed; border-radius: 12px; background: white; color: var(--ink); box-shadow: 0 18px 70px #17324d2e; }
dialog::backdrop { background: #16324f65; backdrop-filter: blur(2px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: white; }
.dialog-head .eyebrow { display: none; }
.dialog-body { padding: 21px 22px; }
.dialog-body > .notice:last-child { margin-bottom: 0; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--line); }
.history-item { padding: 0 0 17px 15px; margin-left: 4px; border-left: 2px solid #d3e4ee; font-size: 12px; }
.history-item h3 { font-size: 12px; margin-bottom: 6px; }
.history-item p { color: #8292a4; font-size: 11px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-box { padding: 14px; border: 1px solid #dce8f0; border-radius: 7px; background: #f4f8fb; user-select: all; }
.pairing-token { padding: 15px; margin: 12px 0; border: 1px solid #cbe4e8; border-radius: 7px; background: #edf8fa; font-family: Consolas, monospace; overflow-wrap: anywhere; }
.assistant-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 17px; }
.assistant-role { display: block; width: 100%; padding: 14px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.assistant-role.active { border-color: #add8de; background: #ecf8f9; box-shadow: inset 3px 0 var(--green); }
.assistant-role strong { display: block; color: #34566e; font-size: 13px; }
.assistant-role span { display: block; margin-top: 5px; color: #7a8d9f; font-size: 11px; }
.chat-panel { display: flex; flex-direction: column; min-height: 430px; }
.chat-panel .card-head { border-bottom: 1px solid #edf2f6; }
.chat-messages { flex: 1; min-height: 240px; max-height: 62vh; overflow: auto; padding: 21px; }
.chat-message { margin-bottom: 21px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message .speaker { display: block; margin-bottom: 7px; color: #8093a6; font-size: 11px; }
.chat-message .message-text { padding: 12px 15px; border: 1px solid #e4edf3; border-radius: 0 9px 9px 9px; background: #f6f9fc; color: #416078; line-height: 1.85; }
.chat-message.user .message-text { color: #145768; background: #eaf6f8; border-color: #d2e9ed; border-radius: 9px 0 9px 9px; }
.chat-message .sources { margin: 8px 0; color: #7f91a4; font-size: 11px; white-space: normal; }
.chat-compose { padding: 16px; border-top: 1px solid var(--line); }
.chat-compose textarea { min-height: 80px; margin-bottom: 9px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.suggestions .button { white-space: normal; text-align: left; }
.toast { position: fixed; bottom: 23px; left: 50%; z-index: 200; max-width: calc(100vw - 28px); transform: translate(-50%, 14px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 8px; background: #173b52; color: white; font-size: 12px; line-height: 1.65; box-shadow: 0 5px 20px #17324d22; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 15px; border-top: 1px solid #e3eaf1; color: #94a1b1; font-size: 10px; }
details > summary { cursor: pointer; padding: 14px 19px; color: #5a7186; font-size: 12px; font-weight: 550; }
details[open] > summary { border-bottom: 1px solid var(--line); }
details .card-body { padding-top: 15px; }
.pill-group { display: flex; flex-wrap: wrap; gap: 7px; }
.tagline { padding: 12px 0; border-bottom: 1px solid var(--line); color: #8394a6; font-size: 11px; }
.chart-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: 11px; margin: 12px 0; }
.chart-bar { height: 11px; border-radius: 3px; background: #edf4f8; overflow: hidden; }
.chart-bar span { display: block; height: 100%; background: #63aeba; }
.break-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.busy { opacity: .55; pointer-events: none; }
.login-screen { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 100vh; padding: 24px; background: var(--canvas); }
.login-card { width: 410px; min-width: 0; max-width: 100%; padding: 33px; border: 1px solid #dee7ef; border-radius: 13px; background: white; box-shadow: 0 8px 35px #17324d08; }
.login-card .brand-mark { margin-bottom: 21px; }
.login-card h1 { font-size: 23px; margin-bottom: 11px; }
.login-card form { margin: 23px 0; }
.login-card input { margin: 7px 0 14px; }
.login-card .button { width: 100%; }

/* Existing 30-day matrix keeps every day inside its own scroll surface. */
.market-matrix { min-width: 1350px; font-size: 12px; }
.market-matrix td { min-width: 43px; padding: 10px 5px; text-align: center; vertical-align: middle; border-right: 1px solid white; }
.market-matrix th { padding: 11px 7px; text-align: center; }
.market-matrix th:first-child { position: sticky; left: 0; z-index: 2; min-width: 220px; max-width: 250px; padding-inline: 14px; background: #f7fafc; text-align: left; white-space: normal; box-shadow: 2px 0 3px #2641580c; }
.market-matrix thead th:first-child { z-index: 3; background: #edf4f8; }
.market-matrix .market-ok, .market-matrix tbody tr:hover .market-ok { background: #eaf6f0; color: #197257; }
.market-matrix .market-empty, .market-matrix tbody tr:hover .market-empty { background: #f0f3f6; color: #63758a; }
.market-matrix .market-blocked, .market-matrix tbody tr:hover .market-blocked { background: #fff5df; color: #92620f; }
.market-matrix .market-failed, .market-matrix tbody tr:hover .market-failed { background: #ffedef; color: #aa414a; }
.market-matrix .market-active, .market-matrix tbody tr:hover .market-active { background: #eaf3ff; color: #346ca5; }
.market-matrix .market-pending { color: #8b9aac; }
.market-price { padding: 6px 2px; border: 0; background: transparent; color: #137a68; font: inherit; font-weight: 650; white-space: nowrap; cursor: pointer; }
.market-price:hover { text-decoration: underline; }
.market-price:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (min-width: 1700px) {
  #workspace { padding-top: 27px; }
  .metric { padding: 20px 22px 17px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 204px; }
  .sidebar { padding-inline: 11px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 15px; }
  .topbar { padding-inline: 22px; }
  #workspace { padding: 22px; }
  .metrics-grid { gap: 12px; }
  .metric { padding: 15px; }
  .metric-value { font-size: 26px; }
  .two-columns { grid-template-columns: 1fr 1fr; }
  .connection-grid, .three-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-columns { grid-template-columns: 1fr; }
  .memory-group .card-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding-top: 15px; }
  .memory-group .empty { grid-column: 1 / -1; }
  .memory-note { margin-top: 0; }
  #clock-label { display: none; }
  #page-actions { max-width: 55%; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 1px 5px #17324d06; }
  .brand-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 17px; }
  .brand { padding: 0; gap: 9px; min-width: 0; }
  .brand-mark { width: 31px; height: 33px; border-radius: 7px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .brand strong { font-size: 15px; white-space: nowrap; }
  .brand small, .sidebar-bottom { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 39px; padding: 6px 9px; color: #557187; background: #f5f9fc; border: 1px solid #dfe8ef; border-radius: 7px; font-size: 12px; white-space: nowrap; }
  .nav-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .nav-toggle[aria-expanded="true"] { color: var(--green-dark); background: var(--green-light); border-color: #bcdde3; }
  #navigation { display: none; max-height: min(68vh, 560px); padding: 8px 16px 16px; gap: 13px 12px; overflow-y: auto; border-top: 1px solid #eef3f7; }
  .sidebar.nav-open #navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-group-title { padding: 5px 9px 7px; font-size: 11px; }
  .nav-item { min-height: 40px; padding: 9px; gap: 8px; font-size: 12px; }
  .nav-icon, .nav-icon svg { width: 16px; height: 16px; }
  .main-shell { margin-left: 0; }
  .topbar { min-height: 45px; padding: 7px 18px; flex-wrap: wrap; gap: 7px 10px; }
  .top-actions { max-width: 100%; gap: 6px; }
  .breadcrumb { font-size: 11px; }
  #workspace { padding: 19px 18px; }
  .page-heading { align-items: flex-start; margin-bottom: 16px; }
  h1 { font-size: 23px; }
  .page-heading .muted { font-size: 12px; }
  #page-actions { max-width: 56%; }
  .metrics-grid { gap: 11px; }
  .metric-label { font-size: 11px; }
  .metric-note { font-size: 10px; }
  .two-columns { grid-template-columns: 1fr; }
  .assistant-layout { grid-template-columns: 1fr; }
  .assistant-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .assistant-role { padding: 11px; margin: 0; }
  .assistant-role span { font-size: 10px; }
  .assistant-roles + .notice { margin-top: 12px; }
  .scroll-hint { display: block; }
  .table-scroll { max-height: 560px; }
  .card-head { padding: 16px; }
  .card-body { padding: 0 16px 16px; }
  .page-footer { font-size: 10px; }
}
@media (max-width: 580px) {
  .brand-row { padding-inline: 13px; }
  .topbar { padding: 7px 13px; justify-content: flex-end; }
  .breadcrumb { display: none; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .top-actions .button { min-height: 34px; font-size: 11px; padding-inline: 9px; }
  #workspace { padding: 17px 13px 20px; }
  .page-heading { display: block; margin-bottom: 15px; }
  .page-heading .muted { font-size: 11px; line-height: 1.75; margin-top: 5px; }
  #page-actions { max-width: 100%; justify-content: flex-start; margin-top: 13px; gap: 6px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
  .metric { padding: 14px; }
  .metric-value { font-size: 25px; margin-top: 10px; }
  .metric-value.small-value { font-size: 18px; }
  .metric-note { min-height: 30px; }
  .empty-metrics { margin-bottom: 8px; }
  .empty-metrics .metric { padding: 11px 13px; }
  .empty-metrics .metric-value { font-size: 22px; margin: 6px 0 0; }
  .metrics-empty-note { font-size: 11px; margin-bottom: 15px; }
  .summary-range { font-size: 11px; margin-bottom: 12px; line-height: 1.75; }
  .summary-range strong { font-size: 12px; }
  .card-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .card-head h2 { font-size: 15px; }
  .card-head .actions { gap: 5px; }
  .filters { padding: 13px; gap: 10px; }
  .filters .field { max-width: none; min-width: calc(50% - 5px); }
  .filters .field.wide { max-width: none; min-width: 100%; }
  .filters > .button { flex: 1; }
  .button { min-height: 40px; }
  .small-button, .row-actions .button { min-height: 35px; }
  .field { min-width: 0; }
  input, select, textarea { min-height: 40px; font-size: 13px; }
  .field label { font-size: 11px; overflow-wrap: anywhere; }
  .form-grid { gap: 12px; }
  .table-scroll { max-height: 520px; }
  th, td { padding-inline: 13px; }
  th { font-size: 11px; }
  td { font-size: 12px; padding-block: 12px; }
  .room-name { min-width: 175px; }
  .connection-grid, .three-columns { grid-template-columns: 1fr; }
  .connection-card { padding: 17px; }
  .memory-group .card-body { display: block; padding-top: 0; }
  .memory-note { margin-top: 12px; }
  .form-help { font-size: 11px; }
  .dialog-head { padding: 15px 16px; }
  .dialog-head h2 { font-size: 16px; }
  .dialog-body { padding: 17px 16px; }
  .definition-list { grid-template-columns: 87px minmax(0, 1fr); gap: 10px; font-size: 11px; }
  .page-footer { display: block; line-height: 1.8; }
  .page-footer span { display: block; }
  .page-footer span + span { margin-top: 4px; }
  .card-foot { padding: 11px 15px; }
  .assistant-role strong { font-size: 12px; }
  .assistant-role span { line-height: 1.6; }
  .chat-messages { padding: 16px; }
  .chat-message { font-size: 12px; }
  .chat-compose { padding: 13px; }
  .notice { padding: 11px 13px; font-size: 11px; }
  .notice > .button { margin: 7px 0 0; }
  .quick-action { min-height: 42px; padding: 11px; font-size: 11px; }
  .chart-row { grid-template-columns: 78px minmax(0, 1fr) 65px; gap: 8px; }
  .source-text { font-size: 10px; }
  .login-card { padding: 27px 24px; }
  .market-matrix th:first-child { min-width: 168px; max-width: 188px; padding-inline: 12px; }
  .market-matrix th:first-child strong { font-size: 11px; }
}
@media (max-width: 340px) {
  .brand-row { gap: 6px; padding-inline: 11px; }
  .brand { gap: 7px; }
  .brand strong { font-size: 14px; }
  .nav-toggle { padding-inline: 7px; font-size: 11px; }
  .nav-toggle svg { width: 14px; }
  #workspace { padding-inline: 11px; }
  .topbar { padding-inline: 11px; }
  .top-actions .button { padding-inline: 7px; font-size: 10px; }
  .top-actions .button-icon { width: 12px; }
  .filters { padding: 11px; }
  .table-pagination { padding-inline: 12px; }
  .assistant-roles { grid-template-columns: 1fr; gap: 7px; }
  .assistant-role { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9px; }
  .assistant-role span { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.login-card form { display: grid; gap: 10px; margin-top: 18px; }
.login-card form > label { font-weight: 600; font-size: 13px; }
.login-card .login-remember { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 3px 0; }
.login-remember input { min-height: auto; width: 17px; height: 17px; }
.legacy-pairing { margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line, #e0e8ed); }
.legacy-pairing summary { color: var(--muted, #667a85); cursor: pointer; font-size: 12px; }
.report-section { border: 1px solid var(--line, #e0e8ed); border-radius: 12px; margin: 24px 0 0; padding: 17px; min-width: 0; }
.report-section legend { font-size: 14px; font-weight: 700; color: #146d78; padding: 0 8px; }
.report-section .form-help { margin: 0 0 12px; }
.report-section input { font-variant-numeric: tabular-nums; }
.report-submit-actions { position: sticky; bottom: -17px; padding: 16px 0 8px; background: #fff; border-top: 1px solid #e0e8ed; z-index: 2; }
.daily-report-text { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f8fa; border: 1px solid #dfe8eb; border-radius: 12px; padding: 20px; margin-top: 18px; font: 14px/1.9 "Microsoft YaHei", system-ui, sans-serif; color: #243e4a; }
.report-detail-dialog { width: min(1050px, calc(100vw - 28px)); }
.report-detail-dialog .dialog-body { padding: 22px 26px; background: #f4f8fa; }
.report-detail-dialog .report-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.report-detail-dialog .report-detail-toolbar .actions { flex-wrap: wrap; }
.report-detail-dialog .report-detail-note { font-size: 12px; color: #748b99; line-height: 1.7; margin: 14px 0 20px; }
.report-detail-dialog .report-detail-section { border: 1px solid #dce7ed; border-radius: 9px; margin: 0 0 16px; padding: 17px 19px; background: #fff; }
.report-detail-dialog .report-detail-section h3 { font-size: 14px; color: #25526a; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid #108893; }
.report-detail-dialog .report-detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px 16px; margin: 0; }
.report-detail-dialog .report-detail-cell { min-width: 0; border-bottom: 1px solid #edf2f5; padding: 0 0 10px; }
.report-detail-dialog .report-detail-cell.full { grid-column: span 2; }
.report-detail-dialog .report-detail-cell dt { display: flex; gap: 5px; align-items: baseline; flex-wrap: wrap; color: #768d9d; font-size: 11px; margin-bottom: 7px; }
.report-detail-dialog .report-detail-cell dd { margin: 0; color: #284b61; font-size: 15px; font-weight: 550; line-height: 1.65; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: pre-wrap; }
.report-detail-dialog .report-detail-cell dd small { font-size: 10px; margin-left: 5px; color: #8b9ba6; font-weight: 400; }
.report-detail-dialog .report-detail-cell dd.is-empty { color: #a5b3bc; font-weight: 400; }
.report-detail-dialog .report-detail-cell.automatic dd:not(.is-empty) { color: #13818a; }
.report-detail-dialog .report-value-origin { border-radius: 3px; padding: 1px 4px; background: #eaf6f5; color: #28868a; font-size: 9px; }
.report-detail-dialog .report-value-origin.pms { background: #eff3f8; color: #72869d; }
.report-detail-dialog .report-detail-calculation { border: 1px solid #d7e9e1; border-radius: 7px; background: #f0f8f4; color: #487362; margin-top: 15px; padding: 12px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.report-detail-dialog .report-detail-calculation.warning { background: #fffbf0; border-color: #e8ddbc; color: #88713f; }
.report-detail-dialog .report-detail-calculation p { margin: 5px 0 0; }
.report-detail-dialog .report-coverage { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 5px 0; }
.report-detail-dialog .report-detail-extra { margin: 16px 0; padding: 14px 16px; border: 1px solid #dce7ed; border-radius: 8px; background: #fff; }
.report-detail-dialog .report-detail-extra > summary, .report-detail-dialog .report-history-version > summary { cursor: pointer; color: #37657c; font-size: 12px; font-weight: 600; line-height: 1.7; }
.report-detail-dialog .report-history-version { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e6edf2; }
.report-detail-dialog .report-history-fields { margin-top: 14px; }
.report-detail-dialog .report-review-note { color: #6c8494; font-size: 11px; margin: 8px 0; }
.report-detail-dialog .report-validation-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px;margin:16px 0}.report-detail-dialog .report-validation-item{border:1px solid #e0e9ef;border-radius:7px;padding:13px;min-width:0}.report-detail-dialog .report-validation-item strong{font-size:12px;color:#355d70}.report-detail-dialog .report-validation-item dl{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:8px;font-size:11px;margin:13px 0}.report-detail-dialog .report-validation-item dt{color:#8296a2}.report-detail-dialog .report-validation-item dd{margin:0;color:#315367;overflow-wrap:anywhere}.report-detail-dialog .report-validation-item p{font-size:11px;line-height:1.7;color:#718995;margin:6px 0;overflow-wrap:anywhere}
@media(max-width:650px) {
  .report-detail-dialog .dialog-body { padding: 15px 13px; }
  .report-detail-dialog .report-detail-section { padding: 14px 13px; }
  .report-detail-dialog .report-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 12px; }
  .report-detail-dialog .report-detail-cell.full { grid-column: 1 / -1; }
  .report-detail-dialog .report-detail-cell dd { font-size: 14px; }
  .report-detail-dialog .report-detail-toolbar .button { font-size: 11px; padding-inline: 8px; }
}

/* The PMS workspace is an independent shell over the existing business pages. */
.operations-trend { display: block; width: 100%; height: auto; min-height: 160px; }
.draft-comparison { margin-top: 16px; padding: 14px; border: 1px solid #e3c481; border-radius: 10px; background: #fffcf3; }
.draft-comparison .table-scroll { max-height: 240px; }
@media (max-width: 580px) {
  .report-section { padding: 13px; margin-top: 20px; }
  .report-section legend { font-size: 13px; }
  .report-section .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-submit-actions { bottom: -17px; flex-wrap: wrap; gap: 7px; }
  .report-submit-actions .primary { flex: 1; }
  .daily-report-text { padding: 15px; font-size: 12px; }
  .login-card input { font-size: 16px; }
}

/* Business progress and compact trend charts */
.business-progress{padding:18px 0;border-top:1px solid #e4ecef}.business-progress:first-child{border-top:0}.business-progress progress{display:block;width:100%;height:20px;margin:12px 0;accent-color:#087f8c}.business-progress progress.progress-low{accent-color:#d44848}.trend-chart{width:100%;height:auto;max-height:240px;display:block}.price-up{color:#c23c3c}.price-down{color:#178058}

/* Headquarters connection discovery */
.connection-address-panel { border-bottom: 1px solid var(--line, #e0e8ed); background: #f9fcfd; }
.connection-address-panel > .split-line { gap: 8px; flex-wrap: wrap; }
.connection-address { margin: 14px 0 8px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.connection-address-panel .actions { flex-wrap: wrap; }
.connection-address-panel [role="status"]:empty { display: none; }
.connection-address-panel details { margin-top: 12px; }

/* Approved reference: coherent surfaces, and an editable report side panel. */
.brand strong { font-size: 16px; }
.brand-mark { background: #e8f5f6; color: var(--green); }
.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto; }
.sidebar-bottom::before { content: 'H'; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #edf4f8; color: var(--ink); font-weight: 700; }
.sidebar-bottom .status-dot { display: none; }
.metric.accent { box-shadow: none; border-color: var(--line); }
.metric.accent .metric-value { color: var(--ink); }
.metric-value { color: var(--ink); }
.button { border-radius: 7px; }
.card, .metric { box-shadow: 0 2px 7px #17324d03; }
.card-head h2 { line-height: 1.5; }
.filters { border-radius: 10px; background: #fff; }
.panel-tabs { margin-bottom: 18px; gap: 8px; }
.panel-tabs .button.active { background: #e8f5f6; color: var(--green); border-color: #bbdfe2; }
.assistant-role.active { background: #e8f5f6; }
.chat-panel { border-radius: 12px; }
.chat-compose { background: #fbfcfd; }
.login-card { border-radius: 16px; box-shadow: 0 14px 55px #17324d09; }
/* Daily report: one continuous page. These rules stay inside its editor. */
#edit-dialog.report-drawer[open] { position: fixed; inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(1080px, calc(100vw - 40px)); max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border: 0; border-left: 1px solid #dce7ec; border-radius: 14px 0 0 14px; overflow: hidden; box-shadow: -16px 0 48px #14334620; }
#edit-dialog.report-drawer::backdrop { background: #17354e35; backdrop-filter: none; }
.report-drawer .dialog-head { position: relative; flex: none; padding: 19px 28px; min-height: 76px; }
.report-drawer .dialog-head h2 { font-size: 21px; color: #15364c; }
.report-drawer .dialog-head .icon-button { border: 0; background: #f2f6f8; border-radius: 8px; }
.report-drawer .dialog-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.report-drawer #daily-report-form { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.report-drawer .report-editor-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 28px 26px; background: #f3f7fa; scrollbar-width: thin; scroll-padding-block: 18px; }
.report-drawer #draft-state { display: inline-block; border: 0; font-size: 11px; padding: 8px 11px; margin: 0 8px 0 0; background: #e7f3ee; color: #34735f; border-radius: 6px; }
.report-drawer #draft-state.warning { background: var(--amber-bg); color: var(--amber); }
.report-drawer #compare-report-base { margin: 0; font-size: 11px; padding: 3px 0; border: 0; min-height: 27px; color: var(--green); background: transparent; }
.report-drawer .report-editor-help { font-size: 11px; line-height: 1.65; margin: 8px 0 18px; color: #788d9c; }
.report-drawer .report-section { position: relative; border: 1px solid #dfe8ed; background: #fff; border-radius: 10px; padding: 18px 20px 20px; margin: 0 0 18px; min-width: 0; }
.report-drawer .report-section legend { display: flex; align-items: center; gap: 8px; padding: 0 8px; margin-left: -8px; color: #21475e; font-size: 14px; font-weight: 650; line-height: 1.6; }
.report-drawer .report-section legend::before { content: attr(data-section-number); }
.report-drawer .report-section[data-section-number] legend::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: #138894; }
.report-drawer .form-grid { gap: 14px 18px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-drawer .field { min-width: 0; gap: 6px; }
.report-drawer .field label { font-size: 12px; color: #61798a; font-weight: 500; }
.report-drawer .field input, .report-drawer .field select, .report-drawer .field textarea { min-width: 0; width: 100%; min-height: 38px; border-color: #dce5eb; border-radius: 6px; background: #fff; color: #243f53; font-size: 14px; font-variant-numeric: tabular-nums; }
.report-drawer .field input::placeholder, .report-drawer .field textarea::placeholder { font-size: 11px; color: #a4b1bc; }
.report-drawer .field input:focus, .report-drawer .field select:focus, .report-drawer .field textarea:focus { border-color: #1597a2; box-shadow: 0 0 0 3px #118b9610; }
.report-drawer .report-store-field { grid-column: span 2; }
.report-drawer .report-primary-field label { color: #157e89; }
.report-drawer .report-primary-field input { border-color: #badce0; background: #f6fbfb; color: #176b77; font-weight: 600; }
.report-drawer .report-pms-note { font-size: 11px; color: #7d8f9d; margin: 13px 0 0; line-height: 1.65; }
.report-drawer [data-report-section="social"] .form-grid, .report-drawer [data-report-section="monthly"] > .form-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.report-drawer [data-report-section="reviews"] .form-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-drawer .report-review-daily { margin-bottom: 17px; padding-bottom: 17px; border-bottom: 1px dashed #dce6ec; }
.report-drawer .report-review-total label { color: #157e89; }
.report-drawer .report-review-total input { background: #f6fbfb; border-color: #badce0; }
.report-drawer .report-pending-field { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.report-drawer .report-pending-field > span { font-size: 12px; color: #61798a; line-height: 1.55; font-weight: 500; }
.report-drawer .report-pending-field > strong { display: flex; align-items: center; min-height: 38px; padding: 8px 11px; border: 1px dashed #cfdee6; border-radius: 6px; background: #f7fafb; font-size: 11px; font-weight: 500; color: #8a9ca8; }
.report-drawer [data-report-section="sources"] .form-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.report-drawer .report-pending-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 18px; padding-top: 15px; border-top: 1px dashed #dce6ec; }
.report-drawer .report-pending-metric { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px dashed #cfdee6; border-radius: 6px; background: #f7fafb; color: #65808f; font-size: 12px; }
.report-drawer .report-pending-metric strong { font-size: 11px; font-weight: 500; color: #718592; background: #eaf0f4; padding: 3px 8px; border-radius: 4px; }
.report-drawer .report-pending-metrics p { grid-column: 1 / -1; font-size: 11px; line-height: 1.65; color: #899ba8; margin: 0; }
.report-drawer .report-calculated-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px dashed #dce6ec; margin-top: 17px; padding-top: 17px; }
.report-drawer .field input.report-auto-value { background: #edf7f7; border-color: #cae4e5; color: #1b6e79; font-weight: 600; }
.report-drawer .field input:disabled { background: #f2f4f6; color: #899ba8; }
.report-drawer .report-calculation-status { margin: 15px 0 0; padding: 12px; font-size: 11px; line-height: 1.7; background: #eef7f3; border-color: #d6e8df; color: #356658; }
.report-drawer .report-calculation-status.warning { background: #fff9eb; border-color: #eaddbf; color: #876528; }
.report-drawer .report-calculation-status p { margin: 5px 0; }
.report-drawer .report-calculation-status .button { margin-top: 7px; background: #fff; font-size: 11px; min-height: 30px; }
.report-drawer .report-month-opening { margin: 14px 0 0; padding: 13px; border: 1px solid #dce6ed; border-radius: 7px; background: #f9fbfd; }
.report-drawer .report-month-opening summary { cursor: pointer; color: #3b7188; font-size: 12px; font-weight: 600; }
.report-drawer .report-month-opening .form-help { margin-top: 12px; }
.report-drawer .report-month-opening .opening-version { color: #617b8d; font-size: 11px; margin: 9px 0 13px; }
.report-drawer .report-month-opening .actions { margin-top: 13px; }
.report-drawer .report-month-opening .button { min-height: 34px; font-size: 12px; }
.report-drawer [data-report-section="notes"] .form-grid { grid-template-columns: 1fr 1fr; }
.report-drawer [data-report-section="notes"] .field.full { grid-column: auto; }
.report-drawer [data-report-section="notes"] textarea { min-height: 74px; }
.report-drawer #edit-error:not(:empty) { padding: 12px; border-radius: 7px; border: 1px solid #f1cfd4; background: #fff3f4; margin-top: 18px; }
.report-drawer .report-editor-footer { position: relative; bottom: auto; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0; padding: 15px 28px max(15px,env(safe-area-inset-bottom)); border-top: 1px solid #dce7ec; box-shadow: 0 -5px 12px #17324d03; background: #fff; }
.report-drawer .report-editor-footer .button { min-height: 40px; padding-inline: 18px; font-size: 13px; }
.report-drawer .report-editor-footer #save-report-draft { color: var(--green); border-color: #bad9de; }
.report-drawer .report-upload-caption { order: -1; margin: 0 auto 0 0; font-size: 11px; color: #8295a4; }
@media(max-width:900px) {
  #edit-dialog.report-drawer[open] { width: calc(100vw - 24px); }
  .report-drawer .form-grid { gap: 13px 14px; }
  .report-drawer [data-report-section="social"] .form-grid, .report-drawer [data-report-section="reviews"] .form-grid, .report-drawer [data-report-section="sources"] .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report-drawer [data-report-section="reviews"] .report-review-daily { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .report-drawer .report-upload-caption { max-width: 150px; line-height: 1.6; }
}
@media(max-width:650px) {
  #edit-dialog.report-drawer[open] { width: 100vw; border-radius: 0; border: 0; }
  .report-drawer .dialog-head { min-height: 62px; padding: 15px 18px; }
  .report-drawer .dialog-head h2 { font-size: 18px; }
  .report-drawer .report-editor-scroll { padding: 14px 14px 18px; }
  .report-drawer .report-section { padding: 14px 14px 16px; margin-bottom: 16px; }
  .report-drawer .form-grid, .report-drawer [data-report-section="social"] .form-grid, .report-drawer [data-report-section="monthly"] > .form-grid, .report-drawer [data-report-section="reviews"] .form-grid, .report-drawer [data-report-section="sources"] .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .report-drawer .report-daily-gap-field { grid-column: 1; }
  .report-drawer .report-daily-gap-rp { grid-column: 2; }
  .report-drawer .report-store-field { grid-column: 1 / -1; }
  .report-drawer .field input, .report-drawer .field select, .report-drawer .field textarea { font-size: 16px; }
  .report-drawer .report-pending-metrics { gap: 10px; }
  .report-drawer .report-pending-metric { padding: 10px 8px; font-size: 11px; }
  .report-drawer [data-report-section="notes"] .form-grid { grid-template-columns: 1fr; }
  .report-drawer .report-editor-footer { gap: 7px; padding: 12px 14px max(12px,env(safe-area-inset-bottom)); }
  .report-drawer .report-editor-footer .button { flex: 1; font-size: 12px; padding-inline: 7px; }
  .report-drawer .report-upload-caption { display: none; }
}

/* Scope all overview styling so report, finance and connection controls retain their behavior. */
.overview-dashboard{--ov-accent:#078b9c;--ov-ink:#11233f;--ov-muted:#718098;--ov-line:#e4edf3;display:grid;gap:18px;min-width:0;color:var(--ov-ink)}
.ov-toolbar,.ov-filters,.ov-section-head,.ov-progress-head,.ov-progress-values,.ov-progress-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.ov-toolbar>p{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--ov-muted)}
.ov-toolbar>p strong{font-size:14px;font-weight:650;color:#344a64;font-variant-numeric:tabular-nums}
.ov-filters{justify-content:flex-end;gap:12px}
.ov-day-switch{display:flex;border:1px solid var(--ov-line);border-radius:8px;padding:3px;background:#fff;flex:none}
.ov-day-switch button{border:0;border-radius:5px;background:transparent;color:#64748b;padding:6px 14px;font-size:12px;min-height:34px}
.ov-day-switch button.active{background:#e7f5f6;color:#047e8d;font-weight:650}
.ov-store-filter{display:flex;align-items:center;gap:8px;color:var(--ov-muted);font-size:12px;min-width:0}
.ov-store-filter select{width:auto;max-width:230px;min-height:42px;border:1px solid #d9e4ed;border-radius:8px;background:#fff;color:#344a64;padding:8px 30px 8px 12px}
.ov-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;min-width:0}
.ov-metric{display:flex;align-items:flex-start;gap:14px;padding:22px 18px;background:#fff;border:1px solid var(--ov-line);border-radius:10px;min-width:0}
.ov-metric-icon{display:flex;align-items:center;justify-content:center;width:43px;height:43px;flex:none;border-radius:8px;background:#e9f7f8;color:var(--ov-accent)}
.ov-metric-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ov-metric-copy{min-width:0}.ov-metric h2{font-size:13px;font-weight:500;line-height:1.45;color:#455b73;margin:0 0 6px}
.ov-metric-value{font-size:27px;font-weight:700;line-height:1.2;letter-spacing:-.6px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;color:#101f39;margin:0}
.ov-metric-note{font-size:11px;line-height:1.55;color:var(--ov-muted);margin:8px 0 0}
.ov-panel{min-width:0;background:#fff;border:1px solid var(--ov-line);border-radius:10px;padding:22px;box-shadow:0 2px 5px #25395602}
.ov-section-head{margin-bottom:18px;align-items:flex-start}.ov-section-head h2,.ov-progress-head h2{font-size:17px;font-weight:650;line-height:1.45;margin:0;color:#13243d}.ov-section-head p{font-size:11px;color:var(--ov-muted);margin-top:4px}
.ov-section-kicker{display:block;font-size:11px;color:var(--ov-muted);margin-bottom:5px}.ov-progress-head{align-items:flex-end;margin-bottom:15px}.ov-progress-rate{display:flex;align-items:baseline;gap:6px;color:var(--ov-accent);white-space:nowrap}.ov-progress-rate>span{font-size:13px}.ov-progress-rate strong{font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.ov-progress-track{height:16px;border-radius:10px;background:#eaf2f5;position:relative;margin:0 0 14px}.ov-progress-track.is-unknown{background:repeating-linear-gradient(135deg,#edf3f5,#edf3f5 7px,#f7fafb 7px,#f7fafb 14px)}
.ov-progress-svg{display:block;width:100%;height:16px;overflow:visible}.ov-progress-calendar{stroke:#697b94;stroke-width:1.5;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.ov-progress-values{gap:12px}.ov-progress-values>p{white-space:normal}.ov-progress-values strong{font-size:23px;line-height:1.35;font-weight:700;font-variant-numeric:tabular-nums}.ov-progress-values p>span{font-size:13px;color:#536781}.ov-progress-values>span,.ov-progress-foot{font-size:11px;color:var(--ov-muted)}
.ov-progress-foot{margin-top:12px;padding-top:12px;border-top:1px solid #f0f4f7;flex-wrap:wrap}.ov-progress-note{display:flex;align-items:baseline;gap:6px;font-size:11px;color:#98702c;line-height:1.6;margin-top:10px}.ov-caption{font-size:11px;line-height:1.65;color:var(--ov-muted);margin-top:12px}
.ov-chart-legend{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--ov-muted);white-space:nowrap}.ov-chart-legend i{width:7px;height:7px;border-radius:50%;background:var(--ov-accent)}.ov-chart-wrap{position:relative;min-width:0}.ov-chart{display:block;width:100%;height:auto;min-height:145px;max-height:255px}.ov-chart-grid{stroke:#eaf0f5;stroke-width:1}.ov-chart-axis{fill:#75839a;font-size:11px;font-family:inherit}.ov-chart-line{stroke:#068e9f;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}.ov-chart-point{fill:#fff;stroke:#068e9f;stroke-width:2}.ov-chart-empty{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);color:#8995a7;font-size:12px;max-width:80%;text-align:center;background:#ffffffde;padding:8px 14px;border-radius:6px}
.ov-chart-detail{font-size:11px;color:#60758e;margin-top:9px}.ov-chart-detail summary{cursor:pointer;min-height:28px}.ov-chart-detail table{font-size:12px}.ov-chart-detail th,.ov-chart-detail td{padding:9px 12px}
.ov-coverage{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap}.ov-coverage.amber,.ov-report-state.amber{color:#c28628}.ov-coverage.green,.ov-report-state.green{color:#289365}.ov-status-dot{display:inline-block;width:7px;height:7px;flex:none;border-radius:50%;vertical-align:middle;background:#a8b4c2}.ov-status-dot.amber{background:#d49b32}.ov-status-dot.green{background:#3cab7c}
.ov-store-table{border-collapse:separate;border-spacing:0;font-size:13px;width:100%;min-width:570px}.ov-store-table th,.ov-store-table td{padding:13px 15px;border-bottom:1px solid #edf2f6;text-align:left;white-space:nowrap}.ov-store-table thead th{background:#f4f8fb;color:#536781;font-size:11px;font-weight:600}.ov-store-table thead th:first-child{border-radius:7px 0 0 7px}.ov-store-table thead th:last-child{border-radius:0 7px 7px 0}.ov-store-table tbody th{font-size:13px;font-weight:500;color:#30455e;white-space:normal;min-width:130px}.ov-store-table tr:last-child th,.ov-store-table tr:last-child td{border-bottom:0}.ov-table-money{font-variant-numeric:tabular-nums;color:#20344e}.ov-report-state{display:inline-flex;align-items:center;gap:7px;font-size:12px}.ov-row-sub{display:block;font-size:10px;color:#91a0b2;margin:3px 0 0 14px}.ov-row-action{text-align:right!important}.ov-row-button{border:0;background:transparent;padding:7px 0;color:#0a8898;font-size:12px;min-height:32px}.ov-primary-action{display:inline-flex;align-items:center;gap:8px}.ov-primary-action svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
body.report-drawer-open .ov-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
body.report-drawer-open .ov-metric{padding:18px 16px}
body.report-drawer-open .ov-toolbar{align-items:flex-start;flex-wrap:wrap}
.ov-sources{border-top:1px solid var(--ov-line);font-size:11px;color:#77869b;padding:4px 2px}.ov-sources>summary{padding:10px 0;cursor:pointer;min-height:36px}.ov-sources>summary>span{float:right;font-size:10px;color:#8d99aa}.ov-sources-body{padding:0 4px 10px}.ov-sources-body ul{list-style:none;margin:12px 0;padding:0;display:grid;gap:9px}.ov-sources-body li{display:grid;grid-template-columns:130px minmax(0,1fr) auto;gap:12px;font-size:11px}.ov-sources-body strong{font-weight:500;color:#536781}.ov-sources-body small{font-size:10px;color:#93a0b1}
@media(max-width:580px){.ov-sources>summary>span{float:none;display:block;margin-top:4px}.ov-sources-body li{grid-template-columns:110px minmax(0,1fr);gap:6px}.ov-sources-body small{grid-column:2}}
@media(max-width:1300px){.ov-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.ov-toolbar{align-items:flex-start;flex-wrap:wrap}.ov-filters{justify-content:flex-start}}
@media(max-width:580px){.overview-dashboard{gap:13px}.ov-panel{padding:16px}.ov-toolbar{gap:10px}.ov-toolbar>p{gap:7px}.ov-filters{width:100%;justify-content:space-between;gap:8px}.ov-store-filter>span{display:none}.ov-store-filter{max-width:calc(100% - 120px)}.ov-store-filter select{width:100%;max-width:100%;min-width:0;font-size:12px;padding-inline:10px 23px}.ov-day-switch button{padding-inline:12px;min-height:36px}.ov-metrics{gap:10px}.ov-metric{padding:14px 12px!important;gap:10px;flex-direction:column}.ov-metric-icon{width:34px;height:34px}.ov-metric-icon svg{width:21px;height:21px}.ov-metric h2{font-size:11px}.ov-metric-value{font-size:22px}.ov-metric-note{font-size:10px;line-height:1.5}.ov-progress-head h2,.ov-section-head h2{font-size:15px}.ov-progress-rate strong{font-size:23px}.ov-progress-rate>span{font-size:11px}.ov-progress-values{align-items:flex-start;flex-direction:column;gap:3px}.ov-progress-values strong{font-size:22px}.ov-progress-foot{gap:5px}.ov-section-head{gap:9px;margin-bottom:12px}.ov-chart-legend{font-size:10px}.ov-chart{min-height:125px}.ov-chart-empty{font-size:10px;width:max-content;max-width:75%}.ov-coverage{font-size:10px}.ov-panel .table-scroll{margin-inline:-2px}.ov-progress-note{font-size:10px}.ov-caption{font-size:10px}}
/* AI provider configuration stays scoped to its own dialog. */
#edit-dialog.ai-settings-dialog{width:min(740px,calc(100vw - 32px));max-height:calc(100dvh - 40px)}
.ai-settings-dialog #dialog-body{padding:22px 26px}
.ai-settings-dialog .ai-settings-intro{display:flex;gap:13px;align-items:flex-start;margin-bottom:24px}
.ai-settings-dialog .ai-settings-mark{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:#e4f4f3;color:#087e88;font-size:17px;font-weight:700}
.ai-settings-dialog .ai-settings-intro strong{font-size:16px;color:#18344c}
.ai-settings-dialog .ai-settings-intro p{margin:5px 0 0;font-size:12px;line-height:1.65;color:#657990}
.ai-settings-dialog .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ai-settings-dialog .form-grid .full{grid-column:1 / -1}
.ai-settings-dialog .form-grid>.form-help{margin:-8px 0 0}
.ai-settings-dialog .field,.ai-settings-dialog #ai-token-field{min-width:0}
.ai-settings-dialog input,.ai-settings-dialog select{max-width:100%;min-width:0}
.ai-settings-dialog [hidden]{display:none!important}
.ai-settings-dialog .ai-key-help{line-height:1.65;padding:10px 12px;border-radius:7px;background:#f2f7fa}
.ai-settings-dialog .ai-key-help.is-changed{background:#fff7e8;color:#8b651e}
.ai-settings-dialog .ai-settings-advanced{margin:20px 0;padding:15px;border:1px solid #e0e9ef;border-radius:9px;background:#fbfdfe}
.ai-settings-dialog .ai-settings-advanced>summary{cursor:pointer;font-size:13px;color:#46617b;min-height:26px}
.ai-settings-dialog .ai-settings-advanced[open]>summary{margin-bottom:16px}
.ai-settings-dialog .ai-connection-test{padding:17px 18px;border:1px solid #cde7e8;border-radius:10px;background:#f5fbfb}
.ai-settings-dialog .ai-connection-test h3{font-size:14px;margin:0}
.ai-settings-dialog .ai-connection-test .split-line{gap:12px;flex-wrap:wrap}
.ai-settings-dialog .ai-saved-state{font-size:12px;line-height:1.7;color:#087f87;margin:12px 0 4px;overflow-wrap:anywhere}
.ai-settings-dialog #ai-test-result{overflow-wrap:anywhere;margin:0}
.ai-settings-dialog .ai-settings-boundary{margin:16px 0;line-height:1.7}
.ai-settings-dialog .dialog-actions{margin-top:20px}
@media(max-width:580px){#edit-dialog.ai-settings-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:8px auto}.ai-settings-dialog #dialog-body{padding:17px}.ai-settings-dialog .form-grid{grid-template-columns:1fr;gap:14px}.ai-settings-dialog .ai-settings-intro{gap:10px;margin-bottom:19px}.ai-settings-dialog .ai-settings-intro strong{font-size:15px}.ai-settings-dialog .ai-settings-advanced{padding:12px}.ai-settings-dialog .ai-connection-test{padding:14px}.ai-settings-dialog input,.ai-settings-dialog select{font-size:16px}.ai-settings-dialog .dialog-actions .button{flex:1}}
/* Six intraday snapshots use one editable DOM on desktop and mobile. */
.realtime-page{min-width:0}.rt-header-card{padding:19px 21px;margin-bottom:17px}.rt-header-card h2{font-size:18px;margin:0 0 6px}.rt-header-card>div>p{font-size:12px;color:var(--muted)}
.rt-header-inputs{display:grid;grid-template-columns:180px minmax(220px,1fr);gap:16px;max-width:660px;margin:18px 0 12px}.rt-header-inputs label{font-size:12px;color:#526b7d;display:grid;gap:7px}.rt-header-inputs input{width:100%;min-width:0;border:1px solid #d2e0e7;border-radius:7px;padding:10px;background:#fff;color:var(--ink);font:inherit}
.rt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:15px 0}.rt-toolbar .actions{flex:none}.rt-toolbar .form-help{margin:0}.rt-table-wrap{overflow:auto;border:1px solid #dce7ed;border-radius:10px;background:#fff;scrollbar-width:thin}
.rt-table{width:100%;min-width:1160px;border-collapse:collapse;font-size:12px}.rt-table thead th{background:#eff6f8;color:#496678;font-size:12px;font-weight:600;line-height:1.6;padding:13px 11px;border-bottom:1px solid #dce7ed;text-align:left;white-space:normal}.rt-table thead th small{font-size:10px;font-weight:400;color:#8195a2}.rt-table tbody td,.rt-table tbody th{padding:14px 9px;vertical-align:top;border-bottom:1px solid #e6edf1;border-right:1px solid #f0f4f6;white-space:normal}.rt-table tbody tr:last-child>td,.rt-table tbody tr:last-child>th{border-bottom:0}
.rt-table .rt-time{min-width:79px;width:79px;background:#f8fbfc;text-align:left}.rt-time strong{display:block;font-size:17px;color:#17495c;line-height:1.3}.rt-row-state{display:block;font-size:10px;font-weight:400;color:#6d8493;margin-top:9px}.rt-revision{display:block;font-size:9px;font-weight:400;color:#96a6b0;margin-top:4px}.rt-is-dirty .rt-time{background:#fff9ec}.rt-is-dirty .rt-row-state{color:#a77420}.rt-has-conflict .rt-time{background:#fff0ef}
.rt-input-grid{display:grid;gap:7px}.rt-four{grid-template-columns:repeat(4,minmax(51px,1fr));min-width:228px}.rt-two{grid-template-columns:repeat(2,minmax(62px,1fr));min-width:140px}.rt-number{display:flex;flex-direction:column;gap:7px;min-width:0;color:#77909e;font-size:10px;font-weight:400}.rt-number>span{white-space:nowrap}.rt-number input,.rt-details-fields input,.rt-details-fields textarea{width:100%;min-width:0;border:1px solid #d6e2e9;border-radius:5px;padding:8px 5px;background:#fff;color:#254a5d;font:inherit;font-size:12px;box-sizing:border-box}.rt-number input{font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}.rt-number input::-webkit-inner-spin-button,.rt-number input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rt-number input:focus,.rt-details-fields input:focus,.rt-details-fields textarea:focus,.rt-header-inputs input:focus{outline:2px solid #b7e2e3;outline-offset:0;border-color:#088c98}.rt-number input:disabled,.rt-details-fields input:disabled,.rt-details-fields textarea:disabled{background:#f3f7f9;color:#587181;opacity:1}
.rt-available output{display:block;padding:8px 4px;min-height:33px;border-radius:5px;background:#edf7f5;color:#138174;font-size:13px;font-weight:600}.rt-available.is-negative output{background:#fff0ed;color:#ba4031}.rt-basis-summary,.rt-competitor-summary,.rt-check{font-size:10px;color:#8294a0;line-height:1.55;margin:9px 0 0;overflow-wrap:anywhere}.rt-check.is-warning{color:#a36f20}.rt-competitor-summary{max-width:190px;color:#5c7b8c}.rt-record{min-width:185px;width:205px}.rt-row-details{font-size:11px;color:#557387}.rt-row-details>summary{cursor:pointer;padding:2px 0 8px;line-height:1.5}.rt-details-fields{display:grid;gap:10px;padding:10px 0}.rt-details-fields>label{display:grid;gap:6px;font-size:11px}.rt-details-fields textarea{min-height:64px;resize:vertical;font-size:12px}.rt-row-details .form-help{font-size:10px;margin:0;line-height:1.6}.rt-row-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}.rt-row-actions .button{padding:6px 8px;font-size:10px;min-height:30px}.rt-saved-by{font-size:9px;color:#93a2ac;margin:8px 0 0;line-height:1.5}.rt-row-error{color:#b84d36;font-size:10px;line-height:1.6;margin:6px 0 0;overflow-wrap:anywhere}.rt-footer-note{margin:16px 0}.rt-reason[hidden]{display:none}.rt-header-card .notice{font-size:11px;margin:10px 0 0}
.rt-history-version{border:1px solid #dce7ed;border-radius:9px;padding:17px;margin-bottom:16px}.rt-history-version h3{font-size:14px;margin:0}.rt-history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 0}.rt-history-grid dt{font-size:11px;color:#7e94a1}.rt-history-grid dd{font-size:14px;color:#24495b;margin:5px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:900px){.rt-table-wrap{overflow:visible;border:0;background:transparent}.rt-table,.rt-table tbody{display:block;min-width:0;width:100%}.rt-table thead{display:none}.rt-table tbody{display:grid;grid-template-columns:1fr;gap:18px}.rt-table tbody tr{display:block;border:1px solid #dce7ed;border-radius:10px;background:#fff;overflow:hidden}.rt-table tbody td,.rt-table tbody th{display:block;width:auto;min-width:0;border:0;border-bottom:1px solid #f0f4f6;padding:14px 17px}.rt-table .rt-time{display:flex;align-items:center;gap:12px;width:auto;min-width:0;padding:14px 17px}.rt-time strong{font-size:19px}.rt-row-state,.rt-revision{display:inline-block;margin:0}.rt-revision{margin-left:auto}.rt-table td[data-group-label]::before{content:attr(data-group-label);display:block;font-size:12px;font-weight:600;color:#446575;margin-bottom:12px}.rt-four{min-width:0;grid-template-columns:repeat(4,minmax(0,1fr))}.rt-two{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}.rt-number{font-size:11px;gap:6px}.rt-number input{font-size:16px;padding:9px 6px}.rt-available output{font-size:17px;padding:9px 6px;min-height:39px}.rt-basis-summary,.rt-competitor-summary,.rt-check{font-size:11px;max-width:none}.rt-row-actions .button{font-size:12px;padding:9px 12px;min-height:38px}.rt-row-actions{gap:8px}.rt-details-fields{grid-template-columns:1fr 1fr;gap:14px}.rt-details-fields input,.rt-details-fields textarea{font-size:16px}.rt-details-fields .rt-reason,.rt-details-fields .form-help{grid-column:1/-1}.rt-row-error{font-size:12px}.rt-saved-by{font-size:11px}}
@media(max-width:580px){.rt-header-card{padding:16px}.rt-header-card h2{font-size:15px;line-height:1.6}.rt-header-inputs{grid-template-columns:1fr;gap:12px}.rt-header-inputs input{font-size:16px}.rt-toolbar{align-items:stretch;flex-direction:column;gap:10px}.rt-toolbar .actions .button{flex:1;text-align:center}.rt-table tbody td,.rt-table .rt-time{padding:13px 14px}.rt-four{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rt-details-fields{grid-template-columns:1fr}.rt-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.rt-five{grid-template-columns:repeat(5,minmax(62px,1fr));min-width:338px}
@media(max-width:900px){.rt-five{min-width:0;grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:580px){.rt-five{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
/* Local headquarters service controls; business pages keep existing layouts. */
.system-console{padding:21px;border:1px solid #d8e5ec;border-radius:12px;background:#f8fcfc;margin-bottom:18px;min-width:0}.system-console-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:17px}.system-console-head h2,.system-console>h2{font-size:20px;line-height:1.4;margin:0;color:#183c4a}.system-console-head p{font-size:12px;color:#7a909d;margin:6px 0 0}.system-version{display:inline-block;font-size:11px;font-weight:500;color:#49818c;background:#e4f2f2;border-radius:5px;padding:4px 7px;margin-left:8px;vertical-align:middle}.system-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.system-service-card{min-width:0;padding:18px 17px;border:1px solid #dce7ec;border-radius:9px;background:#fff}.system-service-card h3{font-size:15px;margin:0}.system-service-card>.split-line{gap:7px;flex-wrap:wrap;align-items:center}.system-service-description{font-size:12px;line-height:1.7;color:#738b98;margin:12px 0 14px;min-height:41px}.system-status-list{display:grid;grid-template-columns:70px minmax(0,1fr);font-size:11px;gap:10px 8px;margin:0 0 17px}.system-status-list dt{color:#899aa6}.system-status-list dd{margin:0;color:#4e6c7e;overflow-wrap:anywhere}.system-service-actions{gap:6px;flex-wrap:wrap;margin:13px 0}.system-service-actions .button{font-size:11px;padding:7px 9px}.system-shutdown{color:#a65848!important;background:#fff9f6!important;border-color:#eddbd4!important;font-size:11px!important}.system-auto{display:flex;align-items:center;gap:7px;margin:13px 0;font-size:11px;color:#526f7f;line-height:1.5}.system-auto input{width:16px;height:16px;min-height:0;flex:none;accent-color:#087f8c}.system-worker-list{display:grid;gap:7px;font-size:11px;color:#597383;margin:12px 0}.system-worker-list>span{display:flex;align-items:center;gap:6px}.system-dot{width:6px;height:6px;border-radius:50%;background:#a8b8c1;display:inline-block}.system-dot.is-alive{background:#45a782}.system-url{font-size:12px;font-weight:600;line-height:1.7;overflow-wrap:anywhere;color:#426f80;padding:10px 11px;border-radius:6px;background:#f0f7f8;margin:12px 0}.system-platform-logins{border-top:1px solid #edf2f5;padding-top:11px;margin-top:12px;display:grid;gap:9px}.system-platform-logins>div{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.system-platform-logins strong{font-size:11px;margin-right:3px;min-width:25px}.system-platform-logins .button{font-size:10px;padding:6px 8px;min-height:30px}.system-service-card>.form-help{font-size:10px;line-height:1.75;margin:11px 0 0}.system-feedback{font-size:12px;color:#16828e;line-height:1.7;margin:14px 0 0}.system-feedback:empty{display:none}.system-events{margin-top:15px;border-top:1px solid #e2ebef;padding-top:13px;font-size:12px;color:#607c8c}.system-events summary{cursor:pointer}.system-events ol{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:8px}.system-events li{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;font-size:11px;line-height:1.6}.system-events time{color:#8a9fab}.system-events span{overflow-wrap:anywhere}.system-clients{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:19px 21px}.system-client{display:grid;grid-template-columns:1fr auto;gap:8px 15px;min-width:0;padding:14px;border:1px solid #e3ebef;border-radius:8px;background:#fbfdfe}.system-client strong{font-size:13px;color:#345667}.system-client>.form-help{grid-column:1/-1;margin:0;font-size:11px;line-height:1.7}.system-client>.button{justify-self:start;font-size:11px}.system-guide{margin-bottom:18px}.system-help-details{padding:16px 21px;border-top:1px solid #e7eef2;font-size:12px;color:#5c7888}.system-help-details summary,.system-advanced>summary{cursor:pointer;font-size:13px;font-weight:550;color:#426777}.system-help-details ol,.system-help-details ul{padding-left:20px;line-height:1.9;margin:13px 0 0}.system-help-details li{padding-bottom:6px}.system-help-details strong{color:#365b6f}.system-help-details .form-help{line-height:1.8}.system-advanced{margin:18px 0;border:1px solid #dfe9ef;border-radius:10px;background:#fff;padding:15px 18px}.system-advanced[open]>summary{margin-bottom:16px}.system-advanced>.card{box-shadow:none;border-color:#e8eef2;margin-bottom:0}
@media(max-width:1250px){.system-grid{grid-template-columns:1fr 1fr}.system-service-card[data-system-card="remote"]{grid-column:1/-1}.system-service-card[data-system-card="remote"] .system-url{max-width:100%}}
@media(max-width:700px){.system-console{padding:15px}.system-console-head{align-items:flex-start;flex-wrap:wrap}.system-console-head h2{font-size:18px}.system-grid{grid-template-columns:1fr}.system-service-card{padding:16px}.system-service-card[data-system-card="remote"]{grid-column:auto}.system-service-description{min-height:0}.system-clients{grid-template-columns:1fr;padding:15px;gap:12px}.system-client{grid-template-columns:1fr}.system-help-details{padding:15px}.system-help-details ol,.system-help-details ul{padding-left:18px}.system-advanced{padding:14px}.system-events li{grid-template-columns:1fr;gap:2px}.system-service-actions .button,.system-platform-logins .button{font-size:12px;padding:9px 10px;min-height:36px}.system-auto{font-size:12px}.system-console .form-help{font-size:11px}}


/* PMS integration phase 1: compact desktop chrome, shared business DOM. */
:root{--green:#2467cf;--green-dark:#174c9e;--green-light:#eaf2ff;--canvas:#f2f4f8;--line:#e0e5ed;--sidebar-width:172px;--radius:5px}
.pms-shell{padding-top:58px;min-width:0}
.pms-header{height:58px;position:fixed;inset:0 0 auto;z-index:45;display:flex;align-items:center;gap:18px;padding:0 22px;background:linear-gradient(100deg,#175cc6,#246ede 72%,#347de8);color:#fff;box-shadow:0 2px 8px #164c941a}
.pms-brand{display:flex;align-items:center;gap:9px;min-width:202px;color:white;text-decoration:none!important;font-size:15px;font-weight:650;white-space:nowrap}
.pms-brand small{display:block;font-size:8px;font-weight:450;letter-spacing:1.7px;color:#cbdfff;line-height:1.5}
.pms-brand-icon{width:32px;height:32px;display:grid;place-items:center;border:1px solid #ffffff70;border-radius:8px;background:#ffffff12;font-weight:750;font-size:21px}
#primary-navigation{display:flex;align-self:stretch;align-items:stretch;gap:2px;min-width:0;flex:1}
.primary-nav-item{padding:0 16px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:550;color:#eaf3ff;white-space:nowrap;border-bottom:3px solid transparent;text-decoration:none!important}
.primary-nav-item:hover{background:#ffffff10;color:#fff}.primary-nav-item.active{background:#ffffff19;border-bottom-color:#b6d8ff;color:#fff}
.pms-ai-shortcut{color:#fff;white-space:nowrap;border:1px solid #ffffff60;border-radius:5px;padding:6px 10px;font-size:12px;background:#ffffff0b}
.pms-shell .sidebar{inset:58px auto 0 0;padding:18px 10px 14px;background:#fff;z-index:30;border-right:1px solid #dce3ed;box-shadow:none}
.business-nav-heading{display:flex;align-items:center;justify-content:space-between;padding:0 12px 15px;font-size:14px;font-weight:650;color:#20334e}
.pms-shell #navigation{gap:5px;overflow:visible;flex:none}
.pms-shell .nav-item{padding:10px 12px;font-size:12px;line-height:1.4;border:0;border-radius:5px;gap:9px;color:#4a5d76;min-height:40px}
.pms-shell .nav-item.active{color:#1b60ca;background:#eaf2ff;font-weight:650}.pms-shell .nav-item:hover{background:#f0f5fc}
.pms-shell .nav-icon{width:16px;height:16px}.pms-shell .nav-icon svg{width:16px;height:16px}
.sidebar-quick{margin:28px 9px 0;border-top:1px solid #e8edf4;padding-top:15px;font-size:10px;color:#8a99ae;letter-spacing:.5px}
#sidebar-shortcuts{display:grid;gap:10px;margin-top:10px}#sidebar-shortcuts a{display:flex;justify-content:space-between;color:#72839a;font-size:11px;letter-spacing:0}#sidebar-shortcuts a:hover{color:#2467cf}
.pms-shell .sidebar-bottom{font-size:10px;line-height:1.6;padding:14px 8px 0;border-top:1px solid #eef1f6}
.pms-shell .main-shell{width:calc(100% - var(--sidebar-width));min-width:0}
.pms-shell .topbar{min-height:41px;padding:5px 20px;border-bottom:1px solid #e5eaf1;background:#fff;gap:10px}
.pms-shell .breadcrumb{font-size:11px;color:#8693a5}.pms-shell .top-actions{gap:7px}.pms-shell .top-actions .button{min-height:27px;padding:4px 9px;font-size:10px;border-radius:4px}
.workspace-tabs-bar{min-width:0;background:#edf1f7;border-bottom:1px solid #dce3ed;padding:7px 12px 0}
#workspace-tabs{display:flex;align-items:stretch;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:thin;white-space:nowrap}
.workspace-tab{display:flex;align-items:center;border:1px solid #dce3ed;border-bottom:0;border-radius:5px 5px 0 0;background:#e6ecf4;min-width:116px;max-width:210px;position:relative}
.workspace-tab.active{background:#fff;border-top:2px solid #2467cf}.workspace-tab-main{display:flex;align-items:center;gap:7px;flex:1;text-align:left;border:0;padding:8px 10px;background:transparent;color:#697c94;font-size:11px;min-width:0;white-space:nowrap}.workspace-tab-main span{overflow:hidden;text-overflow:ellipsis}.workspace-tab.active .workspace-tab-main{color:#215fb9;font-weight:650}.workspace-tab-main i{display:inline-block;width:4px;height:4px;background:#447fd1;border-radius:50%}.workspace-tab-close{padding:1px 7px;border:0;background:transparent;color:#97a5b7;font-size:16px;margin-right:3px}.workspace-tab-close:hover{color:#294b79;background:#edf2f9;border-radius:3px}.workspace-tab-add{border:0;color:#557399;background:transparent;padding:3px 11px;font-size:19px}
.pms-shell #workspace{padding:20px;max-width:none}.pms-shell .page-heading{margin-bottom:16px;align-items:center;gap:12px}.pms-shell .page-heading h1{font-size:20px;color:#213953;font-weight:650;letter-spacing:0}.pms-shell #page-eyebrow{display:none}.pms-shell #page-description{font-size:11px;margin-top:5px;color:#8a98aa}.pms-shell .page-actions{gap:7px}.pms-shell .button{min-height:30px;padding:5px 11px;font-size:11px;border-radius:4px;line-height:1.6}.pms-shell .small-button{min-height:27px;padding:4px 9px;font-size:10px}
.pms-shell .card{border-radius:5px;box-shadow:0 1px 3px #18345903;border-color:#e0e6ef}.pms-shell .card-head{padding:13px 16px}.pms-shell .card-head h2{font-size:14px}.pms-shell .card-head p{font-size:11px}.pms-shell .card-body{padding:15px 16px}.pms-shell .card-foot{padding:10px 16px}.pms-shell .notice{padding:10px 13px;font-size:11px;border-radius:4px;line-height:1.7}.pms-shell .filters{padding:13px 15px;gap:10px 12px;border-radius:5px;margin-bottom:15px;background:#fff}.pms-shell .filters .field{min-width:130px}.pms-shell .filters label{font-size:10px;color:#75869c}.pms-shell .filters input,.pms-shell .filters select{min-height:31px;padding:5px 9px;border-radius:4px;font-size:11px}.pms-shell table{font-size:11px}.pms-shell th{font-size:10px;background:#f4f7fb;color:#6c809a;padding:10px 13px;font-weight:600}.pms-shell td{padding:11px 13px;border-bottom-color:#edf0f5;line-height:1.65}.pms-shell tbody tr:hover{background:#f8faff}.pms-shell .subtext{font-size:10px;color:#92a0b2}.pms-shell .table-scroll{max-height:610px}.pms-shell .scroll-hint{font-size:10px;padding:4px 12px}.pms-shell .metric-label{font-size:11px}.pms-shell .metric-value{font-size:26px}.pms-shell .metric-note{font-size:10px}.pms-shell .badge{font-size:10px;padding:3px 7px;border-radius:4px}.pms-shell .panel-tabs{gap:6px;margin-bottom:15px}.pms-shell .panel-tabs .button{background:white;border-color:#dce5f2}.pms-shell .panel-tabs .active,.pms-shell .panel-tabs [aria-current=page]{color:#2467cf;background:#eaf2ff;border-color:#bcd2f1}.pms-shell .page-footer{font-size:10px;margin-top:20px;color:#95a2b5}.pms-shell .ov-hero{border-radius:6px}.pms-shell .ov-kpi{border-radius:5px}
.pms-shell .rt-table-wrap{border-radius:5px}.pms-shell .rt-table th{padding:10px}.pms-shell .rt-table td{padding:12px 10px}.pms-shell .rt-number input{font-size:12px;min-height:32px}.pms-shell .rt-time strong{font-size:15px}
.catalog-intro{display:flex;gap:18px;align-items:center;background:#fff;border:1px solid #dfe7f2;border-radius:6px;padding:22px;margin-bottom:18px}.catalog-intro h2{font-size:18px}.catalog-intro p{font-size:12px;margin-top:7px;color:#8090a5}.catalog-mark{font-size:20px;color:#2f6eca;background:#eaf2ff;border-radius:10px;padding:17px;font-weight:750;white-space:nowrap}.pms-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.pms-module{padding:17px;display:flex;flex-direction:column;gap:12px;min-width:0}.pms-module>div{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.pms-module p{font-size:12px;color:#60748c;line-height:1.8}.pms-module small{font-size:11px;color:#97a4b5;line-height:1.7}.pms-module>a,.module-unavailable{margin-top:auto;padding-top:10px;font-size:11px;border-top:1px solid #edf1f6}.module-unavailable{color:#a4afbe}
.ai-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;min-height:600px;align-items:start}.ai-history-panel{border:1px solid #dfe6ef;border-radius:5px;background:white;min-width:0;overflow:hidden}.ai-history-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 13px;border-bottom:1px solid #e8edf5;gap:6px}.ai-history-heading h2{font-size:14px}.ai-history-heading .small{font-size:10px}.ai-history-heading .button{white-space:nowrap}.ai-history-list{max-height:520px;overflow:auto;padding:8px}.ai-history-item{display:flex;flex-direction:column;width:100%;gap:5px;padding:11px;border:1px solid transparent;border-radius:4px;margin-bottom:4px;text-align:left;background:#fff;color:#607087}.ai-history-item:hover{background:#f5f8fc}.ai-history-item.selected{background:#edf4ff;border-color:#d4e4fc}.ai-history-item strong{font-weight:550;font-size:12px;color:#354d6b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.ai-history-item span{font-size:10px;overflow-wrap:anywhere}.ai-history-item small{font-size:9px;color:#94a1b3}.ai-provider-note{padding:15px;background:#fafbfd;border-top:1px solid #e9eef5;display:flex;flex-direction:column;gap:5px}.ai-provider-note strong{font-size:12px;color:#315481}.ai-provider-note span{font-size:10px;color:#7f8da1;overflow-wrap:anywhere}.ai-provider-note p{font-size:10px;color:#95a1b2;line-height:1.8}.ai-history-pagination{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;font-size:10px;flex-wrap:wrap}.ai-conversation-panel{min-width:0;margin:0!important}.ai-conversation-panel .card-head{min-height:69px}.ai-conversation-panel .chat-messages{height:440px;min-height:280px;max-height:65vh;overflow:auto;padding:22px;background:#fbfcfe}.ai-conversation-panel .chat-compose{padding:18px;border-top:1px solid #e7edf5}.ai-conversation-panel textarea{min-height:90px;border-radius:5px;font-size:12px}.ai-new-scope{display:grid;grid-template-columns:1fr 1.6fr;gap:12px;margin-bottom:12px}.ai-new-scope label{font-size:11px}.ai-new-scope select{min-height:33px;font-size:11px}.ai-conversation-panel .chat-message{max-width:95%;font-size:12px;border:1px solid #e2e9f2;padding:15px;background:white;border-radius:7px}.ai-conversation-panel .chat-message.user{background:#edf4ff;border-color:#dce8fa}.message-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;align-items:center;margin-bottom:7px}.message-meta .speaker{font-size:11px;color:#3c5f8e;margin:0}.message-meta time{font-size:9px;color:#93a1b5}.message-memory-action{margin-top:12px;padding-top:8px;border-top:1px solid #edf1f7}.message-memory-action .button{background:transparent;border-color:transparent;color:#7189a9;padding-left:0}.ai-message-paging{display:flex;gap:10px;align-items:center;padding:8px 15px;border-bottom:1px solid #eef1f5}.ai-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;padding:54px 20px 35px;gap:13px}.ai-welcome>span{font-size:35px;color:#367ada;width:66px;height:66px;line-height:66px;background:#eaf2ff;border-radius:18px}.ai-welcome h2{font-size:20px;color:#2b486a}.ai-welcome p{font-size:12px;line-height:1.9;color:#92a0b4;max-width:400px}.ai-welcome>div{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:13px}.ai-welcome b{font-weight:500;padding:7px 11px;border:1px solid #e2eaf5;border-radius:4px;font-size:10px;color:#728ba9;background:white}
.memory-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0 21px}.memory-intro h2{font-size:17px}.memory-intro p{font-size:11px;color:#8b99ad;margin-top:5px}.ai-memory-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.ai-memory-card{min-width:0;display:flex;flex-direction:column}.ai-memory-card .card-head{align-items:flex-start}.ai-memory-card .card-body{flex:1}.memory-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.9;color:#405672}.memory-evidence{display:grid;grid-template-columns:70px minmax(0,1fr);gap:6px;margin:18px 0 0;padding-top:14px;border-top:1px solid #edf1f6;font-size:10px;color:#91a0b4}.memory-evidence dd{margin:0;overflow-wrap:anywhere;color:#72869e}.memory-item-actions{padding:10px 15px;display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid #e9eef5;background:#fafcfe}.market-last-success{display:flex;flex-direction:column;gap:3px;padding:8px;margin-top:6px;background:#fff8ec;border-left:2px solid #d8a757;max-width:290px;color:#9b7945;font-size:10px}.market-last-success strong{font-size:11px;font-weight:500}.market-last-success span{font-size:9px;line-height:1.6}
@media(min-width:1700px){.pms-shell #workspace{padding:24px 30px}.pms-module-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.ai-workspace{grid-template-columns:290px minmax(0,1fr)}}
@media(max-width:1250px){.pms-header{padding:0 15px;gap:8px}.pms-brand{min-width:181px;font-size:13px}.primary-nav-item{padding:0 11px;font-size:12px}.pms-ai-shortcut{display:none}.pms-shell .top-download{display:none}.pms-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-workspace{grid-template-columns:225px minmax(0,1fr)}.pms-shell #workspace{padding:17px}}
@media(max-width:900px){.pms-shell{display:block;padding-top:100px}.pms-header{height:100px;display:grid;grid-template-columns:1fr;grid-template-rows:50px 50px;gap:0;padding:0}.pms-brand{padding:0 16px;min-width:0;font-size:14px}.pms-brand-icon{height:28px;width:28px;font-size:17px}.pms-brand small{font-size:7px}.pms-header #primary-navigation{display:flex;width:100%;overflow:auto;border-top:1px solid #ffffff18;padding:0 5px;scrollbar-width:none}.primary-nav-item{padding:0 15px;font-size:12px;flex:none}.pms-shell .sidebar{position:relative;inset:auto;width:100%;padding:0;border-right:0;border-bottom:1px solid #e1e8f1}.business-nav-heading{padding:9px 16px;font-size:12px;min-height:43px}.pms-shell .nav-toggle{display:block!important;font-size:11px;padding:3px 8px;min-width:0;border:1px solid #dbe4f1;border-radius:4px}.pms-shell #navigation{display:none}.pms-shell .sidebar.nav-open #navigation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:7px 13px 13px;gap:5px;border-top:1px solid #edf1f6}.sidebar-quick,.pms-shell .sidebar-bottom{display:none}.pms-shell .main-shell{width:100%;margin:0}.pms-shell .topbar{padding:5px 15px;min-height:35px}.pms-shell .topbar #clock-label{font-size:10px}.workspace-tabs-bar{padding:5px 9px 0}.workspace-tab-main{padding:8px;font-size:10px}.workspace-tab{min-width:105px}.pms-shell #workspace{padding:16px}.pms-shell .page-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:15px}.pms-shell .page-heading h1{font-size:19px}.pms-shell .page-heading #page-description{line-height:1.8;font-size:11px}.pms-shell .page-heading .actions{justify-content:flex-start}.pms-shell .filters{padding:12px;gap:10px}.pms-shell .filters .field{min-width:120px}.pms-shell .filters input,.pms-shell .filters select{min-height:36px;font-size:12px}.pms-shell .button{min-height:33px;font-size:11px}.pms-shell .rt-table-wrap{border:0}.pms-shell .rt-table th{padding:13px}.pms-shell .rt-table td{padding:13px}.ai-workspace{grid-template-columns:1fr}.ai-history-panel{display:grid;grid-template-columns:1fr}.ai-history-list{display:flex;gap:7px;max-height:150px;overflow-x:auto}.ai-history-item{min-width:215px;max-width:250px}.ai-provider-note{display:none}.ai-history-heading{padding:11px 13px}.ai-conversation-panel .chat-messages{height:400px}.ai-memory-list{grid-template-columns:1fr}.memory-intro{align-items:flex-start;flex-direction:column;padding:12px 0 16px}}
@media(max-width:580px){.pms-shell #workspace{padding:12px}.pms-shell .page-heading h1{font-size:18px}.pms-shell .topbar{padding:4px 12px}.pms-shell .topbar .breadcrumb{display:none}.pms-shell .top-actions{width:100%;justify-content:space-between}.pms-shell .sidebar.nav-open #navigation{grid-template-columns:repeat(2,minmax(0,1fr))}.pms-shell .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.pms-shell .filters .field{min-width:0}.pms-shell .filters .field input,.pms-shell .filters .field select{width:100%;min-width:0}.pms-shell .card-head{padding:12px}.pms-shell .card-body{padding:13px}.pms-shell td{padding:10px}.pms-module-grid{grid-template-columns:1fr}.catalog-intro{padding:15px;gap:12px;align-items:flex-start}.catalog-mark{font-size:13px;padding:12px 8px}.catalog-intro h2{font-size:15px}.catalog-intro p{font-size:11px}.pms-module{padding:15px}.ai-conversation-panel .chat-messages{padding:12px;height:380px}.ai-conversation-panel .chat-message{max-width:100%;padding:12px}.ai-conversation-panel .chat-compose{padding:12px}.ai-new-scope{grid-template-columns:1fr;gap:8px}.ai-welcome{padding:35px 9px 25px}.ai-welcome h2{font-size:17px}.ai-welcome p{font-size:11px}.ai-conversation-panel .split-line{gap:10px;align-items:flex-end}.ai-conversation-panel .split-line .small{max-width:180px;font-size:10px}.ai-conversation-panel .suggestions{gap:5px}.ai-conversation-panel .suggestions .button{font-size:10px;padding:4px 7px}.memory-evidence{grid-template-columns:60px minmax(0,1fr)}.pms-shell .page-footer{flex-direction:column;align-items:flex-start;gap:5px}}

/* Daily-report trends, scoped to the overview panel. */
.rt-panel .rt-heading{align-items:flex-start;gap:20px;flex-wrap:wrap}.rt-panel .rt-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.rt-controls label{display:grid;gap:5px;font-size:11px;color:#60758e}.rt-controls select,.rt-controls input{min-height:37px;border:1px solid #dce6ee;border-radius:6px;padding:6px 10px;background:#fff;color:#203650;font:inherit;font-size:12px;max-width:100%;min-width:0}.rt-controls select:focus,.rt-controls input:focus{outline:2px solid #078b9c;outline-offset:2px}.rt-legend{display:flex;gap:7px 14px;flex-wrap:wrap;margin:16px 0}.rt-legend-item{display:inline-flex;align-items:center;gap:7px;border:1px solid #e2ebf1;background:#f9fbfd;color:#304760;border-radius:6px;padding:7px 10px;font-size:12px;cursor:pointer}.rt-legend-item i{display:inline-block;width:9px;height:9px;border-radius:50%;flex-shrink:0}.rt-legend-item.is-muted{color:#8b98a8;opacity:.6;text-decoration:line-through}.rt-legend-item:focus-visible{outline:2px solid #078b9c;outline-offset:2px}.rt-latest{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:12px;margin-bottom:18px}.rt-latest>div{padding:12px 14px;background:#f6f9fc;border-radius:7px;min-width:0}.rt-latest span{font-size:11px;color:#6d7e95;display:block;margin-bottom:5px}.rt-latest strong{font-size:21px;font-weight:650;line-height:1.3;overflow-wrap:anywhere;color:#19374b}.rt-latest small{font-size:11px;font-weight:400;color:#708397;margin-left:5px}.rt-plot-wrap{position:relative;min-width:0}.rt-chart{display:block;width:100%;height:auto;overflow:visible}.rt-grid{stroke:#e6eef4;stroke-width:1}.rt-axis{fill:#6e8097;font-family:inherit;font-size:11px}.rt-line{fill:none;stroke-width:2.3;stroke-linejoin:round;stroke-linecap:round}.rt-point{fill:#fff;stroke-width:2;cursor:pointer}.rt-point:hover,.rt-point:focus{stroke-width:4;outline:none;fill:#ecf9fa}.rt-point-warning{fill:#ffe3ae}.rt-empty{position:absolute;inset:35% 8% auto 18%;padding:14px;text-align:center;background:#fffffff0;font-size:13px;color:#8190a3;border-radius:7px}.rt-tooltip{background:#f3f8fb;border:1px solid #e2ecf3;border-radius:7px;min-height:42px;padding:11px 14px;color:#61768c;font-size:12px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;line-height:1.6}.rt-tooltip strong{color:#173b4c}.rt-tooltip b{font-weight:600;color:#214b5d}.rt-basis{font-size:11px;color:#76869c;line-height:1.8;margin:12px 0 0}.rt-cell-coverage{display:block;color:#8191a6;font-size:10px;white-space:nowrap;margin-top:4px}.rt-panel .rt-detail{margin-top:12px}.rt-panel .rt-detail table{min-width:500px}.rt-panel .rt-detail td{font-variant-numeric:tabular-nums}.rt-panel .rt-notice{margin:8px 0 12px}.rt-panel #report-trend-plot{min-width:0}
@media(max-width:700px){.rt-panel .rt-controls{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px}.rt-controls label:last-child{grid-column:1/-1}.rt-controls select,.rt-controls input{width:100%;font-size:13px;min-height:40px}.rt-latest{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.rt-latest>div{padding:10px}.rt-latest strong{font-size:19px}.rt-legend{gap:7px;margin:12px 0}.rt-legend-item{padding:7px 8px;font-size:11px}.rt-tooltip{font-size:11px;gap:4px 12px;padding:10px}.rt-panel .rt-heading h2{font-size:17px}.rt-panel .rt-heading{gap:14px}.rt-basis{font-size:11px}.rt-empty{font-size:12px;padding:10px}.rt-axis{font-size:10px}}

.rt-line.rt-series-0,.rt-point.rt-series-0{stroke:#2563eb}.rt-legend-item i.rt-swatch-0{background:#2563eb}
.rt-line.rt-series-1,.rt-point.rt-series-1{stroke:#0d9488}.rt-legend-item i.rt-swatch-1{background:#0d9488}
.rt-line.rt-series-2,.rt-point.rt-series-2{stroke:#f59e0b}.rt-legend-item i.rt-swatch-2{background:#f59e0b}
.rt-line.rt-series-3,.rt-point.rt-series-3{stroke:#9333ea}.rt-legend-item i.rt-swatch-3{background:#9333ea}
.rt-line.rt-series-4,.rt-point.rt-series-4{stroke:#e11d48}.rt-legend-item i.rt-swatch-4{background:#e11d48}
.rt-line.rt-series-5,.rt-point.rt-series-5{stroke:#64748b}.rt-legend-item i.rt-swatch-5{background:#64748b}

/* mobile-workbench-v1: one authorized workspace, phone presentation only. */
.mobile-navigation, #mobile-help, .mobile-help-button { display: none; }
@media (max-width: 700px) {
  .pms-shell { padding-top: calc(56px + env(safe-area-inset-top, 0px)); padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .pms-shell .pms-header { height: calc(56px + env(safe-area-inset-top, 0px)); display: flex; padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); }
  .pms-shell .pms-brand { padding: 0; min-height: 44px; font-size: 15px; }
  .pms-shell .pms-brand small { display: none; }
  .pms-shell #primary-navigation, .pms-shell .sidebar, .pms-shell .workspace-tabs-bar, .pms-shell .pms-ai-shortcut { display: none; }
  .pms-shell .main-shell { width: 100%; max-width: 100%; min-width: 0; margin: 0; }
  .pms-shell .topbar { padding: 8px 12px; min-height: 60px; }
  .pms-shell .topbar .breadcrumb { display: none; }
  .pms-shell .top-actions { width: 100%; min-width: 0; gap: 6px; justify-content: flex-start; }
  .pms-shell .top-actions #clock-label { flex-basis: 100%; font-size: 11px; }
  .pms-shell .top-actions > .button { flex: 1 1 auto; min-height: 44px; padding: 8px; font-size: 13px; justify-content: center; }
  .pms-shell .top-actions .top-download { display: none; }
  #mobile-help, .mobile-help-button { display: inline-flex; align-items: center; justify-content: center; }
  .login-card .mobile-help-button { width: 100%; min-height: 44px; font-size: 14px; margin-top: 10px; }
  .pms-shell #workspace { width: 100%; min-width: 0; padding: 16px max(12px, env(safe-area-inset-right, 0px)) 20px max(12px, env(safe-area-inset-left, 0px)); }
  .pms-shell .page-heading h1 { font-size: 21px; line-height: 1.4; }
  .pms-shell #page-description { font-size: 12px; }
  .pms-shell .button, .pms-shell .small-button, .pms-shell .row-actions .button,
  #edit-dialog .button, #edit-dialog .icon-button { min-height: 44px; padding: 9px 12px; font-size: 13px; }
  #edit-dialog .icon-button { min-width: 44px; flex: none; }
  .pms-shell input:not([type="checkbox"]):not([type="radio"]),
  .pms-shell select, .pms-shell textarea,
  #edit-dialog input:not([type="checkbox"]):not([type="radio"]),
  #edit-dialog select, #edit-dialog textarea { min-height: 44px; font-size: 16px; max-width: 100%; }
  .pms-shell .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 12px; }
  .pms-shell .filters .field { min-width: 0; max-width: 100%; }
  .pms-shell .filters label { font-size: 12px; }
  .pms-shell .filters .wide { grid-column: 1 / -1; }
  .pms-shell .panel-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
  .pms-shell .panel-tabs .button { flex: 1 1 auto; }
  .pms-shell .page-footer { font-size: 11px; overflow-wrap: anywhere; }

  .mobile-navigation { position: fixed; inset: auto 0 0; z-index: 60; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 66px; padding: 5px max(6px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); background: #fff; border-top: 1px solid #dbe5ef; box-shadow: 0 -4px 18px #17324d0b; }
  .mobile-navigation .mobile-nav-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; min-width: 0; padding: 5px 2px; border: 0; border-radius: 8px; background: transparent; color: #64758b; text-decoration: none; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; }
  .mobile-navigation .mobile-nav-link.active,
  .mobile-navigation .mobile-nav-link[aria-current="page"],
  .mobile-navigation .mobile-nav-link[aria-expanded="true"] { color: #175bc4; background: #edf4ff; font-weight: 650; }
  .mobile-navigation .nav-icon, .mobile-navigation .nav-icon svg { display: block; width: 23px; height: 23px; }
  .mobile-navigation .nav-icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-navigation .mobile-nav-link:focus-visible,
  #mobile-menu a:focus-visible { outline: 2px solid #2467cf; outline-offset: -2px; }
  #mobile-menu h3 { font-size: 14px; margin: 20px 0 10px; color: #667a92; }
  #mobile-menu > :first-child h3, #mobile-menu > h3:first-child { margin-top: 0; }
  #mobile-menu .mobile-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #mobile-menu .mobile-menu-grid a { display: flex; align-items: center; min-height: 48px; min-width: 0; padding: 12px; border: 1px solid #dce6f0; border-radius: 8px; background: #f8fafd; color: #294a71; font-size: 14px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }

  .ov-filters { width: 100%; min-width: 0; flex-wrap: wrap; gap: 10px; }
  .ov-filters .ov-day-switch { display: flex; }
  .ov-day-switch button { min-height: 44px; padding-inline: 15px; font-size: 13px; }
  .ov-filters .ov-store-filter { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; max-width: 100%; min-width: 0; }
  .ov-store-filter > span { display: block; font-size: 12px; }
  .ov-store-filter select { width: 100%; max-width: 100%; min-width: 0; }
  .ov-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-panel { padding: 16px 13px; }
  .ov-section-head { flex-wrap: wrap; }
  .ov-row-button { min-height: 44px; font-size: 13px; padding: 9px 12px; }

  /* Keep the same rows, handlers and hidden pagination state on small screens. */
  .pms-shell .table-scroll:has(> .mobile-card-table),
  .pms-shell .table-scroll:has(> .ov-store-table) { max-height: none; overflow: visible; }
  .pms-shell .scroll-hint:has(+ .table-scroll > .mobile-card-table) { display: none; }
  .pms-shell .mobile-card-table, .pms-shell .ov-store-table,
  .pms-shell .mobile-card-table tbody, .pms-shell .ov-store-table tbody { display: block; width: 100%; min-width: 0; }
  .pms-shell .mobile-card-table thead, .pms-shell .ov-store-table thead { display: none; }
  .pms-shell .mobile-card-table tbody > tr,
  .pms-shell .ov-store-table tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 0 0 12px; padding: 12px; border: 1px solid #dce6ef; border-radius: 9px; background: #fff; }
  .pms-shell .mobile-card-table tbody > tr:last-child,
  .pms-shell .ov-store-table tbody > tr:last-child { margin-bottom: 0; }
  .pms-shell .mobile-card-table td,
  .pms-shell .ov-store-table td,
  .pms-shell .ov-store-table tbody th { display: block; min-width: 0; max-width: 100%; width: auto; padding: 10px 0; border: 0; border-bottom: 1px solid #edf1f6; background: transparent; font-size: 15px; line-height: 1.6; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .pms-shell .mobile-card-table td[data-label]::before,
  .pms-shell .ov-store-table td[data-label]::before { display: block; content: attr(data-label); margin: 0 0 4px; color: #788ba2; font-size: 11px; font-weight: 400; }
  .pms-shell .mobile-card-table td:first-child,
  .pms-shell .ov-store-table tbody th { grid-column: 1 / -1; padding-top: 0; color: #213b5a; font-size: 15px; font-weight: 600; }
  .pms-shell .mobile-card-table td:first-child::before { display: none; }
  .pms-shell .mobile-card-table td:last-child,
  .pms-shell .ov-store-table .ov-row-action { grid-column: 1 / -1; border-bottom: 0; padding-bottom: 0; }
  .pms-shell .mobile-card-table .row-actions { min-width: 0; gap: 8px; }
  .pms-shell .mobile-card-table .subtext { font-size: 12px; color: #6f8299; }
  .pms-shell .mobile-card-table [hidden], .pms-shell .ov-store-table [hidden] { display: none !important; }

  .rt-panel .rt-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-panel .rt-controls label { min-width: 0; font-size: 12px; }
  .rt-panel .rt-controls select, .rt-panel .rt-controls input { font-size: 16px; min-height: 44px; }
  .rt-legend-item { min-height: 44px; padding: 9px 10px; font-size: 12px; }
  .rt-panel .rt-plot-wrap { overflow-x: auto; overflow-y: hidden; max-width: 100%; -webkit-overflow-scrolling: touch; padding-block: 4px; }
  .rt-panel .rt-chart { min-width: 360px; }
  .rt-panel .rt-axis { font-size: 11px; }
  .rt-tooltip { font-size: 12px; overflow-wrap: anywhere; }
  .rt-table .rt-number input { min-height: 44px; font-size: 16px; }
  .rt-table .rt-number, .rt-table .rt-row-details { font-size: 12px; }
  .rt-table .rt-row-actions .button { min-height: 44px; font-size: 13px; }
  .rt-table .rt-row-details > summary { min-height: 44px; display: flex; align-items: center; }

  #edit-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); margin: auto; border-radius: 12px; overflow: auto; overscroll-behavior: contain; }
  #edit-dialog .dialog-head { min-height: 64px; padding: 10px 12px; }
  #edit-dialog .dialog-head h2 { font-size: 17px; overflow-wrap: anywhere; }
  #edit-dialog .dialog-body { padding: 16px 13px max(16px, env(safe-area-inset-bottom, 0px)); }
  #edit-dialog.report-detail-dialog .report-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #edit-dialog.report-detail-dialog .report-detail-cell.full { grid-column: 1 / -1; }
  #edit-dialog.report-drawer[open] { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #edit-dialog.report-drawer .dialog-head { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  #edit-dialog.report-drawer .dialog-body { padding: 0; overflow: hidden; }
  #edit-dialog.report-drawer .report-editor-footer { flex-wrap: wrap; padding: 10px 12px max(10px, env(safe-area-inset-bottom, 0px)); }
  #edit-dialog.report-drawer .report-editor-footer .button { min-height: 44px; font-size: 13px; }
  #edit-dialog.report-drawer .report-upload-caption { display: none; }
  #edit-dialog .dialog-actions { flex-wrap: wrap; gap: 8px; }
}
/* end mobile-workbench-v1 */

/* Explicit partial-data trend basis. */
.rt-coverage-control{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#657892;margin-bottom:12px}.rt-coverage-control select{width:auto;max-width:100%;min-height:36px;border:1px solid #dbe4ef;border-radius:6px;background:#fff;color:#233855;padding:7px 10px}
