:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #18212b;
  --muted: #647182;
  --line: #dfe5eb;
  --accent: #1f5f99;
  --accent-dark: #174a77;
  --ready-bg: #e8f5ed;
  --ready-text: #23633c;
  --work-bg: #fff5db;
  --work-text: #805d00;
  --planned-bg: #eef1f4;
  --planned-text: #4c5968;
  --blocked-bg: #fdecec;
  --blocked-text: #8a2f2f;
}

/* KIP Tracker — Kaldi’s product workspace. */
.tracker-page {
  --tracker-soft: #faf8f4;
  --tracker-berry-soft: #f7e8f3;
  --tracker-sun-soft: #fff6d6;
  display: grid;
  gap: 24px;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.tracker-header { min-height: 132px; align-items: end; gap: 24px; }
.tracker-header h1 { margin: 4px 0 10px; font-size: clamp(34px, 4vw, 54px); font-weight: 800; line-height: .98; letter-spacing: -.045em; }
.tracker-header p { max-width: 820px; margin: 0; color: var(--muted); }
.tracker-header .eyebrow, .tracker-stage-number { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.tracker-actions, .tracker-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tracker-page a.primary, .tracker-page a.secondary-button { display: inline-flex; align-items: center; justify-content: center; }
.tracker-meta-line > span:not(.tracker-chip) { color: var(--muted); font-size: 13px; font-weight: 700; }
.tracker-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tracker-kpi { position: relative; min-height: 126px; padding: 20px 19px 17px 23px; display: grid; align-content: space-between; gap: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tracker-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--primary); }
.tracker-kpi-done::before { background: var(--success); }
.tracker-kpi-deleted::before { background: #8b8781; }
.tracker-kpi:hover, .tracker-kpi:focus-visible { border-color: rgba(149, 0, 117, .5); box-shadow: 0 12px 28px rgba(42, 41, 38, .11); transform: translateY(-1px); }
.tracker-kpi.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.tracker-kpis span, .tracker-kpis small { color: var(--muted); font-size: 12px; }
.tracker-kpis span { font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.tracker-kpis strong { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.tracker-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 16px; }
.tracker-toolbar form { display: flex; flex-wrap: wrap; gap: 8px; }
.tracker-toolbar input, .tracker-toolbar select { min-width: 160px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--tracker-soft); }
.segmented a { min-height: 44px; padding: 0 15px; display: inline-flex; align-items: center; border-radius: var(--radius-sm); color: var(--muted); font-weight: 750; text-decoration: none; }
.segmented a.active { background: var(--surface); color: var(--primary); box-shadow: 0 3px 12px rgba(42, 41, 38, .08); }
.tracker-roadmap { display: grid; gap: 18px; }
.tracker-stage-card { overflow: hidden; border-top: 4px solid var(--primary); }
.tracker-stage-card.has-warning { border-top-color: var(--warning); }
.tracker-stage-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.tracker-stage-card.is-planning { border-top-color: var(--secondary); }
.tracker-stage-card.is-collapsed { padding-top: 14px; padding-bottom: 14px; }
.tracker-stage-card.is-collapsed .tracker-stage-summary h2 { margin: 2px 0; font-size: 18px; }
.tracker-stage-card.is-collapsed .tracker-stage-state > strong { font-size: 20px; }
.tracker-collapse-button, .tracker-icon-button, .tracker-link-button { min-width: 44px; min-height: 44px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--primary); cursor: pointer; font: inherit; font-weight: 800; }
.tracker-collapse-button:hover, .tracker-icon-button:hover, .tracker-link-button:hover { border-color: var(--primary); background: var(--tracker-berry-soft); }
.tracker-collapse-button > span[aria-hidden] { font-size: 22px; transition: transform .16s ease; }
.tracker-stage-card.is-collapsed .tracker-collapse-button > span[aria-hidden] { transform: rotate(-90deg); }
.tracker-stage-title { min-width: 0; }
.tracker-stage-card h2 { margin: 6px 0 8px; font-size: 23px; font-weight: 800; }
.tracker-stage-card h2 a { color: inherit; text-decoration: none; }
.tracker-stage-card h2 a:hover { color: var(--primary); }
.tracker-stage-card p { margin: 0; color: var(--muted); white-space: pre-line; }
.tracker-stage-state { min-width: 150px; display: grid; justify-items: end; gap: 8px; }
.tracker-stage-state > strong { font-size: 32px; font-weight: 800; letter-spacing: -.04em; }
.tracker-stage-state > small { color: var(--muted); }
.tracker-stage-body { margin-top: 16px; }
.tracker-stage-description { margin: 0 0 14px; color: var(--muted); white-space: pre-line; }
.tracker-payment { min-height: 28px; width: fit-content; padding: 4px 10px; display: inline-flex; align-items: center; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 800; }
.tracker-payment-unpaid { border-color: #e4b0ac; background: #fff1ef; color: #9a302a; }
.tracker-payment-paid { border-color: #b7d6a4; background: #edf7e8; color: #2f7305; }
.tracker-link-button { min-height: 32px; min-width: 0; padding: 4px 10px; color: var(--muted); font-size: 12px; }
.tracker-stage-quick-form { margin: 14px 0 18px; padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; gap: 10px; align-items: end; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tracker-soft); }
.tracker-stage-quick-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.progress-track { height: 8px; margin: 20px 0; overflow: hidden; border-radius: 999px; background: #efede8; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #c642a6 72%, var(--secondary)); }
.tracker-chip { min-height: 28px; width: fit-content; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.1; }
.tracker-chip > span[aria-hidden] { width: 14px; text-align: center; font-size: 14px; line-height: 1; }
.tracker-status-planned { border-color: #dcd7cf; background: #f2f0ec; color: #5f5b55; }
.tracker-status-in_progress { border-color: #e7bbdb; background: var(--tracker-berry-soft); color: #76005d; }
.tracker-status-waiting { border-color: #ebcf75; background: var(--tracker-sun-soft); color: #795400; }
.tracker-status-done { border-color: #b7d6a4; background: #edf7e8; color: #2f7305; }
.tracker-status-cancelled { border-color: #d6d2cb; background: #efede8; color: #68645e; text-decoration: line-through; }
.tracker-task-tree, .tracker-task-tree ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tracker-task-tree ul { margin: 8px 0 0 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.tracker-task-tree-scope { display: grid; gap: 10px; }
.tracker-tree-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tracker-task-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tracker-task-line.has-branch { grid-template-columns: auto minmax(0, 1fr) auto; }
.tracker-branch-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--primary); cursor: pointer; }
.tracker-branch-toggle:hover { border-color: var(--primary); background: var(--tracker-berry-soft); }
.tracker-branch-toggle span { font-size: 21px; transition: transform .16s ease; }
.is-branch-collapsed > .tracker-task-line .tracker-branch-toggle span { transform: rotate(-90deg); }
.tracker-task-row { min-height: 52px; padding: 9px 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto 120px auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.tracker-task-row:hover { border-color: rgba(149, 0, 117, .45); box-shadow: 0 7px 20px rgba(42, 41, 38, .07); transform: translateY(-1px); }
.tracker-task-row > span:first-child { display: grid; gap: 2px; }
.tracker-task-row small, .tracker-row-meta { color: var(--muted); font-size: 12px; }
.tracker-task-row.is-overdue { border-left: 5px solid var(--danger); }
.tracker-overdue { grid-column: 1 / -1; color: var(--danger); font-size: 12px; font-weight: 800; }
.tracker-row-actions { display: flex; align-items: center; gap: 4px; }
.tracker-row-actions form { margin: 0; }
.tracker-icon-button { width: 44px; padding: 0; }
.tracker-flat-list { display: grid; gap: 8px; }
.tracker-flat-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tracker-flat-item > a { min-height: 48px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.tracker-kanban { display: grid; grid-template-columns: repeat(5, minmax(280px, 1fr)); gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.tracker-kanban-column { min-height: 390px; padding: 12px; display: grid; align-content: start; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--tracker-soft); scroll-snap-align: start; }
.tracker-kanban-column > header { min-height: 44px; padding: 4px 3px; display: flex; justify-content: space-between; align-items: center; }
.tracker-kanban-column h2 { margin: 0; font-size: 15px; font-weight: 800; }
.tracker-kanban-column > header span { min-width: 30px; min-height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 12px; font-weight: 800; }
.tracker-kanban-column > div { display: grid; gap: 10px; }
.tracker-kanban-card { padding: 15px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 7px 20px rgba(42, 41, 38, .05); }
.tracker-kanban-card:focus-within, .tracker-kanban-card:hover { border-color: rgba(149, 0, 117, .45); }
.tracker-kanban-card a { min-height: 44px; display: grid; align-content: center; gap: 4px; color: inherit; text-decoration: none; }
.tracker-kanban-card small, .tracker-kanban-card p, .tracker-kanban-card footer { color: var(--muted); font-size: 12px; }
.tracker-kanban-card p { margin: 0; }
.tracker-kanban-card footer { display: flex; justify-content: space-between; gap: 8px; }
.tracker-kanban-card .tracker-row-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
.tracker-context-menu { position: fixed; z-index: 40; width: min(320px, calc(100vw - 16px)); padding: 14px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 18px 50px rgba(42, 41, 38, .22); }
.tracker-context-menu[hidden] { display: none; }
.tracker-context-menu form, .tracker-context-menu label { display: grid; gap: 8px; }
.tracker-context-menu strong { color: var(--primary); }
.tracker-relation-count { width: fit-content; color: var(--secondary); font-size: 12px; font-weight: 850; white-space: nowrap; }
.tracker-create-grid, .tracker-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tracker-create-grid details, .tracker-section { padding: 22px; }
.tracker-create-grid summary, .tracker-section > summary, .tracker-section details > summary { min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 800; }
.tracker-form-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tracker-form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; }
.tracker-form-grid .span-2 { grid-column: span 2; }
.tracker-form-grid button { align-self: end; }
.tracker-breadcrumb { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tracker-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; color: var(--primary); font-weight: 750; }
.tracker-markdown { min-height: 60px; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.6; }
.tracker-facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tracker-facts div { padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tracker-soft); }
.tracker-facts dt { color: var(--muted); font-size: 12px; }
.tracker-facts dd { margin: 5px 0 0; font-weight: 750; }
.tracker-comments, .tracker-source-list, .tracker-file-list, .tracker-revisions { margin: 16px 0; display: grid; gap: 11px; }
.tracker-comment, .tracker-source-list article, .tracker-file, .tracker-revisions article { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tracker-comment header { margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tracker-comment header time, .tracker-comment header span, .tracker-source-list small, .tracker-file small, .tracker-revisions small { color: var(--muted); font-size: 12px; }
.tracker-source-list article, .tracker-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tracker-source-list article p { width: 100%; margin: 0; }
.tracker-file > div { margin-right: auto; display: grid; gap: 3px; }
.tracker-inline-form { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.tracker-inline-form input, .tracker-inline-form select { flex: 1 1 260px; }
.tracker-related { min-height: 58px; padding: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.tracker-related + .tracker-related { margin-top: 8px; }
.tracker-related.is-cross-stage { border-left: 4px solid var(--secondary); background: var(--tracker-soft); }
.tracker-related > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 8px; align-items: center; }
.tracker-related > div small { grid-column: 2; color: var(--muted); }
.tracker-related a { color: inherit; text-decoration: none; }
.tracker-related a:hover { color: var(--primary); }
.tracker-relation-mark { grid-row: 1 / span 2; color: var(--secondary); font-size: 20px; font-weight: 900; }
.tracker-revisions pre, .tracker-section pre { max-height: 400px; padding: 14px; overflow: auto; border-radius: var(--radius-sm); background: var(--ink); color: #f9f4ec; white-space: pre-wrap; overflow-wrap: anywhere; }
.tracker-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.check-row { min-height: 44px; display: flex !important; flex-direction: row !important; align-items: center; gap: 9px !important; color: inherit !important; }
.check-row input { width: auto; }
.tracker-export-form { display: grid; gap: 18px; }
.tracker-export-stage { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tracker-export-stage > summary { min-height: 44px; }
.tracker-export-tasks { margin: 10px 0 0 24px; display: grid; gap: 6px; }
.tracker-import-list { display: grid; gap: 16px; }
.tracker-import-item > header { min-height: 44px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tracker-import-item > header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tracker-import-item.has-error { border: 2px solid var(--danger); }
.tracker-json-editor { width: 100%; margin: 8px 0; font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.tracker-apply-bar { position: sticky; bottom: 15px; z-index: 4; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--primary); border-radius: var(--radius-md); background: rgba(255, 255, 255, .96); box-shadow: 0 14px 40px rgba(42, 41, 38, .14); backdrop-filter: blur(8px); }
.tracker-apply-bar > div { display: grid; gap: 3px; }
.tracker-apply-bar small { color: var(--muted); }
.tracker-share-url { width: 100%; margin-top: 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 980px) {
  .tracker-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker-toolbar { align-items: stretch; flex-direction: column; }
  .tracker-stage-card > header { grid-template-columns: auto minmax(0, 1fr); }
  .tracker-stage-state { grid-column: 2; justify-items: start; }
  .tracker-stage-quick-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker-toolbar form > * { flex: 1 1 180px; }
  .tracker-stage-state { justify-items: start; }
  .tracker-create-grid, .tracker-detail-grid { grid-template-columns: 1fr; }
  .tracker-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .tracker-page { gap: 18px; }
  .tracker-header { min-height: 0; align-items: stretch; }
  .tracker-header .tracker-actions, .tracker-header .secondary-button { width: 100%; }
  .tracker-header .tracker-actions > * { flex: 1 1 100%; justify-content: center; }
  .tracker-kpis { grid-template-columns: 1fr; }
  .tracker-toolbar { align-items: stretch; flex-direction: column; }
  .tracker-toolbar .segmented { width: 100%; }
  .tracker-toolbar .segmented a { flex: 1; justify-content: center; }
  .tracker-toolbar form { display: grid; grid-template-columns: 1fr; }
  .tracker-task-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tracker-task-line, .tracker-flat-item { grid-template-columns: minmax(0, 1fr); }
  .tracker-task-line.has-branch { grid-template-columns: auto minmax(0, 1fr); }
  .tracker-task-line.has-branch .tracker-row-actions { grid-column: 2; }
  .tracker-row-actions { justify-content: flex-end; }
  .tracker-task-row > span:nth-child(3), .tracker-row-meta { grid-column: 1 / -1; }
  .tracker-task-tree ul { margin-left: 9px; padding-left: 9px; }
  .tracker-form-grid { grid-template-columns: 1fr; }
  .tracker-form-grid .span-2 { grid-column: auto; }
  .tracker-facts, .tracker-option-grid { grid-template-columns: 1fr; }
  .tracker-related, .tracker-file { align-items: stretch; flex-direction: column; }
  .tracker-inline-form { display: grid; grid-template-columns: 1fr; }
  .tracker-export-tasks { margin-left: 8px; }
  .tracker-apply-bar { position: static; align-items: stretch; flex-direction: column; }
  .tracker-apply-bar .primary { width: 100%; }
  .tracker-stage-quick-form { grid-template-columns: 1fr; }
}

.swip-access-panel { margin-bottom: var(--space-5, 24px); }
.swip-access-actions, .swip-card-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.swip-schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.swip-schedule-card .settings-form { margin-top: 20px; }
.status-verified { background: var(--color-success-soft, #eaf7ef); color: var(--color-success, #217a48); }
.status-pending, .status-paused { background: var(--color-warning-soft, #fff4dc); color: var(--color-warning, #805b00); }
.status-error { background: var(--color-danger-soft, #fdeceb); color: var(--color-danger, #a12622); }
@media (max-width: 900px) { .swip-schedule-grid { grid-template-columns: 1fr; } }

/* VDNH cash and Z-report workspace */
.vdnh-page { max-width: 1800px !important; }
.vdnh-page .primary-button { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--primary); color: white; text-decoration: none; font-weight: 800; }
.vdnh-page .primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.vdnh-page .alert.alert-warning { margin-bottom: 18px; border-color: #e4c07d; background: #fff7df; color: #7e5700; }
.vdnh-toolbar { margin-bottom: 18px; display: grid; grid-template-columns: auto minmax(280px, 1fr) auto; align-items: end; gap: 18px; }
.vdnh-freshness { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--muted); font-size: 12px; }
.vdnh-freshness strong { color: var(--ink); }
.vdnh-table { min-width: 1540px; }
.vdnh-detail-table { min-width: 1320px; }
.vdnh-table td, .vdnh-detail-table td { vertical-align: middle; }
.vdnh-table td small, .vdnh-detail-table td small { margin-top: 4px; display: block; color: var(--muted); font-size: 10px; }
.vdnh-clickable-row { cursor: pointer; outline: none; }
.vdnh-clickable-row td, .vdnh-day-row td { transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.vdnh-clickable-row:hover td, .vdnh-clickable-row:focus-visible td { background: #fbf0f8; }
.vdnh-clickable-row:focus-visible td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.vdnh-day-row:hover td { background: #fcf6fa; }
.vdnh-entity-link { color: var(--primary); text-decoration: none; }
.vdnh-entity-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.vdnh-replacement { color: var(--warning) !important; font-weight: 800; }
.vdnh-kpi-grid { margin-bottom: 22px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.vdnh-kpi-grid .metric-card { min-height: 126px; padding: 18px; display: grid; align-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.vdnh-kpi-grid .metric-card span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.vdnh-kpi-grid .metric-card:hover { transform: translateY(-2px); border-color: rgba(149, 0, 117, .28); box-shadow: 0 12px 30px rgba(75, 41, 68, .12); }
.vdnh-kpi-grid .metric-card strong { font-size: clamp(18px, 1.5vw, 28px); }
.vdnh-counter-cell { min-width: 220px; }
.vdnh-counter-cell > div { padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #faf8f4; transition: border-color .16s ease, box-shadow .16s ease; }
.vdnh-counter-cell > div + div { margin-top: 6px; }
.vdnh-counter-cell > div:hover { border-color: rgba(149, 0, 117, .35); box-shadow: 0 6px 16px rgba(75, 41, 68, .1); }
.vdnh-counter-cell strong { display: block; margin-top: 3px; font-size: 14px; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; }

@media (max-width: 1280px) {
  .vdnh-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .vdnh-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .vdnh-toolbar .primary-button, .vdnh-toolbar > button { width: 100%; justify-content: center; }
  .vdnh-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .vdnh-kpi-grid { grid-template-columns: 1fr; }
}

/* Bank statement mail inbox */
.bank-mail-page { max-width: 1560px !important; }
.bank-mail-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.bank-mail-heading .eyebrow { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.bank-mail-heading p { max-width: 820px; margin: 0; }
.bank-mail-kpis { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.bank-mail-kpis article { min-height: 118px; padding: 18px; display: grid; align-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.bank-mail-kpis article::before { content: ""; width: 38px; height: 4px; border-radius: 999px; background: var(--primary); }
.bank-mail-kpis article:nth-child(2)::before { background: var(--secondary); }
.bank-mail-kpis article:nth-child(3)::before { background: var(--success); }
.bank-mail-kpis article.is-danger { border-color: #efb8b4; background: #fff5f3; }
.bank-mail-kpis article.is-danger::before { background: var(--danger); }
.bank-mail-kpis span, .bank-mail-kpis small { color: var(--muted); font-size: 12px; }
.bank-mail-kpis span { font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.bank-mail-kpis strong { font-size: 30px; line-height: 1; }
.bank-mail-toolbar { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(190px, .9fr) auto auto; align-items: end; gap: 12px; margin-bottom: 18px; }
.bank-mail-toolbar label { color: var(--muted); font-size: 12px; }
.bank-mail-toolbar .primary, .bank-mail-toolbar .secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.bank-mail-table-panel { padding: 0; overflow: hidden; }
.bank-mail-table-heading { padding: 18px 20px 12px; }
.bank-mail-table-heading h2, .bank-mail-table-heading p { margin-bottom: 4px; }
.bank-mail-table { min-width: 1080px; }
.bank-mail-table td:nth-child(1) { width: 150px; white-space: nowrap; }
.bank-mail-table td:nth-child(2) { min-width: 230px; }
.bank-mail-table td:nth-child(3) { min-width: 300px; }
.bank-mail-table td small { display: block; margin-top: 4px; max-width: 420px; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.bank-mail-row { position: relative; transition: background .15s ease, box-shadow .15s ease; }
.bank-mail-row:hover, .bank-mail-row:has(.bank-mail-row-open button:focus-visible) { background: #fbf0f8; box-shadow: inset 4px 0 0 var(--primary); }
.bank-mail-row-open { position: static; margin: 0; }
.bank-mail-row-open button { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.bank-mail-file-cell { position: relative; background: inherit; }
.status-processing { background: #fff3cf; color: #805b00; }
.status-quarantine { background: #fee9e7; color: #a9332d; }
.bank-mail-files { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 7px; min-width: 260px; }
.bank-mail-files form { margin: 0; }
.bank-mail-files button { min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #faf8f4; color: var(--primary); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; }
.bank-mail-files button:hover { border-color: var(--primary); background: #fbf0f8; }
.bank-mail-pagination { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bank-mail-pagination a { text-decoration: none; }
.bank-mail-message-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.bank-mail-message-heading .eyebrow { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.bank-mail-message-heading h1 { max-width: 980px; overflow-wrap: anywhere; }
.bank-mail-message-heading .secondary-button { min-height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; text-decoration: none; }
.bank-mail-message-panel { padding: 0; overflow: hidden; }
.bank-mail-message-frame { display: block; width: 100%; min-height: 70vh; border: 0; background: #fff; }

@media (max-width: 960px) {
  .bank-mail-kpis { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .bank-mail-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .bank-mail-kpis, .bank-mail-toolbar { grid-template-columns: 1fr; }
  .bank-mail-message-heading { align-items: stretch; flex-direction: column; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, sans-serif; }
.topbar { min-height: 60px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--accent); font-size: 22px; font-weight: 750; text-decoration: none; letter-spacing: .04em; }
.topbar-nav { display: flex; gap: 18px; margin-right: auto; margin-left: 28px; }
.topbar-nav a { color: var(--text); text-decoration: none; }
.topbar-nav a:hover { color: var(--accent); }
.topbar-user { display: flex; align-items: center; gap: 18px; }
.topbar-user a { color: var(--accent); text-decoration: none; }
.topbar-user form { margin: 0; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 56px; }
h1, h2 { line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(27px, 4vw, 38px); margin-bottom: 8px; }
h2 { font-size: 18px; }
.muted, time { color: var(--muted); }
.page-heading { margin-bottom: 24px; }
.heading-actions { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.module-card, .panel, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.module-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.module-card p { min-height: 48px; }
.module-card time { font-size: 13px; }
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.status-ready { background: var(--ready-bg); color: var(--ready-text); }
.status-in_progress { background: var(--work-bg); color: var(--work-text); }
.status-planned { background: var(--planned-bg); color: var(--planned-text); }
.status-blocked { background: var(--blocked-bg); color: var(--blocked-text); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 145px 220px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.login-card { width: min(420px, 100%); margin: 8vh auto 0; padding: 28px; }
.stack { display: grid; gap: 18px; margin-top: 24px; }
label { display: grid; gap: 7px; font-weight: 650; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid #b8c2cc; border-radius: 7px; background: var(--surface); font: inherit; }
input[type="file"] { background: var(--surface); }
input:focus, select:focus { border-color: var(--accent); outline: 3px solid #dbeaf7; }
button { font: inherit; cursor: pointer; }
.primary { border: 0; border-radius: 7px; padding: 11px 16px; background: var(--accent); color: white; font-weight: 700; }
.primary:hover { background: var(--accent-dark); }
.secondary-button { border: 1px solid #a8b7c6; border-radius: 7px; padding: 9px 13px; background: var(--surface); color: var(--accent-dark); font-weight: 700; }
.secondary-button:hover { border-color: var(--accent); background: #f1f7fc; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--accent); }
.alert { border: 1px solid #efb1b1; background: var(--blocked-bg); color: var(--blocked-text); border-radius: 7px; padding: 10px 12px; }
.notice { border: 1px solid #a9d3b7; background: var(--ready-bg); color: var(--ready-text); border-radius: 7px; padding: 10px 12px; margin-bottom: 18px; }
.match-summary { display: grid; gap: 5px; min-width: 300px; padding: 9px 10px; border-radius: 7px; border: 1px solid transparent; }
.match-ready { background: var(--ready-bg); color: var(--ready-text); border-color: #a9d3b7; }
.match-waiting { background: var(--work-bg); color: var(--work-text); border-color: #e0c87a; }
.match-problem { background: var(--blocked-bg); color: var(--blocked-text); border-color: #efb1b1; }
.match-history { background: var(--planned-bg); color: var(--planned-text); border-color: var(--line); }
.match-summary span, .match-summary small { display: block; }
.compact-list { margin: 6px 0 0; padding-left: 20px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.compact-form { display: grid; gap: 8px; min-width: 260px; }
.date-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.date-form label { min-width: 170px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.metric-grid div { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.metric-grid strong { font-size: 21px; }
.metric-grid span, .source-note { color: var(--muted); font-size: 13px; }
.report-section { margin-bottom: 18px; }
.compact-table { margin-top: 18px; }
.inline-actions { display: flex; gap: 14px; align-items: center; }
.danger-link { color: var(--blocked-text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 46px; }
.checkbox-label input { width: auto; }
.secret-notice { border-color: #d6b14a; background: #fff9e8; margin-bottom: 18px; }
.credential-box { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; }
.credential-box dt { color: var(--muted); }
.credential-box dd { margin: 0; }
.token-value { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.heading-links { display: flex; gap: 16px; flex-wrap: wrap; }
.mapping-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 18px; }
.mapping-metric { display: grid; gap: 2px; min-height: 92px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.mapping-metric strong { font-size: 25px; line-height: 1.15; }
.mapping-metric span { color: var(--muted); font-size: 13px; }
.mapping-metric-main { border-color: #9ecdb0; background: var(--ready-bg); }
.mapping-metric-main strong { color: var(--ready-text); }
.mapping-metric-warn { border-color: #e0c87a; background: var(--work-bg); }
.mapping-metric-warn strong { color: var(--work-text); }
.mapping-metric-problem { border-color: #dc7777; background: #fff0f0; }
.mapping-metric-problem strong { color: #a32020; }
.mapping-toolbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 12px; background: rgba(244, 246, 248, .96); border: 1px solid var(--line); border-radius: 11px; backdrop-filter: blur(8px); }
.mapping-toolbar label { font-size: 13px; }
.mapping-toolbar form { margin: 0; }
.mapping-toolbar #location-visible-count { align-self: center; white-space: nowrap; }
.attention-panel { margin-bottom: 18px; border-color: #e0c87a; background: #fffcf3; }
.attention-panel-critical { border: 2px solid #d95555; background: #fff3f3; box-shadow: 0 3px 12px rgba(155, 32, 32, .1); }
.section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.section-heading h2 { margin-bottom: 5px; }
.section-heading p { margin: 0; }
.attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px; margin-top: 16px; }
.source-item { display: grid; gap: 8px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.source-item-warning { border-left: 4px solid #d3a92e; }
.source-kicker { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.location-card-grid { display: grid; gap: 16px; }
.location-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 2px 8px rgba(28, 48, 68, .04); }
.location-card-problem { border: 2px solid #d95555; box-shadow: 0 4px 14px rgba(155, 32, 32, .12); }
.location-card[hidden] { display: none; }
.location-card-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.location-card-header h2 { margin: 2px 0 0; font-size: 22px; }
.location-geodata { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr); gap: 18px; align-items: start; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.location-geodata-summary { display: grid; gap: 4px; min-width: 0; }
.location-geodata-summary strong, .location-geodata-summary span { overflow-wrap: anywhere; }
.location-geodata-summary span { color: var(--muted); font-size: 13px; }
.location-geodata-summary a { width: fit-content; font-size: 13px; }
.location-weather-fallback { color: #8a5b00 !important; }
.location-settings { min-width: 0; }
.location-settings[open] summary { margin-bottom: 9px; }
.location-settings-form { min-width: 0; }
.location-coordinate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mapping-problem-summary { padding: 11px 18px; border-bottom: 1px solid #efb1b1; background: #fff0f0; color: #8f1f1f; font-size: 13px; }
.source-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.source-lane { width: 100%; min-width: 0; padding: 15px; overflow: hidden; border-right: 1px solid var(--line); }
.source-lane > *, .source-lane .source-record, .source-lane form { min-width: 0; max-width: 100%; }
.source-lane:last-child { border-right: 0; }
.source-lane-iiko { box-shadow: inset 0 3px #3f8bd2; }
.source-lane-swip { box-shadow: inset 0 3px #7656b5; }
.source-lane-ofd { box-shadow: inset 0 3px #d4862f; }
.source-lane-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.source-lane-title span { min-width: 26px; padding: 2px 7px; border-radius: 999px; background: var(--planned-bg); color: var(--muted); text-align: center; font-size: 12px; }
.source-record { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line); }
.source-record-problem { margin: 0 -8px; padding: 10px 8px; border: 1px solid #e79696; border-radius: 8px; background: #fff5f5; }
.source-record:first-of-type { border-top: 0; padding-top: 0; }
.source-record > span, .evidence-line { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.evidence-line { padding-left: 8px; border-left: 2px solid #9ecdb0; color: var(--ready-text) !important; }
.confirmation-badge { width: fit-content; padding: 3px 7px; border-radius: 999px; font-size: 11px !important; font-weight: 750; }
.confirmation-auto { background: var(--ready-bg); color: var(--ready-text) !important; }
.confirmation-manual { background: #eef2f6; color: #4d5f70 !important; }
.calculation-note { padding-left: 8px; border-left: 2px solid #9ecdb0; color: var(--ready-text) !important; }
.calculation-problem { border-left-color: #d95555; color: #9b2020 !important; }
.form-explanation { margin: 0; color: var(--muted); font-size: 12px; }
.record-actions { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.source-record details[open] summary { margin-bottom: 8px; }
.source-record .compact-form { min-width: 0; }
.empty-source { margin: 0; padding: 12px; border: 1px dashed #c7d0d9; border-radius: 8px; color: var(--muted); font-size: 13px; }
.terminal-evidence { border-top: 1px solid var(--line); background: #fafbfd; }
.terminal-evidence > summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 12px 18px; color: var(--text); }
.terminal-evidence > summary span:first-child { display: grid; gap: 2px; }
.terminal-evidence > summary small { color: var(--muted); }
.terminal-counts { color: var(--accent); font-size: 13px; white-space: nowrap; }
.terminal-evidence-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(220px, .7fr); gap: 16px; padding: 4px 18px 18px; }
.terminal-evidence-body h3 { margin: 0 0 7px; font-size: 14px; }
.terminal-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.terminal-list li { display: grid; grid-template-columns: minmax(95px, auto) 1fr; gap: 8px; align-items: baseline; font-size: 12px; }
.terminal-list code { overflow-wrap: anywhere; color: var(--text); }
.terminal-list span { color: var(--muted); }
.historical-record { opacity: .58; text-decoration: line-through; }
.evidence-reassign { align-content: start; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.group-panel { margin-top: 20px; }
.group-panel > summary { padding: 4px 0; color: var(--text); font-size: 16px; }
.group-panel-body { margin-top: 14px; }
.sync-list { display: grid; gap: 12px; }
.sync-row { display: grid; grid-template-columns: 170px 130px minmax(220px, 1fr) minmax(330px, 1.4fr) 165px; gap: 18px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 8px rgba(28, 48, 68, .04); }
.sync-row-problem { border: 2px solid #d95555; background: #fff8f8; }
.sync-row-warning { border-color: #e5bd73; background: #fffaf0; }
.bot-health { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(460px, 1.4fr) auto; gap: 22px; align-items: center; margin-bottom: 20px; border-width: 2px; }
.bot-health-red { border-color: #d95555; background: #fff8f8; }
.bot-health-yellow { border-color: #e5bd73; background: #fffaf0; }
.bot-health-green { border-color: #93c9a5; background: #f8fcf8; }
.bot-health-main { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 15px; align-items: start; }
.bot-health-main h2 { margin: 2px 0 5px; font-size: 21px; }
.bot-health-main p { margin: 7px 0 0; font-size: 13px; line-height: 1.45; }
.bot-health-main details { margin-top: 8px; }
.bot-health-kicker { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.bot-health-label { font-size: 14px; }
.traffic-light { display: grid; gap: 5px; width: 38px; padding: 7px; border-radius: 12px; background: #27323c; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .35); }
.traffic-light-lamp { display: block; width: 24px; height: 24px; border-radius: 50%; background: #56616a; opacity: .28; }
.traffic-light-red.is-active { background: #e44848; opacity: 1; box-shadow: 0 0 9px rgba(228, 72, 72, .55); }
.traffic-light-yellow.is-active { background: #f1bd2f; opacity: 1; box-shadow: 0 0 9px rgba(241, 189, 47, .55); }
.traffic-light-green.is-active { background: #42a85f; opacity: 1; box-shadow: 0 0 9px rgba(66, 168, 95, .55); }
.bot-health-metrics { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 10px 18px; }
.bot-health-metrics div { display: grid; gap: 3px; min-width: 0; }
.bot-health-metrics span { color: var(--muted); font-size: 11px; }
.bot-health-metrics strong { font-size: 14px; }
.bot-health-metric-link { display: grid; gap: 3px; min-width: 0; padding: 6px; margin: -6px; border-radius: 8px; color: inherit; text-decoration: none; }
.bot-health-metric-link:hover { background: rgba(255, 255, 255, .55); }
.message-log-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.message-log-tabs .active { border-color: var(--accent); color: var(--accent); }
.message-log-panel { display: grid; gap: 16px; }
.message-log-filters { display: grid; grid-template-columns: minmax(170px, 240px) minmax(220px, 1fr) auto; align-items: end; gap: 12px; }
.message-log-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.message-log-bulk { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.message-log-bulk .danger-link { margin-left: auto; }
.message-log-table td { vertical-align: top; }
.message-log-text { display: inline-block; max-width: 480px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.message-row-actions form { margin: 0; }
.message-log-more { justify-self: start; }
.bot-health-actions { display: grid; gap: 8px; min-width: 170px; }
.bot-health-actions .secondary-button { text-align: center; }
@media (max-width: 1050px) {
  .bot-health { grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.3fr); }
  .bot-health-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .bot-health { grid-template-columns: 1fr; align-items: start; }
  .bot-health-metrics { grid-template-columns: 1fr; }
  .bot-health-actions { grid-column: auto; grid-template-columns: 1fr; }
}
.sync-source h2 { margin: 3px 0 0; font-size: 19px; }
.sync-source small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sync-state, .sync-result, .sync-next { display: grid; gap: 5px; align-content: start; }
.sync-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.sync-result strong, .sync-next strong { font-size: 13px; line-height: 1.4; }
.sync-result small { color: var(--muted); }
.sync-problem-reason { max-width: 48ch; color: var(--danger) !important; font-size: 11px; line-height: 1.4; }
.sync-data-warning { max-width: 48ch; color: #8a5a00 !important; font-size: 11px; line-height: 1.4; }
.sync-date-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.sync-date-row > span { color: var(--muted); font-size: 12px; }
.sync-stream-name { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sync-stream-name .status { padding: 2px 6px; font-size: 10px; }
.sync-control { margin: 0; text-align: right; }
.sync-control .link-button { width: 100%; justify-content: center; }
.sync-row-swip { grid-template-columns: 170px 130px minmax(380px, 1.35fr) minmax(300px, 1fr) 165px; }
.swip-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.swip-result-item { display: grid; gap: 2px; min-width: 0; }
.swip-result-item > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.swip-result-item .status { padding: 2px 6px; font-size: 10px; }
.swip-result-item strong { white-space: nowrap; }
.sync-upload { display: contents; margin: 0; }
.sync-settings-link { text-align: center; text-decoration: none; }
.swip-manual-upload { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
.swip-manual-upload summary { width: fit-content; color: var(--accent); font-size: 13px; font-weight: 750; cursor: pointer; }
.swip-manual-upload form { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)) auto; align-items: end; gap: 12px; margin-top: 12px; }
.swip-manual-upload label { font-size: 12px; }
.swip-manual-upload input[type="file"] { padding: 8px; font-size: 12px; }

.dashboard-analytics { display: grid; gap: 16px; margin: 18px 0 30px; }
.dashboard-analytics-heading h2 { margin: 0 0 4px; font-size: 25px; }
.dashboard-analytics-heading p { margin: 0; }
.dashboard-analytics-row { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-analytics-row-current { border-top: 3px solid var(--accent); }
.dashboard-analytics-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #faf9f6; }
.dashboard-analytics-row-heading h3 { margin: 4px 0 0; font-size: 20px; }
.dashboard-analytics-date { display: grid; grid-template-columns: auto minmax(150px, 190px) auto; align-items: center; gap: 9px; margin: 0; }
.dashboard-analytics-date label { color: var(--muted); font-size: 12px; font-weight: 750; }
.dashboard-analytics-date input { padding-block: 9px; }
.dashboard-analytics-date button { min-height: 40px; }
.dashboard-analytics-freshness { display: grid; gap: 3px; margin: 0; text-align: right; font-weight: 750; }
.dashboard-analytics-freshness small { color: var(--muted); font-size: 12px; font-weight: 500; }
.dashboard-analytics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-analytics-card { display: grid; align-content: start; min-height: 112px; padding: 18px; border-right: 1px solid var(--line); transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.dashboard-analytics-card:last-child { border-right: 0; }
.dashboard-analytics-card:hover { position: relative; z-index: 1; background: #fff8fd; box-shadow: 0 8px 22px rgba(58, 22, 50, .09); transform: translateY(-2px); }
.dashboard-analytics-card > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.dashboard-analytics-card strong { margin-top: 8px; font-size: clamp(22px, 2.2vw, 31px); line-height: 1.1; }
.dashboard-analytics-card small { margin-top: 7px; color: var(--muted); font-size: 12px; }

/* Tips+ */
.tips-source-list { display: grid; gap: 14px; }
.tips-source-card { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.tips-source-card:hover { border-color: rgba(149, 0, 117, .32); box-shadow: 0 9px 26px rgba(58, 22, 50, .09); transform: translateY(-1px); }
.tips-source-card-problem { border-left: 5px solid #d95555; }
.tips-source-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.tips-source-heading h2 { margin: 3px 0; font-size: 22px; }
.tips-source-heading p { margin: 0; color: var(--muted); }
.tips-source-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.tips-source-meta-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tips-source-meta > span { display: grid; gap: 4px; min-height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; transition: background .18s ease, border-color .18s ease; }
.tips-source-meta > span:hover { border-color: rgba(149, 0, 117, .3); background: #fff8fd; }
.tips-source-meta small { color: var(--muted); }
.tips-source-form { margin-top: 16px; align-items: end; }
.tips-source-form .tips-url-field { grid-column: span 2; }
.tips-source-actions { margin-top: 16px; }
.tips-source-actions form { margin: 0; }
.tips-quality .mapping-metric { transition: transform .18s ease, box-shadow .18s ease; }
.tips-quality .mapping-metric:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(28, 48, 68, .08); }
.tips-report-panel { padding: 0; overflow: hidden; }
.tips-report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tips-report-toolbar h2 { margin-bottom: 4px; }
.tips-report-toolbar p { margin: 0; }
.tips-week-navigation { display: flex; align-items: center; gap: 12px; }
.tips-week-navigation strong { min-width: 185px; text-align: center; font-size: 14px; }
.tips-week-navigation button { min-width: 42px; }
.tips-week-navigation button:disabled { cursor: default; opacity: .4; }
.tips-table-scroll { border: 0; border-radius: 0; }
.data-table.tips-table { width: 100%; min-width: 0; table-layout: fixed; }
.tips-table th, .tips-table td { height: 68px; text-align: center; vertical-align: middle; }
.tips-table thead th { height: auto; background: #eff8ef; color: #244b34; border-bottom: 2px solid #9ecdb0; font-size: 14px; }
.tips-table thead th span, .tips-table thead th small { display: block; }
.tips-table thead th small { margin-top: 2px; color: #64816f; font-size: 11px; }
.tips-table .tips-point-column { position: sticky; left: 0; z-index: 2; width: 16%; min-width: 0; text-align: left; background: var(--surface); box-shadow: 1px 0 var(--line); }
.tips-table thead .tips-point-column { z-index: 3; background: #dff2e2; }
.tips-table tbody .tips-point-column strong, .tips-table tbody .tips-point-column small { display: block; }
.tips-table tbody .tips-point-column small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.tips-table .tips-week-column { width: 14%; min-width: 0; }
.tips-table [hidden] { display: none; }
.tips-table tbody tr > * { transition: filter .16s ease, box-shadow .16s ease; }
.tips-table tbody tr:hover > * { position: relative; z-index: 3; filter: brightness(.95); box-shadow: inset 0 1px rgba(149, 0, 117, .32), inset 0 -1px rgba(149, 0, 117, .32); }
.tips-table tbody tr:hover > *:first-child { box-shadow: inset 2px 0 rgba(149, 0, 117, .32), inset 0 1px rgba(149, 0, 117, .32), inset 0 -1px rgba(149, 0, 117, .32); }
.tips-table tbody tr:hover > *:last-child { box-shadow: inset -2px 0 rgba(149, 0, 117, .32), inset 0 1px rgba(149, 0, 117, .32), inset 0 -1px rgba(149, 0, 117, .32); }
.tips-cell strong, .tips-cell small { display: block; }
.tips-cell strong { font-size: 18px; }
.tips-cell small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.tips-cell > span { color: var(--muted); font-size: 13px; }
.tips-cell-partial { background: #fff9e8; }
.tips-cell-missing, .tips-cell-unavailable { background: #fff3f3; }
.tips-cell-uninstalled { background: #f2f4f6; }
.tips-cell-red { background: #ff7570; color: #671b18; }
.tips-cell-neutral { background: #fff; }
.tips-cell-light_green { background: #c6e0b4; color: #244b16; }
.tips-cell-green { background: #92d050; color: #173e06; }
.tips-cell-missing_zero { background: #f4cccc; color: #6f2420; }
.tips-cell-unavailable { background: #ffe7a3; color: #765000; }
.tips-table td.tips-cell-red { background-color: #ff7570; color: #671b18; }
.tips-table td.tips-cell-neutral { background-color: #fff; }
.tips-table td.tips-cell-light_green { background-color: #c6e0b4; color: #244b16; }
.tips-table td.tips-cell-green { background-color: #92d050; color: #173e06; }
.tips-table td.tips-cell-missing_zero { background-color: #f4cccc; color: #6f2420; }
.tips-table td.tips-cell-unavailable { background-color: #ffe7a3; color: #765000; }
.tips-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tips-legend span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 800; }
.tips-legend .tips-legend-red { background: #ff7570; color: #671b18; }
.tips-legend .tips-legend-light-green { background: #c6e0b4; color: #244b16; }
.tips-legend .tips-legend-green { background: #92d050; color: #173e06; }
.tips-legend .tips-legend-missing-zero { background: #f4cccc; color: #6f2420; }
.tips-non-working-fieldset { grid-column: 1 / -1; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.tips-non-working-fieldset legend { padding: 0 6px; font-weight: 800; }
.tips-week-checkboxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 230px; overflow: auto; }
.tips-week-checkboxes label { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 8px; background: #faf9f6; font-size: 12px; }
.tips-week-checkboxes input { width: auto; }
.tips-methodology { margin-top: 18px; }
.tips-methodology p:last-child { margin-bottom: 0; }
.tips-source-catalog-form { display: grid; grid-template-columns: minmax(320px, 1fr) auto; align-items: end; gap: 12px; }
.tips-source-catalog-form label { min-width: 0; }

@media (max-width: 760px) {
  .tips-source-catalog-form { grid-template-columns: 1fr; }
  .tips-source-heading, .tips-report-toolbar { align-items: stretch; flex-direction: column; }
  .tips-source-meta { grid-template-columns: 1fr; }
  .tips-week-checkboxes { grid-template-columns: 1fr; }
  .tips-source-form .tips-url-field { grid-column: auto; }
  .tips-week-navigation { justify-content: space-between; }
  .tips-week-navigation strong { min-width: 0; }
  .tips-table .tips-point-column { width: 28%; min-width: 0; }
  .tips-table .tips-week-column { width: 18%; min-width: 0; }
}
.sync-upload-files { grid-column: 4; display: grid; gap: 7px; min-width: 0; }
.sync-upload label { font-size: 12px; }
.sync-upload input[type="file"] { padding: 8px; font-size: 12px; }
.sync-upload-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; }
.sync-upload-dual .primary { grid-column: 5; width: 100%; justify-content: center; }
@media (max-width: 1100px) {
  .sync-row, .sync-row-swip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-source, .sync-upload-files { grid-column: 1 / -1; }
  .sync-upload-dual .primary { grid-column: 1; width: auto; justify-self: start; }
  .sync-control { text-align: left; }
  .dashboard-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-analytics-card:nth-child(2) { border-right: 0; }
  .dashboard-analytics-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .topbar-nav { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 3px; }
  .module-card p { min-height: 0; }
  .heading-actions { display: grid; align-items: stretch; }
  .heading-links { display: grid; gap: 8px; }
  .mapping-toolbar { position: static; grid-template-columns: 1fr; }
  .location-geodata { grid-template-columns: 1fr; }
  .source-lanes { grid-template-columns: 1fr; }
  .source-lane { border-right: 0; border-bottom: 1px solid var(--line); }
  .source-lane:last-child { border-bottom: 0; }
  .terminal-evidence > summary { align-items: start; }
  .terminal-evidence-body { grid-template-columns: 1fr; }
  .evidence-reassign { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .sync-row, .sync-row-swip { grid-template-columns: 1fr; gap: 12px; }
  .sync-control { text-align: left; }
  .sync-upload-files, .sync-upload-dual .primary { grid-column: auto; }
  .swip-manual-upload form { grid-template-columns: 1fr; }
  .dashboard-analytics-row-heading { align-items: stretch; flex-direction: column; }
  .dashboard-analytics-date { grid-template-columns: 1fr; }
  .dashboard-analytics-freshness { text-align: left; }
  .dashboard-analytics-grid { grid-template-columns: 1fr; }
  .dashboard-analytics-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-analytics-card:last-child { border-bottom: 0; }
}

/* Deterministic daily reports */
.daily-report-heading { margin-bottom: 20px; }
.daily-date-form { display: flex; align-items: end; gap: 10px; }
.daily-date-form label { min-width: 180px; }
.daily-status-grid, .daily-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.daily-status-grid .module-card { min-height: 118px; }
.daily-status-grid span, .daily-kpi-grid span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.daily-status-grid strong { margin: 9px 0 5px; font-size: 24px; }
.daily-status-grid small { color: var(--muted); }
.daily-run-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.daily-run-panel h2 { margin: 4px 0 0; text-transform: uppercase; }
.daily-run-panel dl { display: flex; gap: 30px; margin: 0; }
.daily-run-panel dl div { display: grid; gap: 4px; }
.daily-run-panel dt { color: var(--muted); font-size: 12px; }
.daily-run-panel dd { margin: 0; font-weight: 800; }
.daily-actions { margin: 0 0 18px; }
.daily-actions form { margin: 0; }
.daily-artifact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-artifact-grid a { display: grid; gap: 5px; min-height: 70px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.daily-artifact-grid a:hover { border-color: var(--accent); background: #faf5f8; }
.daily-artifact-grid span { color: var(--muted); font-size: 12px; }
.daily-kpi-grid article { min-height: 125px; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--surface); }
.daily-kpi-grid article:nth-child(2) { border-top-color: var(--success); }
.daily-kpi-grid article:nth-child(3) { border-top-color: #ed802d; }
.daily-kpi-grid article:nth-child(4) { border-top-color: #ffc300; }
.daily-kpi-grid strong { display: block; margin: 10px 0 6px; font-size: 24px; }
.daily-kpi-grid small { color: var(--muted); }
.daily-employee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.daily-employee-grid article { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.daily-employee-grid article > span { color: var(--muted); font-size: 12px; }
.daily-employee-grid h3 { margin: 5px 0 12px; }
.daily-employee-grid dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.daily-employee-grid dl div { display: grid; gap: 3px; }
.daily-employee-grid dt { color: var(--muted); font-size: 11px; }
.daily-employee-grid dd { margin: 0; font-weight: 800; }
.daily-employee-grid p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.daily-settings-list { display: grid; gap: 10px; }
.daily-settings-list form { display: flex; align-items: end; gap: 12px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.daily-settings-list form > strong { min-width: 150px; align-self: center; }
.daily-settings-list .check-label { display: flex; min-height: 44px; align-items: center; gap: 7px; }
.daily-settings-list .check-label input { width: 18px; height: 18px; }
.daily-kso-form label { flex: 1; }

@media (max-width: 1000px) {
  .daily-status-grid, .daily-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-employee-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-settings-list form { align-items: stretch; flex-direction: column; }
}
@media (max-width: 650px) {
  .daily-date-form, .daily-run-panel { align-items: stretch; flex-direction: column; }
  .daily-run-panel dl { flex-direction: column; gap: 10px; }
  .daily-status-grid, .daily-kpi-grid, .daily-artifact-grid, .daily-employee-grid { grid-template-columns: 1fr; }
}

.cash-report-toolbar { display: grid; grid-template-columns: auto minmax(280px, 1fr) auto; align-items: end; gap: 18px 24px; }
.cash-report-toolbar .date-form { margin: 0; }
.cash-report-toolbar > form:last-of-type { margin: 0; justify-self: end; }
.cash-report-freshness { display: grid; gap: 4px; text-align: right; font-size: 13px; }
.cash-report-freshness small { color: var(--muted); }
.cash-share-result { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.cash-share-result input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.cash-share-result small { color: var(--muted); }
.cash-report-table { min-width: 1180px; }
.cash-report-table td:nth-child(n+4) { white-space: nowrap; text-align: right; }
.cash-report-table th:nth-child(n+4) { text-align: right; }
.cash-shift-detail { display: block; margin-top: 5px; color: var(--muted); white-space: nowrap; }
.share-panel { display: grid; gap: 18px; }
.share-link-result { display: grid; gap: 8px; padding: 16px; border: 1px solid #c8e2bb; border-radius: 12px; background: #edf7e8; }
.share-link-result input { width: 100%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.share-entry-card { text-align: center; }
.share-entry-card form { align-items: center; }
.auth-content.shared-report-content { width: min(1500px, calc(100% - 32px)); padding-bottom: 60px; }

@media (max-width: 720px) {
  .cash-report-toolbar { display: grid; align-items: stretch; }
  .cash-report-freshness { text-align: left; }
  .sync-control .link-button { width: auto; }
}

/* KIP UI v1 — default Kaldi’s visual system. */
:root {
  --kaldis-berry: #950075;
  --kaldis-sun: #ffc300;
  --kaldis-green: #3c8b0a;
  --graphite: #2a2926;
  --canvas: #f6f4ef;
  --surface: #ffffff;
  --ink: #2a2926;
  --muted: #77736c;
  --line: #e7e3dc;
  --success: #3c8b0a;
  --warning: #c77900;
  --danger: #c13d36;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(42, 41, 38, .055);
  --primary: var(--kaldis-berry);
  --secondary: var(--kaldis-sun);
  --primary-soft: #f7e8f3;
  --primary-ink: #76005d;
  --bg: var(--canvas);
  --text: var(--ink);
  --accent: var(--primary);
  --accent-dark: #76005d;
  --ready-bg: #eaf5e4;
  --ready-text: #2f7305;
  --work-bg: #fff3cf;
  --work-text: #9a6300;
  --planned-bg: #efede8;
  --planned-text: #68645e;
  --blocked-bg: #fee9e7;
  --blocked-text: #a9332d;
}

html { background: var(--canvas); }
body {
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(149, 0, 117, .22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  background: var(--canvas);
}
.workspace { min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 25px 18px 18px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 8px 25px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
}
.sidebar-brand img { display: block; width: 148px; height: auto; }
.sidebar-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.sidebar-nav { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar-nav-list { min-height: 4px; display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; }
.sidebar-nav-list .nav-link { flex: 0 0 auto; }
.nav-link {
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  border-radius: 12px;
  color: #5f5b55;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link:hover { background: #f4f2ed; color: var(--ink); }
.nav-link.active { background: var(--primary); color: white; }
.nav-link.active .nav-icon { color: var(--secondary); }
.nav-icon { color: #827d75; font-size: 19px; font-weight: 400; line-height: 1; }
.nav-divider { height: 1px; margin: 8px 10px; background: var(--line); }
.sidebar-nav > .nav-divider { flex: 0 0 auto; }
.sidebar-nav.is-editing .sidebar-nav-list { min-height: 52px; padding: 4px; border: 1px dashed rgba(149, 0, 117, .42); border-radius: 13px; background: #fbf7fa; }
.sidebar-nav.is-editing .nav-link { grid-template-columns: 28px minmax(0, 1fr) 18px; cursor: grab; user-select: none; transition: background .18s ease, color .18s ease; }
.sidebar-nav.is-editing .nav-link:active { cursor: grabbing; }
.sidebar-nav.is-editing .nav-link::after { content: "⋮⋮"; justify-self: end; color: var(--primary); letter-spacing: -3px; }
.sidebar-nav .nav-link.is-dragging { opacity: .32; }
.sidebar-menu-drop-marker { height: 4px; flex: 0 0 4px; margin: 2px 9px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 3px rgba(149, 0, 117, .12); pointer-events: none; }
.sidebar-bottom { flex: 0 0 auto; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.profile-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 14px;
  background: #faf9f6;
  color: var(--ink);
  text-decoration: none;
}
.profile-copy { display: grid; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.avatar-small {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px 11px 11px 4px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 850;
}
.sidebar-bottom form { margin: 5px 0 0; }
.sidebar-logout {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.sidebar-logout:hover { background: #f4f2ed; color: var(--primary); }
.sidebar-menu-settings { width: 100%; min-height: 44px; margin-top: 5px; padding: 0 12px; display: grid; grid-template-columns: 28px 1fr; align-items: center; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; text-align: left; }
.sidebar-menu-settings > span:first-child { font-size: 19px; line-height: 1; }
.sidebar-menu-settings:hover { background: #f4f2ed; color: var(--primary); }
.sidebar-menu-settings.is-active { border-color: rgba(149, 0, 117, .3); background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(149, 0, 117, .18); }
.sidebar-menu-settings:disabled { cursor: wait; opacity: .7; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 76px;
  padding: 10px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.crumb { color: var(--muted); font-size: 13px; font-weight: 650; }
.crumb strong { color: var(--ink); }
.crumb span + span, .crumb strong + span { margin-left: 8px; }
.crumb strong + span { color: #c5c0b7; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }
.topbar-profile {
  min-height: 44px;
  padding: 4px 10px 4px 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.mobile-brand, .mobile-menu { display: none; }

.container.content {
  width: auto;
  max-width: 1540px;
  margin: 0 auto;
  padding: 34px 36px 70px;
}
.app-shell .container.content {
  width: 100%;
  min-width: 0;
  max-width: none !important;
  margin: 0;
  box-sizing: border-box;
}
.page-heading { margin: 4px 0 28px; }
.page-heading::before {
  content: none;
  display: none;
}
.page-heading h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(31px, 3vw, 46px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}
.page-heading > p { max-width: 850px; margin: 0; color: var(--muted); font-size: 15px; }
h1 { color: var(--ink); font-weight: 500; letter-spacing: -.035em; }
h2 { color: var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
h3 { color: var(--ink); }
.muted, time { color: var(--muted); }

.panel, .module-card, .login-card, .location-card, .sync-row, .mapping-metric {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; border-radius: var(--radius-lg); }
.module-card { padding: 20px; border-radius: var(--radius-md); }
.module-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: -20px 0 16px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
}
.login-card { border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.module-grid { gap: 14px; }
.metric-grid { gap: 14px; }
.metric-grid div {
  min-height: 92px;
  padding: 16px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.metric-grid strong { color: var(--ink); font-size: 25px; letter-spacing: -.035em; }
.mapping-metrics { gap: 14px; }
.mapping-metric { border-radius: var(--radius-md); }
.mapping-metric-main { border-color: #b9d9aa; background: #f1f8ee; }
.mapping-metric-warn { border-color: #ecd48a; background: #fff9e9; }
.mapping-metric-problem { border-color: #efc1bd; background: #fff4f2; }

label { gap: 7px; color: var(--ink); font-size: 13px; font-weight: 750; }
input, select, textarea {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
}
textarea { min-height: 100px; padding-block: 10px; }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; accent-color: var(--primary); }
input[type="file"] { min-height: 46px; padding: 8px 10px; }
input:hover, select:hover, textarea:hover { border-color: #cbc5bc; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid rgba(149, 0, 117, .14); }
.primary, .secondary-button {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 750;
  transition: filter .18s ease, transform .18s ease, border-color .18s ease;
}
.primary { border: 1px solid var(--primary); background: var(--primary); color: white; }
.primary:hover { background: var(--primary); filter: brightness(.92); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.secondary-button:hover { border-color: var(--primary); background: white; color: var(--primary); }
.link-button, .danger-link { min-height: 40px; display: inline-flex; align-items: center; font-weight: 750; text-decoration: none; }
.link-button { color: var(--primary); }
.danger-link { color: var(--danger); }
details summary { min-height: 40px; display: flex; align-items: center; color: var(--primary); font-weight: 700; }

.status, .confirmation-badge {
  min-height: 27px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}
.status-ready, .confirmation-auto { background: #eaf5e4; color: #2f7305; }
.status-in_progress { background: #fff3cf; color: #9a6300; }
.status-planned, .confirmation-manual { background: #efede8; color: #68645e; }
.status-blocked { background: #fee9e7; color: #a9332d; }
.notice, .alert {
  min-height: 54px;
  padding: 13px 15px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  font-weight: 650;
}
.notice { border-color: #c8e2bb; background: #edf7e8; color: #2f7305; }
.alert { border-color: #f0c4c0; background: #fff0ee; color: #a9332d; }
.secret-notice { border-color: #ead38f; background: #fff7dc; color: #8a5b00; }
.attention-panel { border-color: #ecd48a; background: #fffaf0; }
.attention-panel-critical { border: 1px solid #efb8b4; background: #fff3f1; box-shadow: var(--shadow); }

.table-scroll { margin-inline: -1px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: auto; }
.data-table { min-width: 720px; background: white; }
.data-table th {
  padding: 14px 12px;
  background: #f5f2ed;
  color: #625e57;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.data-table td { padding: 15px 12px; border-bottom-color: var(--line); font-size: 13px; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #fcfaf7; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.compact-table { border-radius: var(--radius-md); overflow: hidden; }

.match-summary { padding: 12px; border-radius: 12px; }
.match-ready { border-color: #c8e2bb; background: #edf7e8; color: #2f7305; }
.match-waiting { border-color: #ead38f; background: #fff7dc; color: #8a5b00; }
.match-problem { border-color: #f0c4c0; background: #fff0ee; color: #a9332d; }
.match-history { border-color: var(--line); background: #f5f2ed; color: #68645e; }

.mapping-toolbar {
  top: 88px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(246, 244, 239, .94);
  box-shadow: 0 8px 24px rgba(42, 41, 38, .05);
}
.location-card { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.location-card-problem { border: 1px solid #e8a7a2; box-shadow: var(--shadow); }
.location-card-header { padding: 18px 20px; }
.source-item, .source-record-problem, .empty-source { border-radius: var(--radius-sm); }
.source-lane-iiko { box-shadow: inset 0 4px var(--primary); }
.source-lane-swip { box-shadow: inset 0 4px var(--secondary); }
.source-lane-ofd { box-shadow: inset 0 4px #ed802d; }
.source-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mapping-problem-summary { border-color: #f0c4c0; background: #fff0ee; color: #a9332d; }

.owner-preview-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.owner-date-list { display: flex; flex-wrap: wrap; gap: 8px; }
.owner-date { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-weight: 750; text-decoration: none; }
.owner-date.active { border-color: var(--primary); color: var(--primary); background: #fbf0f8; }
.owner-readonly-note { margin: 18px 0; padding: 14px 16px; border: 1px solid #ead38f; border-radius: var(--radius-md); background: #fff8df; color: #755300; }
.owner-model-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.owner-model-card { min-width: 0; padding: 16px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.owner-model-card.active { border: 2px solid var(--primary); padding: 15px; }
.owner-model-card.proposed { background: #f6f4ef; box-shadow: none; }
.owner-model-card small { overflow-wrap: anywhere; color: var(--muted); }
.owner-card-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-weight: 800; }
.owner-preview-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.owner-report-panel { min-width: 0; }
.owner-report-header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.owner-report-header dl, .owner-snapshot-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.owner-report-header dl div, .owner-snapshot-details dl div { min-width: 0; }
.owner-report-header dt, .owner-snapshot-details dt { color: var(--muted); font-size: 12px; font-weight: 750; }
.owner-report-header dd, .owner-snapshot-details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.owner-hash { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.owner-report-text { padding-top: 22px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.7; }
.owner-preview-aside { display: grid; gap: 18px; }
.owner-price-route { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.owner-price-route p { margin: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
.owner-reference-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: 12px; }
.owner-check-list, .owner-limit-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.owner-check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.owner-check-list li > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #eaf5e4; color: #2f7305; font-weight: 900; }
.owner-check-list li.warning > span { background: #fff3cf; color: #8a5b00; }
.owner-check-list p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.owner-limit-list { padding-left: 20px; list-style: disc; }
.owner-snapshot-details { margin-top: 18px; }
.owner-snapshot-details summary { cursor: pointer; }
.owner-snapshot-details[open] summary { margin-bottom: 16px; }
.owner-snapshot-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.owner-snapshot-metrics span { padding: 12px; border-radius: var(--radius-sm); background: #f6f4ef; }
@media (max-width: 1100px) {
  .owner-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-preview-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .owner-preview-heading { align-items: start; flex-direction: column; }
  .owner-model-grid { grid-template-columns: 1fr; }
  .owner-report-header dl, .owner-snapshot-details dl, .owner-snapshot-metrics { grid-template-columns: 1fr; }
  .owner-preview-page { padding-inline: 14px; }
}
.calculation-note, .evidence-line { border-left-color: var(--success); color: #2f7305 !important; }
.calculation-problem { border-left-color: var(--danger); color: var(--danger) !important; }
.sync-list { gap: 14px; }
.sync-row { padding: 20px; border-radius: var(--radius-md); box-shadow: var(--shadow); }
.sync-row-problem { border: 1px solid #efb8b4; background: #fff6f4; }
.source-kicker, .sync-label { color: var(--primary); font-weight: 850; letter-spacing: .08em; }

.auth-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--canvas); }
.auth-brand {
  width: fit-content;
  margin: 26px 30px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .08em;
}
.auth-brand img { width: 145px; height: auto; }
.auth-content { width: min(520px, calc(100% - 32px)); padding: 0 0 60px; }
.auth-content .login-card { margin-top: 7vh; }

/* Additional visual sales report. */
.sales-report-page { max-width: 1620px !important; }
.sales-hero {
  position: relative;
  margin: -34px -36px 24px;
  padding: 44px 36px 34px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  overflow: hidden;
  background: #fbfaf7;
  border-bottom: 1px solid var(--line);
}
.sales-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0 62%, var(--secondary) 62% 82%, var(--success) 82%);
}
.sales-hero h1 { margin: 4px 0 10px; font-size: clamp(38px, 5vw, 68px); font-weight: 420; letter-spacing: -.055em; }
.sales-hero p { max-width: 790px; margin: 0; color: var(--muted); }
.sales-eyebrow { margin: 0 !important; color: var(--primary) !important; font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.sales-date-form { min-width: 290px; margin: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.sales-date-form label { min-width: 170px; }
.sales-scope-tabs { margin: 0 0 18px; padding: 5px; display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.sales-scope-tabs a { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 750; }
.sales-scope-tabs a.active { background: var(--primary); color: white; }
.sales-entity-picker { margin-bottom: 18px; display: grid; grid-template-columns: minmax(260px, 560px) auto; align-items: end; gap: 12px; }
.sales-kpi-grid { margin-bottom: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sales-kpi-grid-compact { margin-bottom: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-kpi { position: relative; min-height: 112px; padding: 19px 18px 16px 22px; display: grid; align-content: space-between; gap: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow); }
.sales-kpi,
.sales-highlight-grid article,
.sales-ranking-row,
.sales-overview-toolbar,
.sales-section,
.sales-scope-tabs a,
.sales-overview-tabs a,
.sales-report-page .primary,
.sales-report-page .secondary-button { transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease; }
.sales-kpi:hover,
.sales-highlight-grid article:hover { transform: translateY(-3px); border-color: rgba(149, 0, 117, .28); box-shadow: 0 14px 30px rgba(75, 41, 68, .14); }
.sales-section:hover,
.sales-overview-toolbar:hover { border-color: rgba(149, 0, 117, .24); box-shadow: 0 12px 28px rgba(75, 41, 68, .11); }
.sales-ranking-row:hover { transform: translateX(3px); background: #fbf0f8; }
.sales-scope-tabs a:hover,
.sales-overview-tabs a:hover,
.sales-report-page .primary:hover,
.sales-report-page .secondary-button:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(75, 41, 68, .14); }
.sales-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--primary); }
.sales-kpi span { color: var(--muted); font-size: 12px; font-weight: 700; }
.sales-kpi strong { color: var(--ink); font-size: clamp(24px, 2.5vw, 33px); line-height: 1; letter-spacing: -.045em; }
.sales-accent-sun::before { background: var(--secondary); }
.sales-accent-green::before { background: var(--success); }
.sales-section { margin-bottom: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.sales-section-heading { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.sales-section-heading h2 { margin: 5px 0 0; font-size: 25px; }
.sales-section-heading > p { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.sales-data-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.sales-highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.sales-highlight-grid article { min-height: 125px; padding: 18px; display: grid; align-content: space-between; gap: 9px; border-radius: 16px; background: #f8f5f0; }
.sales-highlight-grid article:first-child { background: var(--primary-soft); }
.sales-highlight-grid span, .sales-highlight-grid small { color: var(--muted); font-size: 12px; }
.sales-highlight-grid strong { font-size: 20px; line-height: 1.15; }
.sales-ranking { display: grid; }
.sales-ranking-row { min-width: 900px; min-height: 78px; padding: 12px 8px; display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(160px, 1fr) minmax(145px, .8fr) minmax(110px, .55fr) minmax(110px, .55fr); align-items: center; gap: 18px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sales-ranking-row:first-child { border-top: 0; }
.sales-ranking-row:hover { background: #fbfaf7; }
.sales-ranking-title, .sales-ranking-value { display: grid; gap: 4px; }
.sales-ranking-title span, .sales-ranking-value span { color: var(--muted); font-size: 11px; }
.sales-ranking-bar { height: 8px; overflow: hidden; border-radius: 99px; background: #eeeae3; }
.sales-ranking-bar i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #c14da4); }
.sales-ranking-value strong { font-size: 15px; }
.sales-two-column { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); gap: 24px; }
.sales-table { min-width: 620px; }
.sales-table th:nth-child(n+2), .sales-table td:nth-child(n+2) { text-align: right; }
.sales-hour-bars { display: grid; gap: 12px; }
.sales-hour-bars > div { display: grid; grid-template-columns: 50px minmax(90px, 1fr) 105px 70px; align-items: center; gap: 10px; }
.sales-hour-bars i { height: 9px; overflow: hidden; border-radius: 99px; background: #eeeae3; }
.sales-hour-bars b { height: 100%; display: block; border-radius: inherit; background: var(--success); }
.sales-hour-bars strong { text-align: right; font-size: 12px; }
.sales-hour-bars small { color: var(--muted); text-align: right; font-size: 10px; }
.sales-empty { text-align: center; }

/* Hour-by-hour sales health matrix. */
.sales-health-page { max-width: 1800px !important; }
.health-summary { margin-bottom: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; }
.health-summary > div { min-height: 84px; padding: 15px 17px; display: grid; align-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.health-summary span { color: var(--muted); font-size: 11px; }
.health-summary strong { font-size: 20px; }
.health-summary small { color: var(--muted); font-size: 10px; }
.health-count-current { border-bottom: 4px solid #5088b8 !important; }
.health-count-good { border-bottom: 4px solid #68a94b !important; }
.health-count-warning { border-bottom: 4px solid #eeaaa3 !important; }
.health-count-critical { border-bottom: 4px solid #a82e2e !important; }
.health-count-schedule-alert { border-bottom: 4px solid #c65b32 !important; }
.health-legend { margin-bottom: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 22px; }
.health-legend h2 { margin: 0; font-size: 15px; }
.health-legend > div { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.health-legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.health-swatch { width: 14px; height: 14px; display: inline-block; flex: 0 0 auto; border: 1px solid rgba(42, 41, 38, .1); border-radius: 4px; }
.health-good { background: #dff0d5; color: #285f10; }
.health-closed { background: #e8e7e3; color: #66625c; }
.health-warning { background: #f9d9d5; color: #8b342e; }
.health-critical { background: #a82e2e; color: white; }
.health-pending { background: #f7f5f1; color: #aaa49a; }
.health-current { background: #e2eef8; color: #24577f; box-shadow: inset 0 0 0 1px #a9c9e2; }
.health-future { background: #f7f5f1; color: #aaa49a; }
.health-day_off, .health-off_hours { background: #efede9; color: #8b857e; }
.health-day_off_sales, .health-off_hours_sales { background: #c65b32; color: white; }
.health-matrix-panel { margin-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.health-table-scroll { overflow: auto; }
.health-matrix { width: 100%; min-width: 1320px; border-spacing: 0; }
.health-matrix th, .health-matrix td { padding: 6px; border-bottom: 1px solid var(--line); }
.health-matrix thead th { position: sticky; top: 0; z-index: 3; height: 48px; background: #f3f0ea; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.health-matrix thead th:first-child { left: 0; z-index: 4; min-width: 190px; padding-left: 16px; text-align: left; }
.health-matrix tbody th { position: sticky; left: 0; z-index: 2; min-width: 190px; max-width: 190px; padding: 10px 12px 10px 16px; background: white; text-align: left; }
.health-matrix tbody th a { display: block; overflow: hidden; color: var(--ink); text-decoration: none; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.health-matrix tbody th small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.health-matrix tbody td { width: 84px; min-width: 84px; }
.health-location-row { cursor: pointer; }
.health-location-row:hover th { background: #faf8f4; }
.health-location-row:hover td { background: #fdfcf9; }
.health-company-row th, .health-company-row td { background: #fbf3f9; border-bottom: 2px solid #d9b4cf; }
.health-company-row th a { color: var(--primary); font-weight: 850; }
.health-company-row:hover th, .health-company-row:hover td { background: #f7e8f3; }
.health-day-off-row th { background: #f3f1ed !important; }
.health-schedule-alert-row th { background: #fff0e9 !important; box-shadow: inset 4px 0 0 #c65b32; }
.health-cell { min-height: 58px; padding: 8px 5px; display: grid; place-content: center; gap: 2px; border-radius: 10px; text-align: center; }
.health-cell strong { font-size: 17px; line-height: 1; }
.health-cell small { font-size: 9px; white-space: nowrap; opacity: .82; }
.health-formula-panel { margin-bottom: 0; }
.health-formula-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.health-formula-grid article { min-height: 110px; padding: 16px; display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fbfaf7; }
.health-formula-grid strong { font-size: 14px; }
.health-formula-grid article span { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.health-formula-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.profile-password-panel { max-width: 620px; }
.profile-password-panel .stack { margin-bottom: 0; }
.profile-links-panel { margin-top: 24px; display: grid; gap: 18px; }
.profile-links-panel .section-heading { align-items: center; }
.profile-links-table { min-width: 1050px; }
.profile-links-table form { margin: 0; }

.sales-overview-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.sales-overview-tabs { min-height: 46px; display: inline-flex; gap: 5px; padding: 4px; border-radius: 14px; background: #f0ede7; }
.sales-overview-tabs a { min-width: 132px; min-height: 38px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 800; }
.sales-overview-tabs a:hover { color: var(--primary); }
.sales-overview-tabs a.active { background: white; color: var(--primary); box-shadow: 0 2px 10px rgba(42, 41, 38, .08); }
.sales-overview-actions { display: flex; align-items: end; gap: 10px; }
.sales-table-search { min-width: 280px; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.sales-table-search input { min-height: 44px; }
.sales-detail-actions { margin: -8px 0 20px; display: flex; justify-content: flex-end; }
.sales-overview-table { min-width: 1480px; }
.sales-overview-table-employees { min-width: 1515px; }
.sales-overview-table th[data-sort] { cursor: pointer; user-select: none; }
.sales-overview-table th[data-sort]::after { content: " ↕"; opacity: .42; }
.sales-overview-table th[data-direction="asc"]::after { content: " ↑"; opacity: 1; }
.sales-overview-table th[data-direction="desc"]::after { content: " ↓"; opacity: 1; }
.sales-overview-table td { vertical-align: middle; }
.sales-overview-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.sales-clickable-row { cursor: pointer; outline: none; }
.sales-clickable-row:hover td,
.sales-clickable-row:focus-visible td { background: #fbf0f8; }
.sales-clickable-row:focus-visible td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.sales-entity-link { color: var(--primary); text-decoration: none; }
.sales-entity-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sales-hourly-cell { width: 572px; min-width: 572px; }
.sales-hourly-cell .hourly-check-strip { width: 548px; }
.compact-action { min-height: 40px; padding-inline: 13px; white-space: nowrap; }
.hourly-check-strip { min-width: 490px; height: 64px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: 3px; }
.hourly-check-slot { position: relative; min-width: 0; padding: 5px 2px 4px; display: grid; grid-template-rows: auto 1fr auto; align-items: end; overflow: hidden; border: 1px solid rgba(42, 41, 38, .08); border-radius: 8px; background: #f0ede7; text-align: center; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease; }
.hourly-check-slot span { position: relative; z-index: 1; color: var(--muted); font-size: 8px; font-weight: 750; }
.hourly-check-slot strong { position: relative; z-index: 1; font-size: 11px; line-height: 1; }
.hourly-check-slot small { position: relative; z-index: 1; color: var(--muted); font-size: 8px; line-height: 1; white-space: nowrap; }
.hourly-check-slot:hover { z-index: 3; transform: translateY(-3px) scale(1.04); border-color: rgba(149, 0, 117, .48); box-shadow: 0 9px 20px rgba(75, 41, 68, .16); filter: saturate(1.08); }
.hourly-check-slot i { position: absolute; right: 5px; bottom: 4px; left: 5px; min-height: 2px; max-height: 42px; border-radius: 4px 4px 2px 2px; background: rgba(149, 0, 117, .2); }
.hourly-check-good { background: #e5f2de; }
.hourly-check-closed, .hourly-check-empty { background: #e8e6e2; }
.hourly-check-warning { background: #fbe8d2; }
.hourly-check-critical { background: #f4d5d2; }
.hourly-check-pending { background: #f3f1ed; color: var(--muted); }
.hourly-check-current { background: #e2eef8; color: #24577f; }
.hourly-check-future { background: #f3f1ed; color: var(--muted); }
.hourly-check-day_off, .hourly-check-off_hours { background: #e8e6e2; color: var(--muted); }
.hourly-check-day_off_sales, .hourly-check-off_hours_sales { background: #f2c1ad; color: #713116; }
.hourly-check-strip-volume .hourly-check-volume,
.hourly-check-strip-employee .hourly-check-volume { background: #f8eff6; }
.sales-two-column .hourly-check-strip { min-width: 0; }
.sales-company-hourly .hourly-check-strip,
.sales-entity-hourly .hourly-check-strip { width: 100%; min-width: 0; height: 104px; }
.sales-hourly-prominent .hourly-check-slot { padding: 10px 5px 8px; border-radius: 11px; }
.sales-hourly-prominent .hourly-check-slot span { font-size: 12px; }
.sales-hourly-prominent .hourly-check-slot strong { font-size: 20px; line-height: 1.15; }
.sales-hourly-prominent .hourly-check-slot small { font-size: 11px; line-height: 1.15; }
.sales-overview-toolbar-after-loyalty { margin-bottom: 24px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .sidebar-brand { justify-content: center; padding-inline: 0; }
  .sidebar-brand img { width: 58px; }
  .nav-link { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-label, .profile-copy, .sidebar-logout span { display: none; }
  .nav-icon { font-size: 20px; }
  .profile-link { display: flex; justify-content: center; padding: 9px 0; }
  .sidebar-logout { justify-content: center; }
  .sidebar-menu-settings { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .sales-two-column { grid-template-columns: 1fr; }
  .sales-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-overview-toolbar { align-items: stretch; flex-direction: column; }
  .sales-overview-actions { justify-content: space-between; }
}

@media (max-width: 880px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 70px; padding: 10px 18px; }
  .crumb, .topbar-profile, .topbar-logout { display: none; }
  .mobile-brand { display: block; }
  .mobile-brand img { display: block; width: 78px; height: auto; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu > summary {
    min-width: 74px;
    min-height: 44px;
    padding: 0 13px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: var(--ink);
    list-style: none;
    cursor: pointer;
  }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu nav {
    position: absolute;
    top: 50px;
    right: 0;
    z-index: 30;
    width: min(290px, calc(100vw - 36px));
    max-height: calc(100vh - 90px);
    padding: 9px;
    display: grid;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: 0 18px 50px rgba(42, 41, 38, .16);
  }
  .mobile-menu nav a { min-height: 44px; padding: 0 12px; display: flex; align-items: center; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
  .mobile-menu nav a:hover { background: var(--primary-soft); color: var(--primary); }
  .container.content { padding: 28px 18px 56px; }
  .mapping-toolbar { top: 82px; }
  .sales-hero { margin: -28px -18px 22px; padding: 38px 18px 28px; }
  .sales-ranking { overflow-x: auto; }
  .sales-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-report-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .cash-report-toolbar > form:last-of-type { justify-self: stretch; }
  .cash-report-toolbar > form:last-of-type .primary { width: 100%; }
  .cash-report-freshness { text-align: left; }
  .cash-share-result { grid-template-columns: 1fr; }
  .sales-overview-actions { align-items: stretch; flex-direction: column; }
  .sales-table-search { min-width: 0; }
}

@media (max-width: 620px) {
  .page-heading { margin-bottom: 22px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading > p { font-size: 14px; }
  .panel { padding: 18px; border-radius: var(--radius-md); }
  .module-grid, .metric-grid, .mapping-metrics, .form-grid, .permission-grid { grid-template-columns: 1fr; }
  .heading-actions, .section-heading { display: grid; align-items: stretch; }
  .inline-actions, .record-actions { flex-wrap: wrap; }
  .date-form { align-items: stretch; flex-direction: column; }
  .date-form label { min-width: 0; }
  .credential-box { grid-template-columns: 1fr; }
  .credential-box dd { margin-bottom: 8px; }
  .topbar-actions { width: auto; }
  .sales-hero, .sales-section-heading { display: grid; align-items: stretch; }
  .sales-date-form, .sales-entity-picker { min-width: 0; grid-template-columns: 1fr; }
  .sales-scope-tabs { width: 100%; display: grid; grid-template-columns: 1fr; }
  .sales-scope-tabs a { justify-content: center; }
  .sales-kpi-grid { grid-template-columns: 1fr; }
  .sales-section-heading > p { text-align: left; }
  .sales-hour-bars > div { grid-template-columns: 48px 1fr 90px; }
  .sales-hour-bars small { grid-column: 2 / -1; }
  .health-legend { display: grid; }
  .health-formula-grid { grid-template-columns: 1fr; }
  .sales-overview-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .sales-overview-tabs a { min-width: 0; }
  .hourly-check-strip { min-width: 455px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Authorized incident diagnostics */
.problems-page { max-width: 1180px; }
.problems-metrics { grid-template-columns: repeat(4, minmax(150px, 1fr)); margin-bottom: 10px; }
.problems-metrics > div { border-top: 4px solid var(--line); }
.problems-metrics .problem-metric-critical { border-top-color: var(--danger); }
.problems-metrics .problem-metric-warning { border-top-color: var(--secondary); }
.problems-metrics .problem-metric-delivery { border-top-color: var(--primary); }
.problems-generated { margin: 0 0 18px; color: var(--muted); font-size: 12px; text-align: right; }
.problem-list { display: grid; gap: 16px; }
.problem-card { border-left: 5px solid var(--secondary); }
.problem-card-critical { border-left-color: var(--danger); }
.problem-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.problem-card-header h2 { margin: 5px 0 0; }
.problem-module { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.problem-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.problem-summary { max-width: 900px; margin: 14px 0 18px; color: var(--ink); line-height: 1.55; }
.problem-meta { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)); gap: 10px; margin: 0; }
.problem-meta > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--canvas); }
.problem-meta dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.problem-meta dd { margin: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.problem-meta code { color: inherit; font-size: 14px; }
.problem-delivery { min-height: 54px; margin-top: 14px; padding: 11px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--canvas); }
.problem-delivery > span { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; border-radius: 50%; background: var(--planned-bg); color: var(--planned-text); font-weight: 900; }
.problem-delivery > div { display: grid; gap: 2px; }
.problem-delivery small { color: var(--muted); font-size: 12px; }
.problem-delivery-sent > span { background: var(--ready-bg); color: var(--ready-text); }
.problem-delivery-uncertain, .problem-delivery-failed, .problem-delivery-unknown { border-color: var(--danger); background: var(--blocked-bg); }
.problem-delivery-uncertain > span, .problem-delivery-failed > span, .problem-delivery-unknown > span { background: var(--danger); color: white; }
.problem-diagnostics { margin-top: 14px; }
.problem-diagnostics summary { min-height: 44px; }
.problem-diagnostics pre { max-height: 420px; margin: 4px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.problems-empty { display: grid; justify-items: center; gap: 8px; }
.problems-empty p { margin: 0; color: var(--muted); }
.problems-empty-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--ready-bg); color: var(--ready-text); font-size: 24px; font-weight: 900; }

@media (max-width: 900px) {
  .problems-metrics { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .problem-meta { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (max-width: 620px) {
  .problems-metrics, .problem-meta { grid-template-columns: 1fr; }
  .problem-card-header { display: grid; }
  .problem-badges { justify-content: flex-start; }
  .problems-generated { text-align: left; }
}

/* iiko local reports */
.iiko-report-hero {
  align-items: end;
  display: flex;
  gap: 32px;
  justify-content: space-between;
}

.date-range-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.date-range-form label {
  color: var(--text-muted, #77736c);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.iiko-report-tabs {
  margin: 24px 0 16px;
  overflow-x: auto;
}

.compact-kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.interactive-table tbody tr {
  transition: background-color 140ms ease, transform 140ms ease;
}

.interactive-table tbody tr:hover {
  background: #fff8dc;
}

.inline-detail-list {
  display: grid;
  gap: 5px;
  min-width: 280px;
  padding: 10px 0;
}

@media (max-width: 900px) {
  .iiko-report-hero { align-items: stretch; flex-direction: column; }
  .compact-kpi-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

/* Barista chat mapping and schedule */
.page-heading-actions { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.page-heading-actions h1 { margin-bottom: 7px; }
.barista-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.barista-toolbar label { width: min(440px, 100%); }
.barista-link-panel { padding: 0; overflow: hidden; }
.barista-link-table td:first-child { min-width: 250px; }
.barista-link-table td:first-child small, .link-evidence { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.barista-link-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; gap: 10px; align-items: center; margin: 0; }
.barista-link-form select { min-width: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.empty-state { padding: 34px; text-align: center; }
.empty-state h2 { margin-bottom: 8px; }
.schedule-toolbar { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; align-items: end; gap: 20px; margin-bottom: 16px; }
.schedule-week-nav { display: flex; align-items: center; gap: 10px; }
.schedule-week-nav > div { display: grid; min-width: 170px; text-align: center; }
.schedule-week-nav small, .schedule-summary small { color: var(--muted); font-size: 12px; }
.schedule-week-nav strong { font-size: 17px; }
.schedule-summary { display: grid; text-align: right; }
.schedule-summary strong { font-size: 24px; line-height: 1; }
.schedule-view-tabs { display: inline-flex; gap: 4px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.schedule-view-tab { min-height: 40px; padding: 10px 16px; border-radius: 8px; color: var(--muted); font-weight: 700; text-decoration: none; }
.schedule-view-tab:hover { color: var(--ink); background: #f5f0f3; }
.schedule-view-tab.active { color: #fff; background: var(--accent); }
.composer-toolbar { display: grid; grid-template-columns: auto auto minmax(220px, 1fr); align-items: end; gap: 14px; margin-bottom: 14px; }
.composer-range-form { display: flex; align-items: end; gap: 8px; margin: 0; }
.composer-range-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.composer-range-form input { min-width: 138px; }
.composer-search-label { display: grid; gap: 5px; }
.composer-root { width: 100%; min-width: 0; max-width: 100%; display: grid; gap: 0; }
.composer-main { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; align-items: start; }
.composer-main > * { min-width: 0; max-width: 100%; }
.composer-board-stack { width: 100%; min-width: 0; max-width: 100%; display: grid; gap: 12px; contain: inline-size; }
.composer-board { width: 100%; min-width: 0; max-width: 100%; max-height: calc(100vh - 250px); padding: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.composer-board-scroll { width: 100%; min-width: 0; max-width: 100%; min-height: 0; padding: 0 4px 20px 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.composer-section-heading { z-index: 8; display: flex; min-width: 0; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.composer-section-heading div { display: grid; }
.composer-section-heading small { color: var(--muted); }
.composer-table { width: auto; min-width: 100%; margin-right: 3px; table-layout: auto; border-collapse: separate; border-spacing: 0; background: var(--canvas); }
.composer-table thead th { position: sticky; top: 0; z-index: 5; width: 240px; min-width: 240px; max-width: 240px; padding: 5px 2px; border-bottom: 1px solid var(--line); background: #faf9f6; text-align: center; text-transform: none; }
.composer-day-summary { display: flex; width: 236px; min-width: 236px; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.composer-day-label { display: inline-flex; min-width: 0; align-items: baseline; justify-content: center; gap: 3px; }
.composer-day-label strong { color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .01em; }
.composer-day-label small { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0; }
.schedule-weather { display: flex !important; min-height: 24px; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; color: var(--ink); font-size: 11px; white-space: nowrap; }
.schedule-weather b { font-size: 17px; line-height: 1; }
.schedule-weather small { display: inline !important; margin: 0 !important; font-size: 10px; }
.composer-day-heading .schedule-weather { display: inline-flex !important; min-height: 24px; gap: 2px; margin-top: 0; font-size: 12px; }
.composer-weather-icon { display: grid; min-width: 20px; min-height: 22px; place-items: center; font-size: 19px; line-height: 1; }
.composer-weather-temp { display: grid; min-height: 22px; align-items: center; color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.composer-table .composer-location-column { position: sticky; left: 0; z-index: 4; width: 132px; min-width: 132px; max-width: 132px; padding: 9px 8px; background: #fff; box-shadow: 1px 0 var(--line); text-align: left; }
.composer-table .composer-table-gutter { position: static; width: 14px; min-width: 14px; max-width: 14px; padding: 0; border: 0; background: var(--canvas); box-shadow: none; }
.composer-table thead .composer-location-column { z-index: 7; background: #f4edf2; }
.composer-table tbody .composer-location-column { color: var(--ink); font-size: 13px; letter-spacing: -.01em; line-height: 1.25; text-transform: none; overflow-wrap: anywhere; }
.composer-slot { width: 240px; min-width: 240px; max-width: 240px; padding: 1px; border-bottom: 0; background: var(--canvas); vertical-align: top; }
.composer-slot-shell { display: flex; width: 238px; min-width: 238px; min-height: 98px; flex-direction: column; gap: 2px; padding: 3px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 2px 7px rgba(42, 41, 38, .035); transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.composer-slot-dirty .composer-slot-shell { border-color: #e8ca67; background: #fffdf3; }
.composer-slot.is-closed .composer-slot-shell { border-color: #dfa39e; background: #ffedeb; box-shadow: none; }
.composer-slot.is-drop-target .composer-slot-shell { border-color: var(--accent); background: #f9eefa; box-shadow: 0 0 0 2px rgba(149, 0, 117, .18); transform: translateY(-1px); }
.composer-slot-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px; align-items: stretch; }
.composer-slot-hours { display: grid; min-width: 0; color: var(--muted); }
.composer-hours-button { width: 100%; min-width: 0; min-height: 44px; padding: 3px 1px; overflow: hidden; border: 0; border-radius: 7px; background: transparent; color: #356873; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.02em; line-height: 1; text-align: center; text-overflow: clip; white-space: nowrap; }
.composer-hours-button:hover { background: #edf5f5; color: #234f59; }
.composer-day-off { position: relative; min-width: 39px; min-height: 44px; padding: 3px 1px; display: grid; grid-template-columns: 15px auto; place-content: center; align-items: center; gap: 3px; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 750; line-height: 1; }
.composer-day-off:hover { background: #fff5f4; color: var(--danger); }
.composer-day-off input { position: absolute; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.composer-day-off-box { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid #aaa59d; border-radius: 4px; background: #fff; color: #fff; font-size: 11px; line-height: 1; }
.composer-day-off input:focus-visible + .composer-day-off-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.composer-day-off input:checked + .composer-day-off-box { border-color: var(--danger); background: var(--danger); }
.composer-day-off input:checked + .composer-day-off-box::after { content: "✓"; }
.composer-slot.is-closed .composer-day-off { color: var(--danger); }
.schedule-point-day-off input { width: 18px; height: 18px; margin: 0; }
.composer-slot-cards { display: grid; gap: 1px; }
.composer-assignment-card,
.composer-assignment-empty { position: relative; width: 100%; min-height: 44px; padding: 2px 3px; overflow: hidden; border: 1px solid #d8d3cb; border-radius: 6px; background: #fff; color: var(--ink); }
.composer-assignment-card { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 4px; cursor: grab; text-align: left; }
.composer-assignment-empty { display: block; }
.composer-assignment-avatar { display: grid; width: 22px; height: 22px; place-items: center; overflow: hidden; border-radius: 50%; background: #eadbe6; color: var(--accent); font-size: 9px; font-weight: 800; line-height: 1; }
.composer-assignment-name { display: block; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 800; line-height: 1.18; text-overflow: ellipsis; white-space: nowrap; }
.composer-assignment-badges { grid-column: 2; display: flex; flex-wrap: wrap; gap: 3px; margin-top: 1px; }
.composer-assignment-badges small { padding: 2px 4px; border-radius: 999px; background: #fff3cf; color: #795400; font-size: 12px; font-weight: 800; line-height: 1.1; }
.composer-assignment-badges small.is-warning { background: #fff0df; color: #99510d; }
.composer-assignment-card:hover { border-color: var(--accent); box-shadow: 0 5px 14px rgba(149, 0, 117, .11); }
.composer-roster { position: sticky; top: 74px; display: grid; max-height: calc(100vh - 100px); gap: 8px; padding: 10px; overflow-y: auto; }
.composer-horizontal-scroll { position: fixed; z-index: 12; height: 18px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .98); box-shadow: 0 -3px 12px rgba(42, 41, 38, .1); touch-action: pan-x; }
.composer-horizontal-scroll[hidden] { display: none; }
.composer-horizontal-scroll > div { height: 1px; }
.composer-horizontal-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.composer-roster-heading { display: flex; justify-content: space-between; align-items: center; }
.composer-roster-heading > div { display: grid; }
.composer-roster-heading small { color: var(--muted); }
.composer-roster-heading { flex-wrap: wrap; gap: 5px; }
.composer-roster-heading strong { font-size: 22px; }
.composer-roster-search { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.composer-roster-search input { min-width: 0; padding-inline: 8px; }
.composer-roster-group { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.composer-roster-group.is-favorite { border-color: #dfc45d; background: #fffdf3; }
.composer-roster-group > summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; padding: 8px; cursor: pointer; font-size: 13px; font-weight: 750; }
.composer-roster-group.is-drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(149, 0, 117, .09); }
.composer-roster-list { display: grid; gap: 5px; max-height: 300px; padding: 0 6px 6px; overflow-y: auto; }
.composer-employee-card { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 5px; border: 1px solid transparent; border-radius: 9px; background: #faf9f6; color: var(--ink); cursor: grab; text-align: left; }
.composer-employee-card[hidden],
.composer-roster-group[hidden] { display: none; }
.composer-employee-card:hover { border-color: var(--accent); background: #fff; }
.composer-employee-card.is-favorite .composer-avatar { background: #fff1b8; color: #745a00; font-size: 16px; }
.composer-employee-card > span:last-child { min-width: 0; }
.composer-employee-card strong,
.composer-employee-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-employee-card small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.composer-avatar { display: grid; width: 28px; height: 28px; place-items: center; overflow: hidden; border-radius: 50%; background: #eadbe6; color: var(--accent); font-size: 10px; font-weight: 800; }
.composer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.composer-employee-card.is-temporary,
.composer-assignment-card.is-temporary { border-color: #dfc45d; border-left-color: var(--secondary); background: #fffbea; }
.composer-assignment-card.is-location-bound { border-color: #a9cf92; background: #f2faee; }
.composer-assignment-card.is-temporary { border-color: #dfc45d; background: #fffbea; }
.composer-employee-card.is-dismissed,
.composer-assignment-card.is-dismissed { opacity: .66; border-color: #d7d1d4; background: #f2f0f1; }
.composer-assignment-card.preference-conflict { border-color: #ed802d; background: #fff8ef; }
.composer-assignment-card.vacation-conflict { border-color: #aa5f9e; background: #fff1fa; }
.composer-employee-card.is-dragging,
.composer-assignment-card.is-dragging { opacity: .35; }
.composer-save-bar { margin-top: 0; }
.schedule-point-cell.is-understaffed { background: #fff1f0; box-shadow: inset 0 0 0 1px #e8a5a0; }
.schedule-point-cell.is-closed { background: #f1edef; }
.schedule-capacity { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.schedule-point-cell.is-understaffed .schedule-capacity { color: #9d2020; font-weight: 750; }
.composer-card-menu, .composer-hours-dialog { width: min(480px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(42, 41, 38, .28); }
.composer-card-menu::backdrop, .composer-hours-dialog::backdrop { background: rgba(42, 41, 38, .52); backdrop-filter: blur(3px); }
.composer-card-menu-shell, .composer-hours-dialog form { position: relative; display: grid; gap: 16px; padding: 24px; }
.composer-card-menu h2, .composer-hours-dialog h2 { margin: 0; padding-right: 44px; }
.composer-card-menu-actions { display: grid; gap: 12px; }
.composer-card-menu-actions button, .composer-card-menu-actions a { display: flex; min-height: 44px; align-items: center; width: 100%; padding: 9px 12px; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 700; text-align: left; text-decoration: none; }
.composer-card-menu-actions button small { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 650; }
.composer-card-menu-actions .danger { color: #9d2020; border-color: #e8a5a0; background: #fff1f0; }
.composer-card-binding { margin: 0; color: var(--muted); font-size: 13px; }
.composer-card-binding strong { color: var(--ink); }
.composer-card-calendar { display: grid; gap: 12px; }
.composer-card-week { display: grid; gap: 7px; }
.composer-card-week > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.composer-card-week > div:first-child > strong { font-size: 13px; }
.composer-card-week > div:first-child > small { color: var(--muted); font-size: 11px; }
.composer-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.composer-card-menu-actions .composer-week-day { min-width: 0; width: 100%; min-height: 62px; padding: 5px 3px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: #f8f6f3; color: var(--muted); cursor: pointer; text-align: center; }
.composer-card-menu-actions .composer-week-day:hover { border-color: var(--accent); box-shadow: 0 3px 10px rgba(149, 0, 117, .09); }
.composer-card-menu-actions .composer-week-day:disabled { cursor: default; opacity: .72; box-shadow: none; }
.composer-week-weather { display: block; width: 100%; max-width: 100%; overflow: hidden; font-size: 15px; line-height: 1; text-align: center; }
.composer-week-day strong { font-size: 11px; line-height: 1; }
.composer-week-day small { font-size: 9px; line-height: 1; }
.composer-week-day.is-assigned { border-color: #e8a5a0; background: #fff0ee; color: #a1312b; box-shadow: inset 0 -3px rgba(161, 49, 43, .08); }
.composer-week-day.is-requested-off { border-color: #e6c465; background: #fff4cf; color: #7b5b00; box-shadow: inset 0 -3px rgba(123, 91, 0, .08); }
.composer-card-shifts, .composer-card-requests { display: grid; gap: 6px; }
.composer-shift-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.composer-shift-list li { padding: 7px 9px; border-left: 3px solid #cf6b64; border-radius: 7px; background: #fff4f2; color: #7d2c27; font-size: 12px; }
.composer-request-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.composer-request-list li { padding: 6px 9px; border: 1px solid #e6c465; border-radius: 999px; background: #fff4cf; color: #7b5b00; font-size: 12px; font-weight: 700; }
.composer-card-menu-secondary-actions { display: grid; gap: 7px; }
.composer-card-menu-shift-actions,
.composer-card-menu-chat-actions { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer-card-menu-profile-actions { display: grid; gap: 7px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer-hours-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.composer-hours-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.compose2-toolbar { grid-template-columns: auto auto minmax(300px, 1fr); }
.compose2-legend { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
.compose2-legend span { padding: 5px 9px; border: 1px solid #b9b6af; border-radius: 6px; color: #222; font-weight: 750; }
.compose2-legend .is-ready { background: #92d050; }
.compose2-legend .is-off { background: #f00; color: #fff; }
.compose2-legend .is-vacation { background: #dfb4e4; }
.compose2-legend .is-closed { background: #fff200; }
.compose2-root { gap: 10px; }
.compose2-ready-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.compose2-table-panel { min-width: 0; padding: 0; overflow: hidden; border-radius: 4px; }
.compose2-table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.compose2-table { width: max-content; min-width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.compose2-table th,
.compose2-table td { height: 30px; padding: 2px 3px; border: 1px solid #9e9e9e; color: #111; line-height: 1.12; text-align: center; vertical-align: middle; }
.compose2-table thead th { background: #f2f2f2; font-weight: 800; }
.compose2-table th:first-child { position: sticky; left: 0; z-index: 3; width: 58px; min-width: 58px; background: #f2f2f2; }
.compose2-table tbody th { font-weight: 800; }
.compose2-table tbody th small { display: block; margin-top: 1px; color: #555; }
.compose2-ready-table th:not(:first-child):not(:last-child),
.compose2-ready-table td:not(:first-child):not(:last-child) { width: 72px; min-width: 72px; max-width: 72px; }
.compose2-ready-table thead th { height: 56px; padding: 1px; overflow-wrap: anywhere; }
.compose2-name-button { width: 100%; height: 100%; min-height: 50px; padding: 2px; border: 0; background: transparent; color: #111; cursor: pointer; font: inherit; font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; }
.compose2-name-button:hover { background: rgba(149, 0, 117, .09); }
.compose2-status-cell { padding: 0 !important; background: #fff; }
.compose2-status-cell.is-ready { background: #92d050; }
.compose2-status-cell.is-off { background: #f00; }
.compose2-status-cell.is-vacation { background: #dfb4e4; }
.compose2-status-cell.is-closed { background: #fff200; }
.compose2-status-cell > button,
.compose2-status-cell > span { display: grid; width: 100%; height: 100%; min-height: 29px; place-items: center; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.compose2-status-cell > span { color: #777; cursor: default; }
.compose2-status-cell > button:hover { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .22); }
.compose2-total-heading { position: sticky; right: 0; z-index: 4; width: 76px; min-width: 76px; padding: 2px 4px !important; }
.compose2-total-heading span { display: block; }
.compose2-layout-button { width: 30px; height: 30px; margin-top: 2px; padding: 0; border: 1px solid #888; border-radius: 5px; background: #fff; color: #222; cursor: pointer; font-size: 18px; line-height: 1; }
.compose2-layout-button:hover { background: #e4e4e4; }
.compose2-total { position: sticky; right: 0; z-index: 2; width: 76px; min-width: 76px; background: #f2f2f2; font-weight: 850; }
.compose2-section-heading { display: flex; padding: 7px 10px; border-bottom: 0; background: #f2f2f2; }
.compose2-section-heading div { display: grid; }
.compose2-section-heading small { color: var(--muted); }
.compose2-assignments-table th:not(:first-child):not(:last-child),
.compose2-assignments-table td:not(:first-child):not(:last-child) { width: 78px; min-width: 78px; max-width: 78px; }
.compose2-assignments-table thead th { height: 38px; padding: 2px; overflow-wrap: anywhere; }
.compose2-assignment-cell { position: relative; height: 42px !important; padding: 1px !important; background: #fff; vertical-align: top !important; cursor: pointer; }
.compose2-assignment-cell.is-closed { background: #fff200; vertical-align: middle !important; }
.compose2-closed-label { display: block; overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.compose2-assignment-cell .composer-slot-cards { gap: 1px; }
.compose2-assignment-card { min-height: 25px; padding: 2px 3px; display: block; border: 0; border-radius: 0; background: transparent; cursor: pointer; text-align: center; }
.compose2-assignment-card + .compose2-assignment-card { border-top: 1px solid #c7c7c7; }
.compose2-assignment-card .composer-assignment-name { overflow: visible; line-height: 1.12; text-align: center; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.compose2-assignment-card.preference-conflict { background: transparent; }
.compose2-assignment-card.vacation-conflict { background: #fff1fa; border-color: #aa5f9e; }
.compose2-assignment-card:hover { background: #f2f2f2; box-shadow: inset 0 0 0 2px var(--accent); }
.compose2-assignment-cell.composer-slot-dirty { background: #fffbe2; }
.compose2-point-action { position: absolute; right: 0; bottom: 0; z-index: 1; width: 19px; height: 17px; padding: 0; border: 0; border-radius: 3px 0 0 0; background: rgba(255, 255, 255, .84); color: #333; cursor: pointer; line-height: 1; opacity: .58; }
.compose2-assignment-cell:hover .compose2-point-action,
.compose2-point-action:focus-visible { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.compose2-cell-dialog { width: min(430px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 22px; border: 0; border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(42, 41, 38, .28); }
.compose2-cell-dialog::backdrop { background: rgba(42, 41, 38, .44); }
.compose2-cell-dialog h2 { margin: 0 42px 12px 0; font-size: 18px; }
.compose2-cell-actions { display: grid; gap: 6px; }
.compose2-cell-actions button { min-height: 36px; text-align: left; }
.compose2-cell-actions input { width: 100%; margin: 5px 0; }
.compose2-cell-actions .muted { margin: 4px 0; }
.composer-card-point-select { display: grid; gap: 4px; margin: 4px 0 8px; color: var(--muted); font-size: 12px; }
.composer-card-point-select select { width: 100%; min-height: 34px; color: var(--ink); }
.compose2-layout-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(42, 41, 38, .28); }
.compose2-layout-dialog::backdrop { background: rgba(42, 41, 38, .52); backdrop-filter: blur(3px); }
.compose2-layout-dialog form { position: relative; display: grid; gap: 14px; padding: 24px; }
.compose2-layout-dialog h2 { margin: 0; padding-right: 44px; }
.compose2-layout-dialog [data-compose2-layout-fields] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: min(620px, calc(100vh - 230px)); overflow-y: auto; }
.compose2-layout-group { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.compose2-layout-group legend { padding: 0 5px; font-weight: 800; }
.compose2-layout-list { display: grid; gap: 3px; }
.compose2-layout-list label { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 5px; }
.compose2-layout-list label > span { color: var(--muted); font-weight: 750; text-align: right; }
.compose2-layout-list select { min-width: 0; padding-block: 6px; }

.schedule-compose3-page .app-shell { display: block; }
.schedule-compose3-page .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 220px; transform: translateX(calc(-100% + 7px)); transition: transform .18s ease; box-shadow: 10px 0 30px rgba(0,0,0,.12); }
.schedule-compose3-page .sidebar:hover,
.schedule-compose3-page .sidebar:focus-within { transform: translateX(0); }
.schedule-compose3-page .container.content { max-width: none; padding-inline: 16px; }
.schedule-day-report-page .app-shell { display: block; }
.schedule-day-report-page .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 220px; transform: translateX(calc(-100% + 7px)); transition: transform .18s ease; box-shadow: 10px 0 30px rgba(0,0,0,.12); }
.schedule-day-report-page .sidebar:hover,
.schedule-day-report-page .sidebar:focus-within { transform: translateX(0); }
.schedule-day-report-page .container.content { max-width: none; padding: 16px; }
.manager-day-toolbar { margin-bottom: 12px; }
.manager-day-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #c8bbc4; background: #fff; }
.manager-day-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.35; }
.manager-day-table th, .manager-day-table td { border-right: 1px solid #ddd3d9; border-bottom: 1px solid #ddd3d9; padding: 7px 8px; vertical-align: top; text-align: left; }
.manager-day-table thead th { background: #f4eef2; font-weight: 750; }
.manager-day-table .manager-day-label { position: sticky; left: 0; z-index: 2; width: 185px; min-width: 185px; max-width: 185px; background: #faf8f9; }
.manager-day-table thead .manager-day-label { z-index: 3; background: #f4eef2; }
.manager-day-table .manager-day-group { border-top: 3px solid #84717c; border-left: 3px solid #84717c; border-right: 3px solid #84717c; text-align: center; font-size: 15px; }
.manager-day-table .manager-day-person { min-width: 280px; max-width: 300px; background: #f7f3f5; }
.manager-day-table .is-group-first { border-left: 3px solid #84717c; }
.manager-day-table .is-group-last { border-right: 3px solid #84717c; }
.manager-day-table tbody tr:last-child .manager-day-cell { border-bottom: 3px solid #84717c; }
.manager-day-cell { min-width: 280px; max-width: 300px; background: #fcfafb; overflow-wrap: anywhere; }
.manager-day-cell.is-danger { background: #ffebeb; }
.manager-day-cell.is-disconnected { background: #ffd8d3; }
.manager-day-cell.is-success { background: #e7f5e9; }
.manager-day-cell.is-filled { background: #fff; }
.manager-day-entry + .manager-day-entry { border-top: 1px solid #e5dce2; margin-top: 4px; padding-top: 4px; }
.manager-day-entry.is-negative { margin-inline: -3px; padding-inline: 3px; background: #ffe1e1; border-radius: 3px; }
.manager-day-entry.is-negative .manager-day-entry-title { color: #9d1717; font-weight: 800; }
.manager-day-entry.is-disconnected { background: #ffc8bf; }
.manager-day-entry.is-disconnected .manager-day-entry-title { color: #842514; }
.manager-day-entry-head { line-height: 1.3; }
.manager-day-entry-title { font-weight: 650; }
.manager-day-time-pair { display: inline-flex; gap: 4px; white-space: nowrap; }
.manager-day-entry-head time { font-weight: 500; }
.manager-day-entry-head time.is-late { color: #9d1717; font-weight: 800; }
.manager-day-expected { color: #68474c; font-weight: 400; white-space: nowrap; }
.manager-day-entry-text { font-weight: 400; white-space: pre-wrap; }
.manager-day-placeholder { color: #776d72; }
.manager-day-photos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.manager-day-photo { width: 62px; height: 62px; padding: 0; border: 1px solid #bca9b6; border-radius: 5px; background: #f3eef1; overflow: hidden; cursor: zoom-in; }
.manager-day-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.manager-day-photo-unavailable { display: inline-flex; align-items: center; justify-content: center; width: 82px; min-height: 62px; padding: 4px; border: 1px solid #d5c7cd; border-radius: 5px; color: #6e6269; font-size: 12px; text-align: center; }
.manager-day-dialog { width: min(94vw, 1100px); max-height: 95vh; border: 0; border-radius: 10px; padding: 12px; background: #fff; }
.manager-day-photo-error { margin: 24px 0; text-align: center; }
.manager-day-dialog::backdrop { background: rgba(0,0,0,.75); }
.manager-day-dialog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.manager-day-dialog-head > div { display: flex; gap: 7px; }
.manager-day-dialog > img { display: block; max-width: 100%; max-height: calc(95vh - 85px); margin: auto; object-fit: contain; }
@media (max-width: 600px) {
  .schedule-day-report-page .sidebar { display: none; }
  .schedule-day-report-page .container.content { padding: 10px; }
  .manager-day-table .manager-day-label { width: 138px; min-width: 138px; max-width: 138px; }
  .manager-day-cell, .manager-day-table .manager-day-person { min-width: 280px; max-width: 300px; }
}
.compose3-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.compose3-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.compose3-legend span { padding: 4px 8px; border-radius: 5px; font-weight: 700; }
.compose3-legend .ready, .compose3-tone-ready { background: #a9d967; }
.compose3-legend .agreed, .compose3-tone-agreed { background: #3d9e71; color: #fff; }
.compose3-legend .shortage, .compose3-tone-shortage, .compose3-tone-off { background: #f4a4a4; }
.compose3-legend .conflict, .compose3-tone-conflict, .compose3-tone-vacation, .compose3-tone-closed { background: #ffe477; }
.compose3-tone-neutral { background: #f0f0ec; }
.compose3-root { display: grid; gap: 12px; }
.compose3-overview { min-width: 0; }
.compose3-overview h2 { margin: 0 0 10px; }
.compose3-scroll { overflow-x: auto; }
.compose3-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 4px 0; table-layout: fixed; }
.compose3-table th, .compose3-table td { padding: 7px 5px; border: 1px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.compose3-table th:first-child { width: clamp(145px, 17vw, 260px); text-align: left; }
.compose3-table thead small { display: block; }
.compose3-table td { font-size: clamp(12px, 1vw, 17px); font-weight: 750; }
.compose3-points { display: grid; gap: 8px; }
.compose3-point { padding: 0; overflow: hidden; }
.compose3-point > summary { display: flex; align-items: center; gap: 12px; padding: 9px 13px; cursor: pointer; }
.compose3-point > summary > strong { min-width: 150px; }
.compose3-week-lights { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; flex: 1; }
.compose3-light { min-width: 0; padding: 6px 2px; border-radius: 4px; text-align: center; font-weight: 800; }
.compose3-point-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 13px; border-top: 1px solid var(--line); }
.compose3-point-settings fieldset { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; border: 1px solid var(--line); }
.compose3-point-settings label, .compose3-day header label { display: inline-flex; align-items: center; gap: 5px; }
.compose3-point-settings select, .compose3-day select { width: 53px; min-height: 32px; padding: 3px; }
.compose3-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 8px; }
.compose3-day { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 6px; }
.compose3-day header { display: flex; justify-content: space-between; gap: 5px; }
.compose3-day header small { display: block; }
.compose3-assigned, .compose3-suggestions, .compose3-all-candidates { margin-top: 8px; }
.compose3-card, .compose3-candidate { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 5px; margin-top: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 5px; background: #fff; text-align: left; overflow-wrap: anywhere; }
.compose3-card button { border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.compose3-candidate { cursor: pointer; }
.compose3-candidate:hover { border-color: var(--primary); }
.compose3-card.has-warning, .compose3-candidate.has-warning { background: #ffe477; }
.compose3-card.is-agreed { background: #3d9e71; color: #fff; }
.compose3-card.is-disputed { background: #ffe477; }
.compose3-dispute { margin: 3px 0 7px; padding: 6px; border: 2px solid #c28a00; border-radius: 5px; background: #fff5c4; overflow-wrap: anywhere; }
.compose3-dispute button { display: inline-block; margin-left: 5px; border: 0; background: transparent; color: var(--primary); cursor: pointer; text-decoration: underline; }
.composer-assignment-card.is-agreed, .compose2-assignment-card.is-agreed,
.schedule-point-cell.is-agreed, .schedule-consent-agreed { background: #3d9e71 !important; color: #fff; }
.composer-assignment-card.is-disputed, .compose2-assignment-card.is-disputed,
.schedule-point-cell.is-disputed, .schedule-consent-disputed { background: #ffe477 !important; }
.compose3-candidate small { color: #684a00; }
.compose3-all-candidates > div { max-height: 180px; overflow-y: auto; }
.compose3-all-candidates input { width: 100%; }
.compose3-save-bar { position: sticky; bottom: 0; z-index: 10; }
@media (max-width: 1350px) { .compose3-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 850px) { .compose3-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } .compose3-point-count { display: none; } }
@media (max-width: 600px) { .compose3-days { grid-template-columns: 1fr; } .compose3-point > summary { display: block; } .compose3-week-lights { margin-top: 6px; } .schedule-compose3-page .sidebar { display: none; } }

/* Compose2 keeps both readiness grids and the assignment grid visible on FHD. */
@media (min-width: 1101px) {
  .schedule-compose2-page .app-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .schedule-compose2-page .sidebar { padding: 16px 12px 12px; }
  .schedule-compose2-page .sidebar-brand { padding-bottom: 12px; }
  .schedule-compose2-page .sidebar-brand img { width: 136px; }
  .schedule-compose2-page .nav-link { min-height: 38px; padding-inline: 8px; font-size: 12px; }
  .schedule-compose2-page .topbar { min-height: 46px; padding: 0 22px; }
  .schedule-compose2-page .container.content { padding: 6px 20px 0; }
}
.schedule-compose2-page .page-heading { margin: 0 0 7px; }
.schedule-compose2-page .page-heading h1 { margin-bottom: 2px; font-size: 27px; }
.schedule-compose2-page .page-heading .source-kicker { margin: 0; }
.schedule-compose2-page .page-heading .muted { margin: 0; font-size: 11px; }
@media (min-width: 1101px) {
  .schedule-compose2-page .page-heading .source-kicker,
  .schedule-compose2-page .page-heading .muted { display: none; }
}
.schedule-compose2-page .schedule-view-tabs { margin-bottom: 6px; }
.schedule-compose2-page .schedule-view-tab { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.schedule-compose2-page .compose2-toolbar { gap: 7px; margin-bottom: 6px; padding: 5px 9px; }
.schedule-compose2-page .compose2-toolbar .schedule-week-nav { gap: 5px; }
.schedule-compose2-page .compose2-toolbar .schedule-week-nav > div { min-width: 145px; }
.schedule-compose2-page .compose2-toolbar .schedule-week-nav strong { font-size: 14px; }
.schedule-compose2-page .compose2-toolbar .inline-date-form label { display: flex; align-items: center; gap: 6px; }
.schedule-compose2-page .compose2-toolbar .secondary-button,
.schedule-compose2-page .compose2-toolbar input { min-height: 28px; padding: 3px 7px; font-size: 12px; }
.schedule-compose2-page .compose2-legend span { padding: 3px 6px; font-size: 11px; }
.schedule-compose2-page .compose2-source-note { margin: 0 0 6px; color: var(--muted); font-size: 11px; }
.schedule-compose2-page .compose2-root { gap: 4px; }
.schedule-compose2-page .compose2-ready-stack { gap: 4px; }
.schedule-compose2-page .compose2-table { font-size: 11px; }
.schedule-compose2-page .compose2-table th,
.schedule-compose2-page .compose2-table td { height: 22px; padding: 1px 2px; }
.schedule-compose2-page .compose2-table th:first-child { width: 52px; min-width: 52px; }
.schedule-compose2-page .compose2-ready-table th:not(:first-child):not(:last-child),
.schedule-compose2-page .compose2-ready-table td:not(:first-child):not(:last-child) { width: 70px; min-width: 70px; max-width: 70px; }
.schedule-compose2-page .compose2-ready-table thead th { height: 39px; }
.schedule-compose2-page .compose2-name-button { min-height: 36px; padding: 1px; }
.schedule-compose2-page .compose2-status-cell > button,
.schedule-compose2-page .compose2-status-cell > span { min-height: 22px; }
.schedule-compose2-page .compose2-total-heading,
.schedule-compose2-page .compose2-total { width: 64px; min-width: 64px; }
.schedule-compose2-page .compose2-layout-button { width: 24px; height: 24px; margin-top: 1px; font-size: 16px; }
.schedule-compose2-page .compose2-section-heading { padding: 4px 8px; font-size: 12px; line-height: 1.15; }
.schedule-compose2-page .compose2-assignments-table th:not(:first-child):not(:last-child),
.schedule-compose2-page .compose2-assignments-table td:not(:first-child):not(:last-child) { width: 74px; min-width: 74px; max-width: 74px; }
.schedule-compose2-page .compose2-assignments-table thead th { height: 31px; }
.schedule-compose2-page .compose2-assignment-cell { height: 34px !important; }
.schedule-compose2-page .compose2-assignment-card { min-height: 17px; padding: 1px 2px; }
.schedule-compose2-page .compose2-assignment-card .composer-assignment-name { font-size: 10.5px; }
.schedule-compose2-page .schedule-save-bar { gap: 10px; padding: 5px 9px; }
.schedule-compose2-page .schedule-save-bar .primary,
.schedule-compose2-page .schedule-save-bar .secondary-button { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.employee-profile-dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(42, 41, 38, .28); }
.employee-profile-dialog::backdrop { background: rgba(42, 41, 38, .52); backdrop-filter: blur(3px); }
.employee-profile-shell { position: relative; display: grid; gap: 18px; padding: 24px; }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1edef; color: var(--ink); font-size: 25px; }
.employee-profile-head { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 18px; padding-right: 42px; }
.employee-profile-head h2 { margin: 3px 0 8px; }
.employee-profile-photo { display: grid; width: 92px; height: 92px; place-items: center; overflow: hidden; border-radius: 24px; background: #eadbe6; color: var(--accent); font-size: 24px; font-weight: 800; }
.employee-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.employee-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.employee-profile-fields > div { min-height: 64px; padding: 11px 13px; background: #fff; }
.employee-profile-fields dt { color: var(--muted); font-size: 11px; }
.employee-profile-fields dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 650; }
.employee-bindings-section { display: grid; gap: 10px; padding-block: 4px 14px; border-bottom: 1px solid var(--line); }
.employee-binding-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.employee-binding-row > span { color: var(--muted); font-size: 12px; font-weight: 700; }

.preference-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.preference-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.preference-kpis article { display: grid; gap: 7px; border-top: 4px solid var(--accent); }
.preference-kpis small { color: var(--muted); }
.preference-kpis strong { font-size: 28px; }
.preference-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 14px; }
.preference-link-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.preference-link-block small { color: var(--muted); }
.preference-action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.preference-action-buttons form { margin: 0; }
.preference-matrix-panel { max-height: calc(100vh - 350px); padding: 0; overflow: auto; }
.preference-matrix { min-width: 1220px; }
.preference-matrix thead th { position: sticky; top: 0; z-index: 4; background: #faf9f6; text-align: center; }
.preference-matrix thead th:first-child,
.preference-matrix tbody th { position: sticky; left: 0; z-index: 3; min-width: 220px; background: #fff; text-align: left; }
.preference-matrix thead th:first-child { z-index: 6; background: #f4edf2; }
.preference-matrix th small,
.preference-matrix td small { display: block; margin-top: 3px; color: var(--muted); }
.preference-matrix td { min-width: 92px; text-align: center; }
.preference-matrix .preference-off { background: #fff0df; color: #8a3a00; font-weight: 750; }
.preference-matrix .preference-shift { background: #eef8e8; color: #285f08; }
.preference-matrix .preference-comment { min-width: 220px; max-width: 300px; text-align: left; white-space: pre-wrap; }
.link-button { min-height: 32px; padding: 3px 6px; border: 0; background: transparent; color: var(--accent); cursor: pointer; text-decoration: underline; }

.public-preference-card { width: min(680px, 100%); margin: 4vh auto; }
.public-preference-card h1 { margin-bottom: 5px; }
.public-preference-form { display: grid; gap: 16px; margin-top: 20px; }
.public-preference-form label { display: grid; gap: 7px; }
.public-preference-form fieldset { display: grid; gap: 14px; padding: 0; border: 0; }
.preference-employee-confirm { display: grid; gap: 3px; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #f4edf2; }
.preference-employee-confirm small { color: var(--muted); }
.preference-day-grid { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: 7px; }
.preference-day-option { cursor: pointer; }
.preference-day-option input { position: absolute; opacity: 0; }
.preference-day-option span { display: grid; min-height: 66px; place-content: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; }
.preference-day-option input:checked + span { border-color: #ed802d; background: #fff0df; color: #8a3a00; box-shadow: 0 0 0 2px rgba(237, 128, 45, .12); }
.preference-day-option input:focus-visible + span { outline: 3px solid rgba(149, 0, 117, .25); }
.preference-day-option small { margin-top: 3px; color: inherit; }
.employee-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-messages-section { display: grid; gap: 9px; padding-top: 6px; border-top: 1px solid var(--line); }
.employee-messages-section h3,
.employee-messages-section p { margin: 0; }
.employee-message-list { display: grid; gap: 8px; max-height: 330px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.employee-message-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.employee-message-list li > div { display: flex; justify-content: space-between; gap: 10px; }
.employee-message-list time { color: var(--muted); font-size: 11px; }
.employee-message-list p { margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.employee-message-photo { display: block; width: min(240px, 100%); max-height: 220px; margin-top: 8px; border-radius: 9px; object-fit: cover; }
.employee-message-list audio { width: min(320px, 100%); margin-top: 8px; }
.message-media-label { display: inline-block; margin-top: 7px; padding: 4px 7px; border-radius: 7px; background: #eee9ec; color: var(--muted); font-size: 11px; }
.schedule-hint { margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.schedule-form { margin: 0; }
.schedule-table-panel { padding: 0; overflow: auto; max-height: calc(100vh - 310px); }
.barista-schedule-table { min-width: 1280px; }
.barista-schedule-table thead th { position: sticky; top: 0; z-index: 4; background: #faf9f6; text-align: center; }
.barista-schedule-table thead th span, .barista-schedule-table thead th small { display: block; }
.barista-schedule-table thead th small { margin-top: 2px; color: var(--muted); }
.barista-schedule-table td { min-width: 145px; padding: 8px; }
.barista-schedule-table select { min-width: 130px; padding: 9px 30px 9px 9px; font-size: 13px; }
.barista-schedule-table .schedule-employee-column { position: sticky; left: 0; z-index: 3; min-width: 240px; background: var(--surface); box-shadow: 1px 0 var(--line); text-align: left; }
.barista-schedule-table thead .schedule-employee-column { z-index: 6; background: #f4edf2; }
.schedule-employee-column strong, .schedule-employee-column small { display: block; }
.schedule-employee-column small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.schedule-save-bar { position: sticky; bottom: 0; z-index: 8; display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 13px 18px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius-md) var(--radius-md); background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 24px rgba(42, 41, 38, .08); backdrop-filter: blur(8px); }
.schedule-save-bar span { color: var(--muted); font-size: 13px; }
.point-schedule-table td { min-width: 170px; vertical-align: top; }
.point-schedule-table td.schedule-point-cell-empty { background: #fff0f0; }
.schedule-point-cell-empty .assignment-picker > summary { border-color: #e3a4a4; background: #fff8f8; color: var(--blocked-text); }
.assignment-picker { min-width: 150px; }
.assignment-picker > summary { display: flex; min-height: 40px; align-items: center; padding: 9px 30px 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; line-height: 1.25; list-style-position: outside; }
.assignment-picker > summary span { overflow-wrap: anywhere; }
.assignment-picker > summary:hover { border-color: var(--accent); }
.assignment-picker[open] > summary { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(149, 0, 117, .09); }
.assignment-picker-menu { min-width: 235px; margin-top: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 24px rgba(42, 41, 38, .12); }
.assignment-picker-search { width: 100%; margin-bottom: 7px; padding: 8px 9px; font-size: 13px; }
.assignment-picker-options { max-height: 230px; overflow-y: auto; border-block: 1px solid var(--line); }
.assignment-picker-options label { display: flex; min-height: 38px; align-items: center; gap: 8px; padding: 7px 5px; border-bottom: 1px solid #eee9ec; cursor: pointer; font-size: 13px; }
.assignment-picker-options label:last-child { border-bottom: 0; }
.assignment-picker-options label:hover { background: #faf5f8; }
.assignment-picker-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.assignment-picker-close { width: 100%; margin-top: 8px; }
.today-schedule-table th:first-child { min-width: 210px; }
.today-schedule-table td { min-width: 175px; vertical-align: top; }
.today-row-attention > th,
.today-row-attention > td { background: #fff0f0; }
.today-status-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.today-status-list li { display: grid; gap: 2px; }
.today-report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.today-report-toolbar > div:first-child { display: grid; gap: 4px; }
.today-report-toolbar > div:first-child small { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.today-report-toolbar > div:first-child strong { font-size: 1.45rem; }
.today-report-toolbar > div:first-child span { color: var(--muted); font-size: .86rem; }
.today-report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.today-report-kpis article { display: grid; gap: 5px; min-height: 128px; border-top: 4px solid var(--accent); }
.today-report-kpis article > small { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.today-report-kpis article > strong { font-size: 2rem; line-height: 1; }
.today-report-kpis article > span { color: var(--muted); font-size: .82rem; }
.today-report-kpis .today-kpi-yellow { border-top-color: #ffc300; }
.today-report-kpis .today-kpi-red { border-top-color: #b42318; }
.today-attention-section { margin-bottom: 20px; }
.today-attention-section .section-heading { margin-bottom: 12px; }
.today-attention-section h2 { margin: 2px 0 0; }
.today-attention-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.today-attention-card { overflow: hidden; border-top: 4px solid #ffc300; }
.today-attention-card.today-attention-red { border-top-color: #b42318; }
.today-attention-card > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.today-attention-card > header small { color: var(--muted); }
.today-attention-actions { display: grid; justify-items: end; gap: 5px; }
.today-attention-card h3 { margin: 4px 0 0; }
.today-attention-reason { margin: 14px 0; padding: 10px 12px; border-radius: 10px; background: #fff8dd; font-weight: 700; }
.today-attention-red .today-attention-reason { background: #fff0f0; color: #8f1f1f; }
.today-dialogue-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.today-dialogue-heading small { color: var(--muted); }
.today-dialogue-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.today-dialogue-list li { max-width: 92%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.today-dialogue-list li.today-dialogue-outbound { margin-left: auto; background: #edf7ee; }
.today-dialogue-list li > div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .75rem; }
.today-dialogue-list li p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.today-dialogue-list li > small, .today-dialogue-empty { color: var(--muted); font-size: .75rem; }
.today-all-clear { margin-bottom: 20px; border-color: #aad8bc; background: #effaf3; color: #17683a; }
.focus-status { display: inline-flex; width: fit-content; padding: 4px 9px; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.focus-status-neutral { color: #5d6470; background: #eef0f3; }
.focus-status-green { color: #17683a; background: #dcf5e6; }
.focus-status-yellow { color: #775600; background: #fff0b8; }
.focus-status-red { color: #9d2020; background: #ffe0e0; }
.employee-message-outbound { margin-left: 8%; background: #edf7ee; }
.employee-message-inbound { margin-right: 8%; }
.employee-bot-message-form { display: grid; gap: 10px; margin: 14px 0; }
.employee-bot-message-form textarea { width: 100%; resize: vertical; }
.scenario-runtime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.scenario-runtime-grid article { display: grid; gap: 5px; }
.scenario-runtime-grid form { display: grid; gap: 10px; align-content: start; }
.scenario-runtime-grid strong { font-size: 1.35rem; }
.checkbox-list { display: grid; gap: 7px; max-height: 240px; overflow: auto; padding: 4px; }
.checkbox-list label { display: flex; gap: 8px; align-items: flex-start; }
.scenario-editor { display: grid; grid-template-columns: 220px minmax(460px, 1fr) 300px; gap: 14px; align-items: start; }
.scenario-palette, .scenario-inspector { display: grid; gap: 10px; }
.scenario-palette button { width: 100%; }
.scenario-canvas-wrap { padding: 0; overflow: auto; }
.scenario-canvas { position: relative; min-width: 760px; min-height: 620px; background: radial-gradient(circle, #d9d8d2 1px, transparent 1px); background-size: 22px 22px; }
.scenario-node { position: absolute; display: grid; gap: 4px; width: 190px; min-height: 92px; padding: 12px; text-align: left; border: 1px solid #cbc9bf; border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgb(33 39 35 / 8%); cursor: grab; touch-action: none; }
.scenario-node.selected { border-color: #725a24; box-shadow: 0 0 0 3px rgb(177 142 67 / 20%); }
.scenario-node small { color: #777; text-transform: uppercase; letter-spacing: .05em; }
.scenario-node span { color: #60645f; font-size: .8rem; }
.barista-shift-mode { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.barista-shift-mode h2, .barista-shift-mode p { margin: 0; }
.scenario-edge-list { display: grid; gap: 6px; padding: 0; list-style: none; }
.scenario-edge-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.scenario-edge-list code { overflow-wrap: anywhere; font-size: .75rem; }
.scenario-json-details { margin-top: 16px; }
.scenario-json-details textarea { width: 100%; margin: 12px 0; font-family: ui-monospace, monospace; }
@media (max-width: 1050px) {
  .today-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-attention-grid { grid-template-columns: 1fr; }
  .scenario-runtime-grid { grid-template-columns: 1fr; }
  .scenario-editor { grid-template-columns: 1fr; }
  .scenario-canvas-wrap { order: 2; }
  .scenario-inspector { order: 3; }
}
@media (max-width: 680px) {
  .today-report-toolbar { align-items: stretch; flex-direction: column; }
  .today-report-kpis { grid-template-columns: 1fr; }
  .today-dialogue-list li { max-width: 100%; }
}
.status-warning { color: #b42318; font-weight: 800; cursor: help; }
.status-ok { color: #137333; font-weight: 700; }
.hours-override { margin-top: 9px; font-weight: 400; }
.hours-override summary { color: var(--accent); cursor: pointer; font-size: 12px; }
.hours-override form { display: grid; gap: 7px; margin-top: 8px; }
.inline-date-form { display: flex; align-items: end; gap: 8px; }
.settings-stack { display: grid; gap: 16px; margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.settings-grid > div { display: grid; align-content: start; gap: 10px; }
.rollout-employee-list { display: grid; gap: 7px; max-height: 420px; overflow-y: auto; }
.rollout-employee-list label,
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.rollout-employee-list small { margin-left: auto; color: var(--muted); }
.scenario-message-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scenario-message-grid fieldset,
.weekly-hours-grid fieldset { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.scenario-message-grid label { display: grid; gap: 5px; margin-top: 8px; }
.scenario-message-grid textarea { width: 100%; resize: vertical; }
.weekly-hours-form { display: grid; gap: 12px; }
.weekly-hours-grid { display: grid; grid-template-columns: repeat(7, minmax(115px, 1fr)); gap: 8px; overflow-x: auto; }
.weekly-hours-grid label { display: grid; gap: 4px; margin-top: 7px; font-size: 12px; }

@media (max-width: 1100px) {
  .schedule-toolbar { grid-template-columns: 1fr 1fr; }
  .schedule-summary { text-align: left; }
  .composer-toolbar { grid-template-columns: 1fr 1fr; }
  .composer-main { grid-template-columns: minmax(0, 1fr) 270px; }
  .compose2-toolbar { grid-template-columns: 1fr 1fr; }
  .compose2-legend { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .page-heading-actions, .barista-toolbar { align-items: stretch; flex-direction: column; }
  .barista-link-form { grid-template-columns: 1fr; }
  .schedule-toolbar { grid-template-columns: 1fr; }
  .composer-toolbar { grid-template-columns: 1fr; }
  .composer-range-form { flex-wrap: wrap; }
  .composer-main { grid-template-columns: 1fr; }
  .composer-board { max-height: 58vh; }
  .composer-roster { position: static; max-height: none; }
  .preference-toolbar,
  .preference-actions { align-items: stretch; flex-direction: column; }
  .preference-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preference-day-grid { grid-template-columns: repeat(4, minmax(58px, 1fr)); }
  .public-preference-card { margin: 0 auto; }
  .employee-profile-fields { grid-template-columns: 1fr; }
  .employee-profile-head { grid-template-columns: 72px minmax(0, 1fr); }
  .employee-profile-photo { width: 72px; height: 72px; border-radius: 18px; }
  .schedule-week-nav { justify-content: space-between; }
  .schedule-save-bar { align-items: stretch; flex-direction: column; }
  .schedule-save-bar .primary { width: 100%; }
  .schedule-view-tabs { display: flex; width: 100%; }
  .schedule-view-tabs { overflow-x: auto; }
  .schedule-view-tab { flex: 1 0 auto; text-align: center; }
  .compose2-layout-dialog [data-compose2-layout-fields] { grid-template-columns: 1fr; }
  .settings-grid,
  .scenario-message-grid { grid-template-columns: 1fr; }
}
.receipt-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.receipt-heading .eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.receipt-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.receipt-kpi-grid article { min-height: 124px; padding: 18px; display: grid; align-content: space-between; gap: 8px; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.receipt-kpi-grid article:nth-child(2) { border-top-color: var(--success); }
.receipt-kpi-grid article:nth-child(3) { border-top-color: var(--accent); }
.receipt-kpi-grid article:nth-child(4) { border-top-color: #ed802d; }
.receipt-kpi-grid span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.receipt-kpi-grid strong { font-size: clamp(22px, 2vw, 30px); }
.receipt-kpi-grid small { color: var(--muted); }
.receipt-filters { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)) auto; gap: 12px; align-items: end; }
.receipt-filters label, .receipt-settings-grid label { display: grid; gap: 6px; }
.receipt-filters button { min-height: 44px; }
.receipt-table td { vertical-align: middle; }
.receipt-table-note { display: block; margin-top: 0.25rem; max-width: 24rem; }
.receipt-comment-cell {
  max-width: 24rem;
  min-width: 13rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.receipt-status { display: inline-flex; min-height: 28px; align-items: center; padding: 3px 9px; border-radius: 999px; background: #ece9e4; font-size: 12px; font-weight: 800; }
.status-completed, .status-confirmed { color: #285f08; background: #e4f4da; }
.status-needs_review, .status-failed, .status-duplicate { color: #8a3a00; background: #fff0df; }
.status-processing, .status-pending, .status-waiting_media { color: #6b0757; background: #f6e8f3; }
.receipt-problem { color: #a43f00; font-weight: 800; }
.receipt-ok { color: #3c750e; font-weight: 800; }
.receipt-pagination, .receipt-actions, .receipt-copy-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.receipt-pagination .disabled { pointer-events: none; opacity: .45; }
.receipt-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.receipt-settings-grid > div { display: grid; align-content: start; gap: 14px; }
.receipt-settings-grid label small { color: var(--muted); }
.receipt-settings-grid .check-row { grid-template-columns: auto 1fr; align-items: center; min-height: 44px; }
.receipt-settings-grid .check-row input { width: 22px; height: 22px; }
.receipt-save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.receipt-admin-list { margin: 0; padding: 0; list-style: none; }
.receipt-admin-list li { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.receipt-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.receipt-detail-grid aside { position: sticky; top: 16px; }
.receipt-issues { display: grid; gap: 10px; }
.receipt-issues article { padding: 12px 14px; border-left: 4px solid #ed802d; border-radius: 8px; background: #fff5e9; }
.receipt-issues article.critical { border-color: #b42318; background: #fff0ee; }
.receipt-issues article.resolved { border-color: var(--success); background: #eef8e8; }
.receipt-issues p { margin: 5px 0; }
.receipt-card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.receipt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.receipt-fields div { padding: 11px 13px; background: var(--surface); }
.receipt-fields dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.receipt-fields dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.receipt-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.receipt-media-grid img { width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #f4f1ec; }
.receipt-ocr { max-height: 460px; overflow: auto; padding: 14px; border-radius: 8px; background: #2a2926; color: #fff; font: 13px/1.55 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.receipt-comment { white-space: pre-wrap; overflow-wrap: anywhere; }
.receipt-timeline { margin: 0; padding-left: 20px; }
.receipt-timeline li { padding: 0 0 16px 5px; }
.receipt-timeline span, .receipt-timeline small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 1100px) { .receipt-kpi-grid { grid-template-columns: repeat(2, 1fr); } .receipt-filters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .receipt-heading, .receipt-detail-grid { display: grid; grid-template-columns: 1fr; } .receipt-detail-grid aside { position: static; } .receipt-kpi-grid, .receipt-settings-grid, .receipt-fields, .receipt-filters { grid-template-columns: 1fr; } .receipt-actions { justify-content: stretch; } .receipt-actions form, .receipt-actions button { width: 100%; } .receipt-media-grid { grid-template-columns: 1fr; } }

/* Unified employee and location cards. */
.entity-cards-page { max-width: 1680px; }
.entity-cards-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.entity-cards-heading h1 { margin: 4px 0 6px; font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -.035em; }
.entity-cards-heading p { margin: 0; }
.entity-cards-heading .eyebrow, .entity-section .eyebrow { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.entity-master-detail { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); gap: 18px; align-items: start; }
.entity-master { position: sticky; top: 18px; max-height: calc(100vh - 115px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.entity-search { padding: 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }
.entity-search input { width: 100%; min-height: 44px; }
.entity-groups, .entity-flat-list { overflow: auto; padding: 8px; }
.entity-group { border-bottom: 1px solid var(--line); }
.entity-group > summary { min-height: 48px; padding: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 800; }
.entity-group > summary strong { min-width: 28px; min-height: 28px; display: grid; place-items: center; border-radius: 999px; background: #f2eee9; font-size: 12px; }
.entity-group-items { display: grid; gap: 3px; padding: 0 0 8px; }
.entity-list-item { position: relative; min-height: 60px; padding: 8px 10px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.entity-list-item:hover { background: #faf6f1; }
.entity-list-item.active { background: #f7e8f3; color: var(--primary); box-shadow: inset 3px 0 var(--primary); }
.entity-list-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.entity-list-item strong, .entity-list-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-list-item small { color: var(--muted); font-size: 12px; }
.entity-list-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #efeae4; color: var(--primary); font-size: 12px; font-weight: 850; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.status-dot.danger { background: var(--danger); }
.entity-group-empty { margin: 8px; color: var(--muted); font-size: 13px; }
.entity-detail { min-width: 0; display: grid; gap: 16px; }
.entity-detail-empty { min-height: 480px; padding: 50px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.65); }
.entity-detail-empty h2 { margin: 16px 0 6px; }
.entity-detail-empty p { max-width: 440px; margin: 0; color: var(--muted); }
.entity-detail-mark { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 24px; background: #f7e8f3; color: var(--primary); font-size: 34px; }
.entity-profile-header { min-height: 128px; padding: 20px; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(135deg, #fff 55%, #faf3f8); box-shadow: var(--shadow); }
.entity-profile-avatar { width: 84px; height: 84px; overflow: hidden; display: grid; place-items: center; border-radius: 24px; background: var(--primary); color: #fff; font-size: 23px; font-weight: 850; }
.entity-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.entity-profile-title h2 { margin: 7px 0 3px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.025em; }
.entity-profile-title p { margin: 0; color: var(--muted); }
.status-row, .review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.status-pill { min-height: 28px; padding: 4px 10px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pill.success { background: #eaf5e5; color: #36730c; }
.status-pill.danger { background: #fff0ee; color: #a1312b; }
.status-pill.neutral { background: #f0ede8; color: #625d56; }
.card-section-nav { padding: 8px; display: flex; gap: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scrollbar-width: thin; }
.card-section-nav a { min-height: 40px; padding: 8px 11px; display: inline-flex; align-items: center; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.card-section-nav a:hover { background: #faf4f8; color: var(--primary); }
.entity-section { scroll-margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 7px 25px rgba(42,41,38,.045); }
.entity-section h3 { margin: 3px 0 0; font-size: 20px; }
.entity-section h4 { margin: 22px 0 10px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 16px; }
.section-heading p { margin: 0; }
.section-heading > a { min-height: 40px; display: inline-flex; align-items: center; font-weight: 750; }
.source-badge { padding: 5px 9px; border-radius: 8px; background: #f5f2ee; color: var(--muted); font-size: 12px; }
.entity-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.entity-facts > div { min-height: 72px; padding: 12px 14px; display: grid; align-content: center; gap: 5px; background: var(--surface); }
.entity-facts dt { color: var(--muted); font-size: 12px; font-weight: 750; }
.entity-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.copy-row button { min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--primary); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; }
.compact-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; }
.compact-details > summary { min-height: 48px; padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 750; }
.table-scroll { overflow-x: auto; }
.compact-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compact-table th, .compact-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.compact-table th { color: var(--muted); font-size: 12px; }
.compact-table code, .entity-facts code { font-size: 12px; overflow-wrap: anywhere; }
.settings-form { display: grid; gap: 16px; }
.settings-form.compact-form { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.settings-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.settings-form label.wide { grid-column: 1 / -1; }
.settings-form input, .settings-form select { width: 100%; min-height: 44px; }
.settings-form .primary-button { width: fit-content; min-height: 44px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.coordinate-copy { margin: 0; }
.review-settings { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.review-actions { margin-top: 14px; }
.empty-inline, .helper-text { margin: 12px 0 0; color: var(--muted); }
.binding-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.binding-cards a { min-height: 86px; padding: 13px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 11px; color: inherit; text-decoration: none; }
.binding-cards a:hover { border-color: var(--primary); }
.binding-cards small, .binding-cards span { color: var(--muted); }
.simple-list { margin: 0; padding: 0; display: grid; gap: 1px; list-style: none; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); }
.simple-list li { min-height: 54px; padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; }
.simple-list span { color: var(--muted); text-align: right; }
.entity-sync-footer { padding: 4px 8px 18px; color: var(--muted); font-size: 12px; text-align: right; }
.notice.warning { border-color: #e7c664; background: #fff8dd; color: #725500; }
.notice.warning span { display: block; margin-top: 3px; font-size: 13px; }

@media (max-width: 1050px) {
  .entity-master-detail { grid-template-columns: 300px minmax(0, 1fr); }
  .entity-facts, .settings-grid { grid-template-columns: 1fr; }
  .settings-form label.wide { grid-column: auto; }
  .binding-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .entity-cards-heading { align-items: stretch; flex-direction: column; }
  .entity-master-detail { display: block; }
  .entity-master-detail.has-detail .entity-master { display: none; }
  .entity-master { position: static; max-height: none; }
  .entity-groups, .entity-flat-list { max-height: none; }
  .entity-profile-header { grid-template-columns: 66px minmax(0, 1fr); padding: 15px; }
  .entity-profile-avatar { width: 66px; height: 66px; border-radius: 19px; }
  .back-to-master { grid-column: 1 / -1; width: 100%; }
  .card-section-nav { position: sticky; top: 0; z-index: 4; }
  .entity-section { padding: 15px; }
  .section-heading { display: grid; }
  .settings-form.compact-form { grid-template-columns: 1fr; }
  .binding-cards { grid-template-columns: 1fr; }
  .simple-list li { align-items: start; flex-direction: column; }
  .simple-list span { text-align: left; }
}

/* Pulse — live company operations surface. */
.pulse-page { max-width: 1880px; background: #f6f4ef; }
.pulse-root { display: grid; gap: 24px; color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
.pulse-header { min-height: 94px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.pulse-title-line { display: flex; align-items: center; gap: 10px; }
.pulse-kicker { margin: 0; color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.pulse-header h1 { margin: 4px 0 0; font-size: clamp(38px, 5vw, 58px); font-weight: 800; line-height: .95; letter-spacing: -.05em; }
.pulse-mode, .pulse-location-state { min-height: 28px; padding: 4px 10px; display: inline-flex; align-items: center; border-radius: 999px; background: #eeebe5; color: #5e5a53; font-size: 12px; font-weight: 800; }
.pulse-mode.is-live { background: #eaf5e5; color: #347407; }
.pulse-mode.is-live::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #3c8b0a; box-shadow: 0 0 0 4px rgba(60,139,10,.12); }
.pulse-date-form { display: flex; align-items: end; gap: 8px; }
.pulse-date-form label { display: grid; gap: 6px; font-size: 13px; }
.pulse-date-form input { min-height: 44px; }
.pulse-source-bar { min-height: 42px; padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid #e7e3dc; border-radius: 12px; background: rgba(255,255,255,.7); }
.pulse-source-bar span { min-height: 26px; padding: 4px 9px; border-radius: 999px; background: #efede8; color: var(--muted); font-size: 12px; }
.pulse-source-bar span::before { content: ""; width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: #9a958d; }
.pulse-source-bar span.is-ready::before { background: #3c8b0a; }
.pulse-source-bar span.is-unavailable::before { background: #c13d36; }
.pulse-source-bar strong { color: var(--ink); }
.pulse-update-state { margin: -18px 4px 0; color: var(--muted); font-size: 12px; }
.pulse-update-state.is-error { color: var(--danger); }
.pulse-section-heading { margin-bottom: 13px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.pulse-section-heading h2 { margin: 4px 0 0; font-size: 25px; font-weight: 800; }
.pulse-section-heading > span { color: var(--muted); font-size: 13px; font-weight: 750; }
.pulse-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
.pulse-kpi, .pulse-mini-kpi { position: relative; overflow: hidden; border: 1px solid #e7e3dc; background: #fff; }
.pulse-kpi { min-height: 112px; padding: 17px 16px 15px 20px; display: grid; align-content: space-between; gap: 14px; border-radius: 16px; box-shadow: 0 10px 30px rgba(42,41,38,.055); }
.pulse-kpi::before, .pulse-mini-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--primary); }
.pulse-accent-sun::before { background: #ffc300; }
.pulse-accent-green::before { background: #3c8b0a; }
.pulse-kpi span, .pulse-mini-kpi span { color: var(--muted); font-size: 12px; font-weight: 800; }
.pulse-kpi strong { font-size: clamp(22px, 2.2vw, 30px); line-height: 1; letter-spacing: -.035em; }
.pulse-kpi.is-loading span, .pulse-kpi.is-loading strong { height: 15px; border-radius: 6px; background: linear-gradient(90deg, #eeeae4, #f8f6f2, #eeeae4); background-size: 200% 100%; animation: pulse-loading 1.1s linear infinite; }
.pulse-kpi.is-loading strong { width: 70%; height: 28px; }
.pulse-network { margin-top: 12px; padding: 18px 18px 12px; }
.pulse-company-operations { margin-top: 12px; padding: 12px; display: grid; grid-template-columns: minmax(190px,.72fr) repeat(2,minmax(280px,1fr)); gap: 10px; }
.pulse-opening-summary { padding: 12px 14px; display: grid; align-content: center; gap: 9px; border-radius: 11px; background: #f7f5f1; }
.pulse-opening-summary p { margin: 0; color: #5d5751; font-size: 14px; }
.pulse-opening-summary strong { color: #302d29; font-size: 18px; font-variant-numeric: tabular-nums; }
.pulse-opening-summary .is-danger, .pulse-opening-summary .is-danger strong { color: #b23831; }
.pulse-company-flow-block { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 5px; }
.pulse-company-flow-block > div:first-child h3 { margin: 0; font-size: 14px; }
.pulse-company-flow-block > div:first-child p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.pulse-company-flow { min-height: 126px; margin: 0; }
.pulse-company-control { min-width: 0; margin-top: 10px; padding: 14px; display: grid; gap: 10px; }
.pulse-company-control .pulse-company-control-strip { grid-auto-columns: minmax(64px,72px); justify-content: start; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.pulse-chart-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.pulse-chart-heading h3, .pulse-chart-heading h4 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.pulse-chart-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.pulse-chart-heading > strong { color: var(--primary); font-size: 28px; letter-spacing: -.035em; }
.pulse-chart { position: relative; min-height: 190px; margin-top: 8px; outline: none; touch-action: pan-y; }
.pulse-chart:focus-visible { border-radius: 10px; box-shadow: 0 0 0 3px rgba(149,0,117,.16); }
.pulse-chart-svg { width: 100%; height: 190px; display: block; overflow: visible; }
.pulse-chart-gridline { stroke: #e8e4dd; stroke-width: 1; }
.pulse-chart-line { stroke: #950075; stroke-width: 4; stroke-linecap: round; }
.pulse-chart-line.is-alert { stroke: #c13d36; stroke-width: 5; }
.pulse-chart-axis { fill: #7b756d; font-size: 11px; font-family: Inter, "Segoe UI", Arial, sans-serif; }
.pulse-chart-cursor { stroke: rgba(42,41,38,.3); stroke-width: 1; stroke-dasharray: 3 3; }
.pulse-chart-dot { fill: #fff; stroke: #950075; stroke-width: 3; }
.pulse-chart-dot.is-alert { stroke: #c13d36; }
.pulse-chart-tooltip { position: absolute; top: 5px; right: 5px; padding: 5px 8px; border-radius: 8px; background: rgba(42,41,38,.88); color: #fff; font-size: 12px; pointer-events: none; }
.pulse-chart-tooltip.is-alert { background: #a8322c; }
.pulse-chart-empty { min-height: 150px; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.pulse-locations-section { display: grid; }
.pulse-location-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.pulse-location { min-width: 0; padding: 0; display: grid; gap: 0; overflow: hidden; border-radius: 15px; border-top: 4px solid #3c8b0a; content-visibility: auto; contain-intrinsic-size: auto 150px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.pulse-location.is-danger { border-color: #e6aaa5; border-top-color: #c13d36; background: linear-gradient(100deg, #fff 68%, #fff5f3); box-shadow: 0 9px 26px rgba(193,61,54,.11); }
.pulse-location.is-loading { min-height: 150px; background: linear-gradient(110deg, #fff, #f5f2ed, #fff); background-size: 200% 100%; animation: pulse-loading 1.1s linear infinite; }
.pulse-location-column { min-width: 0; padding: 10px; border-left: 1px solid #ece8e1; }
.pulse-location-column:first-child { border-left: 0; }
.pulse-location-column h4 { margin: 0 0 8px; color: #7a746c; font-size: 11px; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.pulse-location-summary { display: grid; align-content: start; gap: 8px; }
.pulse-location-title { display: flex; align-items: start; justify-content: space-between; gap: 7px; }
.pulse-location-title h3 { min-width: 0; margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 16px; font-weight: 850; line-height: 1.12; }
.pulse-location-state { min-height: 23px; padding: 3px 7px; font-size: 10px; }
.pulse-location-state.is-danger { flex: 0 0 auto; background: #ffebe8; color: #a42e28; }
.pulse-location-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
.pulse-location-kpis div { min-width: 0; display: grid; gap: 3px; }
.pulse-location-kpis span { color: var(--muted); font-size: 10px; font-weight: 750; }
.pulse-location-kpis strong { overflow: hidden; font-size: 14px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.pulse-location-reason, .pulse-data-warning { margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 11px; line-height: 1.35; }
.pulse-location-reason { color: #a42e28; }
.pulse-report-outcomes { margin: 0; color: #4d594f; font-size: 11px; line-height: 1.35; }
.pulse-data-warning { padding: 5px 6px; border-radius: 7px; background: #fff7db; color: #795900; }
.pulse-staff { display: grid; align-content: start; gap: 5px; }
.pulse-staff-list { display: grid; gap: 4px; }
.pulse-employee-row { position: relative; width: 100%; min-width: 0; padding: 5px 6px; display: grid; gap: 4px; border: 1px solid #e4e0d9; border-radius: 8px; background: #faf9f6; color: inherit; font: inherit; text-align: left; }
.pulse-employee-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 11px; }
.pulse-employee-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-employee-heading span { flex: 0 0 auto; color: #726c65; font-size: 10px; }
.pulse-employee-row.is-danger { border-color: #e8aaa5; background: #fff1ef; }
.pulse-employee-row.is-danger .pulse-employee-heading span { color: #a42e28; }
.pulse-employee-row.is-warning { border-color: #ead899; background: #fff8df; }
.pulse-employee-row.is-warning .pulse-employee-heading span { color: #795900; }
.pulse-employee-row.is-good { border-color: #b9dba5; background: #f0f8eb; }
.pulse-employee-row.is-good .pulse-employee-heading span { color: #347407; }
.pulse-employee-answers { min-width: 0; display: grid; gap: 2px; }
.pulse-employee-answer { min-width: 0; margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px; color: #514d48; font-size: 10px; line-height: 1.25; }
.pulse-employee-answer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-employee-answer time { color: #918a82; font-variant-numeric: tabular-nums; }
.pulse-employee-answer.is-empty { display: block; color: #8a847d; }
.pulse-staff-empty { margin: 0; color: var(--muted); font-size: 12px; }
.pulse-weather-value { display: grid; justify-items: center; gap: 3px; }
.pulse-weather-value strong { font-size: 12px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pulse-weather-icon { width: 26px; height: 26px; display: inline-grid; place-items: center; color: #77716a; }
.pulse-weather-icon svg { width: 100%; height: 100%; overflow: visible; }
.pulse-weather-cloud { fill: #f2f4f5; stroke: #79838a; stroke-width: 1.25; stroke-linejoin: round; }
.pulse-weather-sun { fill: #fff0a8; stroke: #d29a1c; stroke-width: 1.25; }
.pulse-weather-ray, .pulse-weather-rain, .pulse-weather-snow, .pulse-weather-fog { fill: none; stroke: #708b9d; stroke-width: 1.4; stroke-linecap: round; }
.pulse-weather-ray { stroke: #d29a1c; }
.pulse-weather-thunder { fill: #f0b92d; stroke: #b57b00; stroke-width: .8; stroke-linejoin: round; }
.pulse-check-flow { position: relative; min-height: 132px; margin: 7px; padding: 8px 10px 7px; overflow: hidden; isolation: isolate; border: 1px solid rgba(149,0,117,.2); border-radius: 12px; background: radial-gradient(circle at 88% 20%, rgba(149,0,117,.12), transparent 34%), linear-gradient(145deg, #fff 0%, #fbf8fb 54%, #f7f4f8 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 8px 24px rgba(74,39,66,.08); }
.pulse-flow-header { min-height: 30px; display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.pulse-flow-header > div:first-child { display: flex; align-items: center; gap: 7px; }
.pulse-flow-live { display: inline-flex; align-items: center; gap: 4px; color: #817a80; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.pulse-flow-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #918a90; }
.pulse-flow-live.is-live { color: #347407; }
.pulse-flow-live.is-live::before { background: #3c8b0a; box-shadow: 0 0 0 3px rgba(60,139,10,.13); }
.pulse-flow-value { display: flex; align-items: baseline; gap: 4px; }
.pulse-flow-value strong { color: #30262e; font-size: 24px; line-height: .9; letter-spacing: -.04em; }
.pulse-flow-value > span:not(.pulse-flow-trend) { color: #80777e; font-size: 10px; }
.pulse-flow-trend { margin-left: 4px; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pulse-flow-trend.is-up { color: #3c8b0a; }
.pulse-flow-trend.is-down { color: #bf7a00; }
.pulse-flow-trend.is-flat { color: #950075; }
.pulse-flow-plot { position: relative; height: 72px; margin-top: -4px; outline: none; }
.pulse-flow-plot:focus-visible { border-radius: 7px; box-shadow: 0 0 0 3px rgba(149,0,117,.15); }
.pulse-flow-svg { width: 100%; height: 72px; display: block; overflow: hidden; }
.pulse-flow-gridline { stroke: rgba(95,79,90,.12); stroke-width: 1; stroke-dasharray: 2 4; }
.pulse-flow-bucket { fill: rgba(149,0,117,.3); transform-box: fill-box; transform-origin: bottom; animation: pulse-flow-bar-in .65s ease-out both; }
.pulse-flow-line { stroke-width: 3.6; stroke-linecap: round; filter: drop-shadow(0 0 3px currentColor); animation: pulse-flow-line-in .7s ease-out both; }
.pulse-flow-line.is-up { color: #3c8b0a; stroke: #3c8b0a; }
.pulse-flow-line.is-down { color: #d28a00; stroke: #d28a00; }
.pulse-flow-line.is-flat { color: #950075; stroke: #950075; }
.pulse-flow-line.is-alert { color: #c13d36; stroke: #c13d36; stroke-width: 4.2; }
.pulse-flow-alert-zone { fill: rgba(193,61,54,.09); }
.pulse-flow-dot { fill: #fff; stroke-width: 3; filter: drop-shadow(0 0 4px currentColor); }
.pulse-flow-dot.is-up { color: #3c8b0a; stroke: #3c8b0a; }
.pulse-flow-dot.is-down { color: #d28a00; stroke: #d28a00; }
.pulse-flow-dot.is-flat { color: #950075; stroke: #950075; }
.pulse-flow-dot.is-alert { color: #c13d36; stroke: #c13d36; }
.pulse-flow-ring { fill: none; stroke: #950075; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: pulse-flow-ring 1.4s ease-out 1 both; }
.pulse-flow-ring.is-second { animation-delay: .28s; }
.pulse-flow-scanner { fill: rgba(255,255,255,.8); opacity: .22; filter: blur(8px); transform: translateX(-70px); animation: pulse-flow-scan 4.2s linear infinite; }
.pulse-flow-cursor { stroke: rgba(49,38,47,.28); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; }
.pulse-flow-hover-dot { fill: #fff; stroke: #950075; stroke-width: 2; opacity: 0; }
.pulse-flow-tooltip { position: absolute; inset: 2px 5px auto auto; max-width: calc(100% - 10px); padding: 4px 6px; border-radius: 6px; background: rgba(42,34,40,.9); color: #fff; font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; }
.pulse-flow-plot.is-inspecting .pulse-flow-tooltip, .pulse-flow-plot.is-inspecting .pulse-flow-cursor, .pulse-flow-plot.is-inspecting .pulse-flow-hover-dot { opacity: 1; }
.pulse-flow-plot.is-inspecting .pulse-flow-tooltip { transform: translateY(0); }
.pulse-flow-footer { margin-top: -4px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 6px; color: #948c92; font-size: 9px; }
.pulse-flow-footer strong { overflow: hidden; color: #5b5259; font-size: 10px; font-weight: 850; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pulse-check-flow.is-alert { border-color: #d8645d; background: radial-gradient(circle at 88% 20%, rgba(193,61,54,.2), transparent 38%), linear-gradient(145deg, #fff 0%, #fff8f6 100%); box-shadow: inset -46px 0 52px rgba(193,61,54,.08), 0 8px 24px rgba(193,61,54,.12); }
.pulse-check-flow.is-alert .pulse-flow-clock, .pulse-check-flow.is-alert .pulse-flow-live { color: #b23831; }
.pulse-check-flow.is-alert .pulse-flow-live::before { background: #c13d36; box-shadow: 0 0 0 4px rgba(193,61,54,.13); animation: pulse-alert-dot 1.1s ease-in-out infinite; }
.pulse-check-flow.is-unavailable, .pulse-check-flow.is-idle { display: grid; align-content: start; }
.pulse-check-flow.is-unavailable { border-color: #ddd8d1; background: #f7f5f1; box-shadow: none; }
.pulse-flow-empty { min-height: 70px; margin: 0; display: grid; place-items: center; color: #817b74; font-size: 12px; }
.pulse-control-sales { display: grid; align-content: start; }
.pulse-control-strip { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(56px,1fr); gap: 4px; overflow: hidden; }
.pulse-control-cell { min-width: 0; min-height: 88px; padding: 7px 4px; display: grid; align-content: space-between; gap: 4px; border: 1px solid transparent; border-radius: 8px; color: #3c3935; font: inherit; text-align: center; cursor: help; }
.pulse-control-cell span { color: #77716a; font-size: 10px; font-weight: 850; }
.pulse-control-cell strong { font-size: 17px; line-height: 1; }
.pulse-control-cell small { overflow: hidden; font-size: 9px; line-height: 1.15; text-overflow: ellipsis; }
.pulse-control-cell.is-good { border-color: #c7dfb8; background: #eef7e9; }
.pulse-control-cell.is-warning { border-color: #ead899; background: #fff7da; }
.pulse-control-cell.is-critical { border-color: #e9b0ab; background: #fff0ee; color: #a42e28; }
.pulse-control-cell.is-closed { background: #efede9; color: #77716a; }
.pulse-control-cell.is-pending { border-style: dashed; border-color: #d9d4cd; background: #faf8f4; color: #8b857e; }
.pulse-control-cell.is-current { border-color: #a9c9e2; background: #eaf3fa; color: #24577f; }
.pulse-control-cell.is-future { border-style: dashed; border-color: #d9d4cd; background: #faf8f4; color: #8b857e; }
.pulse-control-cell.is-day_off, .pulse-control-cell.is-off_hours { background: #efede9; color: #77716a; }
.pulse-control-cell.is-day_off_sales, .pulse-control-cell.is-off_hours_sales { border-color: #d88968; background: #fff0e9; color: #9a3d1f; }
.pulse-control-cell.is-awaiting_iiko { border-color: #e1bd63; background: #fff6d9; color: #76530c; }
.pulse-control-cell.is-source_mismatch { border-color: #d88968; background: #fff0e9; color: #9a3d1f; }
.pulse-control-cell.is-source_pending { border-color: #c8c2b4; background: #f6f3ec; color: #675f52; }
.pulse-control-cell.is-missing, .pulse-control-cell.is-not_connected { background: #f2efeb; color: #8b857e; }
.pulse-control-cell:focus-visible { outline: 3px solid rgba(149,0,117,.2); outline-offset: 1px; }
.pulse-control-empty { min-height: 88px; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.pulse-closed { padding: 16px; display: grid; grid-template-columns: minmax(170px, auto) 1fr; align-items: center; gap: 18px; }
.pulse-closed[hidden] { display: none; }
.pulse-closed h2 { margin: 4px 0 0; font-size: 18px; }
.pulse-closed-list { display: grid; gap: 5px; }
.pulse-closed-item { min-height: 34px; padding: 6px 9px; display: grid; grid-template-columns: minmax(150px,1fr) auto minmax(150px,.7fr); align-items: center; gap: 10px; border-radius: 8px; background: #f3f0eb; font-size: 12px; }
.pulse-closed-item span { color: #625d56; font-weight: 850; }
.pulse-closed-item small { color: #8a847c; }
.pulse-empty { grid-column: 1 / -1; padding: 28px; color: var(--muted); text-align: center; }
@keyframes pulse-loading { to { background-position: -200% 0; } }
@keyframes pulse-flow-line-in { from { opacity: .2; } to { opacity: 1; } }
@keyframes pulse-flow-bar-in { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes pulse-flow-ring { 0% { opacity: .7; transform: scale(.45); } 100% { opacity: 0; transform: scale(2.1); } }
@keyframes pulse-flow-scan { from { transform: translateX(-70px); } to { transform: translateX(410px); } }
@keyframes pulse-alert-dot { 50% { opacity: .45; } }

@media (max-width: 1450px) {
  .pulse-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .pulse-root { gap: 19px; }
  .pulse-header { align-items: stretch; flex-direction: column; }
  .pulse-date-form { display: grid; grid-template-columns: 1fr auto; }
  .pulse-date-form label { grid-column: 1 / -1; }
  .pulse-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse-company-operations { grid-template-columns: 1fr 1fr; }
  .pulse-opening-summary { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pulse-chart-tooltip { position: static; width: fit-content; margin: -4px 0 2px 32px; }
  .pulse-closed { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .pulse-kpi-grid { grid-template-columns: 1fr; }
  .pulse-date-form { grid-template-columns: 1fr; }
  .pulse-date-form label { grid-column: auto; }
  .pulse-check-flow { margin: 7px; }
  .pulse-closed-item { grid-template-columns: minmax(0,1fr) auto; }
  .pulse-closed-item small { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-flow-bucket, .pulse-flow-line, .pulse-flow-ring, .pulse-flow-scanner, .pulse-check-flow.is-alert .pulse-flow-live::before { animation: none; }
}

/* Pulse live workspace refinements. */
.pulse-header-controls { display: flex; align-items: end; gap: 10px; }
.pulse-share-control { position: relative; }
.pulse-share-result { position: absolute; z-index: 8; top: calc(100% + 8px); right: 0; width: min(470px, 78vw); padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 10px; border: 1px solid #ded9d2; border-radius: 11px; background: #fff; box-shadow: 0 12px 32px rgba(42,41,38,.13); }
.pulse-share-result[hidden] { display: none; }
.pulse-share-result a { min-width: 0; overflow: hidden; color: var(--primary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pulse-share-result span { color: var(--muted); font-size: 10px; }
.pulse-share-result .secondary-button { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; }
.pulse-shared-date { padding: 8px 11px; display: grid; gap: 3px; border: 1px solid #e7e3dc; border-radius: 11px; background: #fff; }
.pulse-shared-date span { color: var(--muted); font-size: 10px; }
.pulse-shared-page { min-height: 100vh; background: #f6f4ef; }
.pulse-shared-page .pulse-page { width: min(1880px, calc(100% - 32px)); max-width: 1880px; }
.pulse-share-unavailable, .pulse-share-expired { width: min(480px, calc(100% - 32px)); margin: 12vh auto 0; padding: 28px; }
.pulse-share-unavailable h1, .pulse-share-expired h1 { margin: 7px 0; }
.pulse-mobile-summary { display: none; }
.pulse-chart-gridline { stroke: #ebe8e2; stroke-width: .8; }
.pulse-chart-line { stroke: #a32987; stroke-width: 2; }
.pulse-chart-line.is-alert { stroke: #c84f48; stroke-width: 2.2; }
.pulse-chart-dot { stroke: #a32987; stroke-width: 2; }
.pulse-check-flow { border-color: #ddd8df; background: #fff; box-shadow: 0 2px 9px rgba(61,51,58,.045); }
.pulse-flow-gridline { stroke: rgba(82,72,78,.105); stroke-width: .75; stroke-dasharray: 2 6; }
.pulse-flow-bucket { fill: rgba(149,0,117,.15); }
.pulse-flow-line { stroke-width: 2; filter: none; animation: pulse-flow-line-refine .72s cubic-bezier(.2,.8,.2,1) both; }
.pulse-flow-line.is-up { color: #57943a; stroke: #57943a; }
.pulse-flow-line.is-down { color: #c28a2d; stroke: #c28a2d; }
.pulse-flow-line.is-flat { color: #a32987; stroke: #a32987; }
.pulse-flow-line.is-alert { color: #c84f48; stroke: #c84f48; stroke-width: 2.2; }
.pulse-flow-line.is-temporal-alert, .pulse-flow-dot.is-temporal-alert { color: #c84f48; stroke: #c84f48; }
.pulse-flow-telemetry { stroke: rgba(255,255,255,.9); stroke-width: 2.8; stroke-linecap: round; stroke-dasharray: 2 22; opacity: .74; animation: pulse-flow-telemetry 3.4s linear infinite; pointer-events: none; }
.pulse-flow-dot { stroke-width: 2; filter: none; animation: pulse-flow-breathe 2.1s ease-in-out infinite; }
.pulse-flow-ring { stroke: #a32987; stroke-width: 1; animation-duration: 1.1s; }
.pulse-flow-alert-zone { fill: rgba(200,79,72,.075); }
.pulse-check-flow.is-alert { border-color: rgba(200,79,72,.7); background: linear-gradient(90deg, #fff 0%, #fff 72%, #fff6f5 100%); box-shadow: inset -34px 0 42px rgba(200,79,72,.045); }
.pulse-location.is-danger { border-color: #e4b5b1; border-top-color: #c84f48; background: #fffafa; box-shadow: 0 4px 16px rgba(193,61,54,.075); }
.pulse-location.is-warning { border-color: #e8d18b; border-top-color: #d39a22; background: #fffdf5; box-shadow: 0 4px 16px rgba(211,154,34,.08); }
.pulse-location-state.is-warning { flex: 0 0 auto; background: #fff3c7; color: #795900; }
.pulse-early-close { display: grid; gap: 6px; padding: 8px; border: 1px solid #e4aaa5; border-radius: 9px; background: #fff3f1; }
.pulse-early-close p { margin: 0; font-size: 11px; line-height: 1.35; }
.pulse-early-close-files, .pulse-early-close-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pulse-early-close-files a, .pulse-early-close-files span { font-size: 10px; }
.pulse-early-close-actions button { min-height: 30px; padding: 5px 8px; font-size: 10px; }
.pulse-closing-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-top: 7px; font-size: 11px; }
.pulse-closing-evidence a { color: var(--primary); font-weight: 750; }
.pulse-root.is-paused .pulse-flow-telemetry, .pulse-root.is-paused .pulse-flow-dot, .pulse-root.is-paused .pulse-flow-ring, .pulse-root.is-paused .pulse-flow-live::before,
.pulse-location.is-offscreen .pulse-flow-telemetry, .pulse-location.is-offscreen .pulse-flow-dot, .pulse-location.is-offscreen .pulse-flow-ring, .pulse-location.is-offscreen .pulse-flow-live::before { animation-play-state: paused; }
@keyframes pulse-flow-line-refine { from { opacity: .25; transform: scaleY(.86); } to { opacity: 1; transform: scaleY(1); } }
@keyframes pulse-flow-telemetry { to { stroke-dashoffset: -48; } }
@keyframes pulse-flow-breathe { 50% { opacity: .55; } }

@media (max-width: 700px) {
  html, body.page-pulse { overflow-x: clip; }
  .page-pulse .app-shell { min-height: 100vh; display: block; }
  .page-pulse .sidebar, .page-pulse .topbar { display: none; }
  .page-pulse .workspace { min-width: 0; }
  .page-pulse .container.content, .pulse-shared-page .pulse-page { width: 100%; max-width: none; margin: 0; padding: 5px 5px 18px; }
  .pulse-root { gap: 7px; }
  .pulse-header, .pulse-network, .pulse-company > .pulse-section-heading, .pulse-share-control { display: none; }
  .pulse-source-bar { min-height: 20px; padding: 1px 3px; gap: 3px 8px; overflow: hidden; border: 0; border-radius: 0; background: transparent; white-space: nowrap; }
  .pulse-source-bar span { min-height: 0; padding: 0; background: transparent; font-size: 8px; }
  .pulse-source-bar span::before { width: 4px; height: 4px; margin-right: 3px; }
  .pulse-update-state { min-height: 11px; margin: -4px 3px 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .pulse-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .pulse-kpi { min-height: 43px; padding: 5px 5px 5px 8px; gap: 3px; border-radius: 7px; box-shadow: none; }
  .pulse-kpi::before { width: 2px; }
  .pulse-kpi span { overflow: hidden; font-size: 7px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  .pulse-kpi strong { overflow: hidden; font-size: 14px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .pulse-company-operations { margin-top: 4px; padding: 4px; grid-template-columns: 1fr; gap: 4px; border-radius: 8px; }
  .pulse-opening-summary { grid-column: auto; padding: 5px 7px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; border-radius: 6px; }
  .pulse-opening-summary p { font-size: 8px; }
  .pulse-opening-summary strong { display: block; margin-top: 1px; font-size: 12px; }
  .pulse-company-flow-block { grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 3px; }
  .pulse-company-flow-block > div:first-child h3 { font-size: 9px; }
  .pulse-company-flow-block > div:first-child p { font-size: 7px; }
  .pulse-company-flow { margin: 0; }
  .pulse-company-control { margin-top: 4px; padding: 5px; gap: 4px; border-radius: 8px; }
  .pulse-company-control .pulse-chart-heading h3 { font-size: 10px; }
  .pulse-company-control .pulse-chart-heading p { font-size: 7px; }
  .pulse-company-control .pulse-company-control-strip { grid-auto-columns: 36px; overflow-x: auto; }
  .pulse-locations-section { gap: 3px; }
  .pulse-locations-heading { margin: 2px 3px 1px; align-items: center; }
  .pulse-locations-heading .pulse-kicker { display: none; }
  .pulse-locations-heading h2 { margin: 0; font-size: 14px; }
  .pulse-locations-heading > span { font-size: 9px; }
  .pulse-location-grid { gap: 4px; }
  .pulse-location, .pulse-location.is-history { padding: 0; display: block; overflow: hidden; border-width: 1px; border-top-width: 2px; border-radius: 8px; }
  .pulse-location-column { border-left: 0; }
  .pulse-mobile-summary { position: relative; padding: 5px 7px 4px; display: grid; gap: 1px; }
  .pulse-mobile-title { min-width: 0; padding-right: 27px; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .pulse-mobile-title h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 13px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  .pulse-mobile-title span { flex: 0 0 auto; color: #a8322c; font-size: 7px; font-weight: 850; text-transform: uppercase; }
  .pulse-mobile-summary p, .pulse-mobile-staff-action { margin: 0; overflow: hidden; font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .pulse-mobile-checks { color: #4f4a45; font-weight: 800; }
  .pulse-mobile-shift { color: #625d57; }
  .pulse-mobile-shift.is-overdue { color: #b23831; font-weight: 850; }
  .pulse-mobile-shift.is-unavailable { color: #817b74; }
  .pulse-mobile-weather { display: flex; align-items: center; gap: 3px; color: #625d57; }
  .pulse-mobile-weather .pulse-weather-value { display: inline-flex; align-items: center; gap: 2px; }
  .pulse-mobile-weather .pulse-weather-icon { width: 13px; height: 13px; }
  .pulse-mobile-weather .pulse-weather-value strong { font-size: 8px; }
  .pulse-mobile-staff { color: #6e6861; }
  .pulse-mobile-staff.is-danger { color: #a8322c; }
  .pulse-mobile-staff-action { width: fit-content; max-width: 100%; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: rgba(149,0,117,.35); text-underline-offset: 2px; cursor: pointer; }
  .pulse-mobile-staff-action:focus-visible { border-radius: 3px; outline: 2px solid rgba(149,0,117,.32); outline-offset: 1px; }
  .pulse-location-summary, .pulse-staff { display: none; }
  .pulse-check-flow { width: auto; height: 46px; min-height: 46px; margin: 0 4px 3px; padding: 2px 4px; display: grid; grid-template-columns: 54px minmax(0,1fr) 98px; align-items: center; gap: 3px; border-radius: 6px; }
  .pulse-flow-header { min-height: 0; display: block; }
  .pulse-flow-header > div:first-child { display: none; }
  .pulse-flow-value { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0 2px; }
  .pulse-flow-value strong { font-size: 16px; }
  .pulse-flow-value > span:not(.pulse-flow-trend) { font-size: 7px; }
  .pulse-flow-trend { grid-column: 1 / -1; margin: 0; font-size: 8px; }
  .pulse-flow-plot, .pulse-flow-svg { height: 38px; margin: 0; }
  .pulse-flow-line { stroke-width: 1.5; }
  .pulse-flow-line.is-alert { stroke-width: 1.7; }
  .pulse-flow-bucket { opacity: .72; }
  .pulse-flow-telemetry { stroke-width: 2; }
  .pulse-flow-dot { stroke-width: 1.5; }
  .pulse-flow-footer { margin: 0; display: block; font-size: 7px; }
  .pulse-flow-footer > span { display: none; }
  .pulse-flow-footer strong { display: block; font-size: 8px; text-align: right; }
  .pulse-flow-tooltip { inset: 0 0 auto auto; font-size: 7px; }
  .pulse-flow-empty { min-height: 0; grid-column: 2 / -1; font-size: 9px; }
  .pulse-control-sales, .pulse-location.is-history .pulse-control-sales { padding: 3px 5px 5px; display: grid; border-top: 1px solid #eeeae4; }
  .pulse-control-sales h4 { margin: 0 0 2px; font-size: 7px; }
  .pulse-control-strip { grid-auto-columns: minmax(27px,32px); justify-content: start; gap: 2px; }
  .pulse-control-cell { min-height: 33px; padding: 2px 1px; border-radius: 4px; }
  .pulse-control-cell span { font-size: 7px; }
  .pulse-control-cell strong { font-size: 11px; }
  .pulse-control-cell small { display: none; }
  .pulse-control-empty { min-height: 28px; font-size: 8px; }
  .pulse-closed { padding: 7px; display: block; border-radius: 8px; }
  .pulse-closed > div:first-child { display: none; }
  .pulse-closed-list { gap: 2px; }
  .pulse-closed-item { min-height: 25px; padding: 3px 5px; grid-template-columns: minmax(0,1fr) auto; gap: 4px; border-radius: 5px; font-size: 8px; }
  .pulse-closed-item small { grid-column: 1 / -1; }
  .pulse-share-unavailable, .pulse-share-expired { margin-top: 8vh; padding: 18px; }
}

/* Pulse compact column rhythm: one shared legend, no repeated card headings. */
.pulse-locations-section { gap: 7px; }
.pulse-location-columns, .pulse-location, .pulse-location-columns.is-history, .pulse-location.is-history { grid-template-columns: minmax(155px,.72fr) minmax(285px,1.5fr) minmax(220px,1.05fr) minmax(270px,1.25fr); }
.pulse-location-columns { min-width: 0; margin: -3px 0 0; display: grid; align-items: end; color: #756f68; font-size: 10px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.pulse-location-columns > span { min-width: 0; padding: 0 8px 2px; }
.pulse-location-column { padding: 8px; }
.pulse-location-summary { position: relative; gap: 6px; }
.pulse-location-title { padding-right: 27px; }
.pulse-location-title h3 { font-size: 15px; line-height: 1.1; }
.pulse-location-kpis { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 3px; }
.pulse-location-kpis p { min-width: 0; margin: 0; overflow: visible; color: #4f4a45; font-size: clamp(10px,.72vw,12px); line-height: 1.2; white-space: nowrap; }
.pulse-location-kpis p span { color: #77716a; font-size: inherit; font-weight: 750; }
.pulse-location-kpis p strong { overflow: visible; color: #302d29; font-size: inherit; line-height: inherit; text-overflow: clip; white-space: nowrap; }
.pulse-mobile-shift-part.is-late, .pulse-mobile-shift-part.is-overdue { color: #b23831; font-weight: 900; }
.pulse-point-shift { display: grid; gap: 2px; color: #4f4a45; font-size: 11px; font-weight: 750; line-height: 1.28; font-variant-numeric: tabular-nums; }
.pulse-point-shift.is-unavailable { color: #77716a; }
.pulse-point-shift .is-late, .pulse-point-shift .is-overdue { color: #b23831; font-weight: 900; }
.pulse-location-unplanned { margin: 0; padding: 4px 6px; border-radius: 6px; background: #fff3c7; color: #795900; font-size: 10px; font-weight: 800; line-height: 1.25; }
.pulse-staff { gap: 4px; }
.pulse-staff-list { gap: 3px; }
.pulse-employee-row { padding: 4px 5px; gap: 3px; }
button.pulse-employee-row { cursor: pointer; }
button.pulse-employee-row:hover, button.pulse-employee-row:focus-visible { border-color: rgba(149,0,117,.48); outline: none; box-shadow: 0 0 0 2px rgba(149,0,117,.11); }
.pulse-employee-heading { justify-content: start; }
.pulse-employee-heading .pulse-employee-status { min-width: 0; margin-left: auto; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pulse-employee-name { min-width: 0; display: flex; align-items: center; gap: 4px; }
.pulse-employee-name strong { min-width: 0; overflow: hidden; display: block; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pulse-employee-alert { width: 12px; height: 12px; flex: 0 0 12px; display: inline-grid; place-items: center; border-radius: 50%; background: #c13d36; color: #fff !important; font-size: 8px !important; font-weight: 950; line-height: 1; }
.pulse-employee-event-icons { max-width: 86px; display: inline-flex; flex-wrap: wrap; gap: 2px; }
.pulse-employee-event-icon { width: 13px; height: 13px; flex: 0 0 13px; display: inline-grid; place-items: center; border-radius: 50%; background: #e7e3dc; color: #625d56 !important; font-size: 8px !important; font-weight: 950; line-height: 1; cursor: help; }
.pulse-employee-event-icon.is-good { background: #dff0d4; color: #347407 !important; }
.pulse-employee-event-icon.is-warning { background: #ffe9a3; color: #795900 !important; }
.pulse-employee-event-icon.is-danger { background: #c13d36; color: #fff !important; }
.pulse-employee-route { margin: 0 0 2px; display: block; color: #706a63; font-size: 9px; font-weight: 750; line-height: 1.25; }
.pulse-staff-empty.is-unplanned { color: #795900; font-weight: 800; }
.pulse-weather-value { gap: 2px; }
.pulse-weather-icon { width: 24px; height: 24px; }
.pulse-weather-badge { position: absolute; z-index: 5; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; cursor: help; }
.pulse-weather-badge:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pulse-weather-tooltip { position: absolute; z-index: 30; top: 28px; right: 0; width: min(285px, 75vw); padding: 9px 10px; display: none; gap: 3px; border-radius: 9px; background: #302d29; color: #fff; box-shadow: 0 10px 28px rgba(42,41,38,.24); font-size: 10px; font-weight: 600; line-height: 1.3; text-align: left; }
.pulse-weather-tooltip span { display: block; }
.pulse-weather-badge:hover .pulse-weather-tooltip, .pulse-weather-badge:focus .pulse-weather-tooltip, .pulse-weather-badge:focus-within .pulse-weather-tooltip { display: grid; }
.pulse-flow-header { align-items: center; }
.pulse-flow-live { flex: 0 0 auto; }

@media (min-width: 701px) and (max-width: 1279px) {
  .pulse-location-columns, .pulse-location, .pulse-location-columns.is-history, .pulse-location.is-history { grid-template-columns: minmax(210px,.72fr) minmax(330px,1.28fr); }
  .pulse-column-flow, .pulse-check-flow, .pulse-location-columns.is-history .pulse-column-flow, .pulse-location.is-history .pulse-check-flow { grid-column: 1; grid-row: 2; }
  .pulse-column-control, .pulse-control-sales, .pulse-location-columns.is-history .pulse-column-control, .pulse-location.is-history .pulse-control-sales { grid-column: 2; grid-row: 2; }
  .pulse-location-columns .pulse-column-flow, .pulse-location-columns .pulse-column-control { padding-top: 5px; }
}

@media (max-width: 700px) {
  .pulse-location-columns, .pulse-location-columns.is-history { margin: -1px 3px 0; padding: 3px 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 1px 0; border: 1px solid #e8e4dd; border-radius: 6px; background: rgba(255,255,255,.62); font-size: 7px; letter-spacing: .035em; }
  .pulse-location-columns > span { padding: 0; }
  .pulse-location-columns > span:not(:last-child)::after { content: "·"; margin: 0 4px; color: #b0aaa3; }
  .pulse-location, .pulse-location.is-history { display: block; }
  .pulse-mobile-summary { gap: 2px; }
  .pulse-mobile-shift { color: #625d57; }
  .pulse-mobile-shift.is-unavailable { color: #817b74; }
  .pulse-mobile-label { font-weight: 800; }
  .pulse-mobile-shift-part.is-muted { color: #817b74; }
  .pulse-mobile-staff .pulse-employee-name { display: inline-flex; vertical-align: middle; }
  .pulse-mobile-staff .pulse-employee-name strong { font-size: inherit; }
  .pulse-mobile-staff .pulse-employee-alert { width: 9px; height: 9px; flex-basis: 9px; font-size: 6px !important; }
  .pulse-check-flow { grid-template-columns: 54px minmax(0,1fr) 98px; }
  .pulse-flow-header { min-height: 0; display: grid; align-content: center; justify-content: start; gap: 1px; }
  .pulse-flow-header > div:first-child { display: grid; }
  .pulse-flow-live { font-size: 6px; letter-spacing: .04em; }
  .pulse-flow-live::before { width: 4px; height: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-flow-telemetry, .pulse-flow-dot, .pulse-flow-line, .pulse-flow-ring { animation: none; }
}

.pulse-conversation-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; overflow: hidden; border: 1px solid #ddd8d1; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(42,41,38,.28); }
.pulse-conversation-dialog::backdrop { background: rgba(42,41,38,.42); backdrop-filter: blur(2px); }
.pulse-conversation-shell { height: min(86vh, 900px); padding: 16px; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 10px; }
.pulse-conversation-shell > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.bot-chat-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.bot-chat-dialog-actions .secondary-button { white-space: nowrap; }
.pulse-conversation-shell h2 { margin: 3px 0 0; font-size: 22px; }
.pulse-conversation-widget-state { margin: 0; padding: 18px; border-radius: 10px; background: #f4f1ec; color: var(--muted); }
.pulse-conversation-frame { width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 10px; background: #f4f5f7; }
.pulse-conversation-route { margin: 0; color: var(--muted); font-size: 12px; }
.pulse-dialog-timeline { display: grid; gap: 5px; }
.pulse-dialog-timeline h3 { margin: 0; font-size: 12px; }
.pulse-dialog-timeline > div { max-height: 150px; overflow: auto; display: grid; gap: 3px; }
.pulse-dialog-timeline-event { padding: 4px 6px; display: grid; grid-template-columns: 14px auto minmax(0,1fr); align-items: center; gap: 6px; border-radius: 6px; background: #f4f1ec; color: #5f5952; font-size: 11px; }
.pulse-dialog-timeline-event time { color: #8a837b; font-variant-numeric: tabular-nums; }
.pulse-dialog-timeline-event.is-good .pulse-dialog-timeline-icon { color: #347407; }
.pulse-dialog-timeline-event.is-warning { background: #fff7da; color: #795900; }
.pulse-dialog-timeline-event.is-danger { background: #fff0ee; color: #a42e28; }
.pulse-conversation-events { min-height: 180px; overflow: auto; display: grid; align-content: start; gap: 7px; }
.pulse-conversation-event { max-width: 88%; padding: 8px 10px; display: grid; gap: 5px; border: 1px solid #e3dfd8; border-radius: 10px; background: #f7f5f1; }
.pulse-conversation-event.is-outbound { margin-left: auto; border-color: #d8b4d0; background: #fbf0f8; }
.pulse-conversation-event > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 10px; }
.pulse-conversation-event > header span, .pulse-conversation-event > header time, .pulse-conversation-event > small { color: var(--muted); }
.pulse-conversation-event > header .pulse-conversation-source { padding: 1px 5px; border-radius: 999px; background: #ebe8e2; color: var(--ink); font-weight: 750; }
.pulse-conversation-event > header time { margin-left: auto; font-variant-numeric: tabular-nums; }
.pulse-conversation-event > p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.pulse-conversation-attachments { display: flex; flex-wrap: wrap; gap: 4px; }
.pulse-conversation-attachments span, .pulse-conversation-attachments a { padding: 3px 6px; border-radius: 999px; background: #ebe8e2; font-size: 10px; }
.pulse-conversation-attachments a { color: var(--primary); font-weight: 750; text-decoration: none; }
.pulse-conversation-status { width: fit-content; font-variant-numeric: tabular-nums; }
.pulse-conversation-status[tabindex] { cursor: help; border-bottom: 1px dotted currentColor; outline-offset: 3px; }
.pulse-conversation-photo { width: 112px; padding: 0; overflow: hidden; border: 1px solid #d8d3cb; border-radius: 9px; background: #ebe8e2; color: var(--ink); cursor: zoom-in; text-align: left; }
.pulse-conversation-photo img { width: 112px; height: 84px; display: block; object-fit: cover; background: #dedad3; }
.pulse-conversation-photo span { display: block; padding: 4px 6px; overflow: hidden; border-radius: 0; background: transparent; text-overflow: ellipsis; white-space: nowrap; }
.pulse-conversation-file { display: inline-flex; align-items: center; }
.pulse-conversation-form { padding-top: 10px; display: grid; gap: 7px; border-top: 1px solid #e7e3dc; }
.pulse-conversation-form[hidden] { display: none; }
.pulse-conversation-form label { font-size: 12px; font-weight: 800; }
.pulse-conversation-form textarea { min-height: 84px; resize: vertical; }
.pulse-conversation-form > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pulse-conversation-form [data-pulse-conversation-send-state] { color: var(--muted); font-size: 11px; }
.pulse-media-dialog { width: min(1100px, calc(100vw - 24px)); height: min(92vh, 920px); padding: 0; overflow: hidden; border: 1px solid #5e5a55; border-radius: 14px; background: #191817; color: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.48); }
.pulse-media-dialog::backdrop { background: rgba(0,0,0,.78); }
.pulse-media-shell { height: 100%; padding: 12px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 10px; }
.pulse-media-shell > header, .pulse-media-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pulse-media-shell > header strong, .pulse-media-shell > footer span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-media-stage { min-height: 0; display: grid; place-items: center; overflow: auto; border-radius: 9px; background: #0d0c0c; }
.pulse-media-stage img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.pulse-media-shell .primary { flex: 0 0 auto; color: #fff; text-decoration: none; }

@media (max-width: 700px) {
  .pulse-conversation-dialog { width: calc(100vw - 10px); max-height: calc(100vh - 10px); }
  .pulse-conversation-shell { height: calc(100vh - 10px); padding: 10px; }
  .pulse-conversation-shell > header { align-items: stretch; flex-direction: column; }
  .bot-chat-dialog-actions { justify-content: stretch; }
  .bot-chat-dialog-actions > * { flex: 1; justify-content: center; }
  .pulse-conversation-frame { min-height: 0; }
  .pulse-conversation-event { max-width: 96%; }
  .pulse-media-dialog { width: calc(100vw - 8px); height: calc(100vh - 8px); }
  .pulse-media-shell { padding: 8px; }
}

/* Tracker workspace — KIP UI. */
.tracker-page { --tracker-soft: #faf8f4; --tracker-berry-soft: #f7e8f3; --tracker-sun-soft: #fff6d6; }
.tracker-header .tracker-actions form { margin: 0; }
.tracker-toolbar { align-items: center; }
.tracker-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.tracker-tabs a { min-height: 42px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 800; }
.tracker-tabs a:hover { background: #f2efea; color: var(--ink); }
.tracker-tabs a.active { background: var(--primary); color: #fff; }
.tracker-tabs span { min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 11px; }
.tracker-tabs a:not(.active) span { background: #efede8; color: #68645e; }
.tracker-toolbar .tracker-filters { width: 100%; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.tracker-toolbar .tracker-filters input[type="search"] { min-width: 0; flex: 1 1 auto; }
.tracker-toolbar .tracker-filters select { flex: 0 1 220px; }
.tracker-toolbar .tracker-filters button, .tracker-toolbar .tracker-filters .text-button { flex: 0 0 auto; }
.tracker-filters .text-button { min-height: 42px; display: inline-flex; align-items: center; }
.tracker-board { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; align-items: start; transition: opacity .15s ease; }
.tracker-board.is-single { grid-template-columns: minmax(280px, 780px); }
.tracker-board.is-saving { opacity: .58; pointer-events: none; }
.tracker-lane { --lane-color: var(--primary); min-width: 0; padding: 13px; display: grid; align-content: start; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #f0ede8; }
.tracker-lane-discussion { --lane-color: #c77900; background: #f7f1dd; }
.tracker-lane-future { --lane-color: #3c8b0a; background: #edf3e9; }
.tracker-lane-draft { --lane-color: #77736c; background: #efede8; }
.tracker-lane-done { --lane-color: #3c8b0a; background: #edf5e9; }
.tracker-lane-deleted { --lane-color: #9c9690; background: #efedeb; }
.tracker-lane > header { min-height: 42px; padding: 1px 3px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tracker-lane > header > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.tracker-lane h2 { margin: 0; font-size: 15px; font-weight: 850; }
.tracker-lane > header > strong { min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 12px; }
.tracker-lane-mark { width: 5px; height: 25px; flex: 0 0 auto; border-radius: 999px; background: var(--lane-color); }
.tracker-lane-body { min-height: 130px; display: grid; align-content: start; gap: 9px; border: 2px solid transparent; border-radius: 13px; transition: border-color .15s ease, background .15s ease; }
.tracker-lane-body.is-drop-target { border-color: var(--lane-color); background: rgba(255,255,255,.58); }
.tracker-lane-empty { min-height: 126px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed #d1ccc4; border-radius: 12px; color: var(--muted); text-align: center; }
.tracker-lane-empty strong { color: var(--ink); font-size: 13px; }
.tracker-lane-empty span { font-size: 11px; }
.tracker-work-list { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.tracker-work-list.is-nested { margin: 8px 0 0 12px; padding-left: 10px; border-left: 2px solid #d7d2ca; }
.tracker-branch-row { position: relative; }
.tracker-branch-row > .tracker-branch-toggle { position: absolute; z-index: 2; left: 7px; bottom: 7px; width: 28px; height: 28px; min-height: 0; border: 0; background: #f3f0eb; color: var(--muted); }
.tracker-branch-row > .tracker-branch-toggle + .tracker-work-card footer { padding-left: 31px; }
.tracker-work-card { position: relative; min-width: 0; padding: 13px; display: grid; gap: 9px; border: 1px solid #e1ddd6; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(42,41,38,.045); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
.tracker-work-card[draggable=true] { cursor: grab; }
.tracker-work-card[draggable=true]:active { cursor: grabbing; }
.tracker-work-card:hover, .tracker-work-card:focus-within { border-color: rgba(149,0,117,.4); box-shadow: 0 10px 24px rgba(42,41,38,.08); }
.tracker-work-card.is-dragging { opacity: .4; transform: rotate(1deg); }
.tracker-work-card.is-drop-target { border-top: 4px solid var(--primary); }
.tracker-work-card.is-overdue { border-left: 4px solid var(--danger); }
.tracker-work-card > header { min-height: 29px; display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.tracker-task-key { color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .035em; }
.tracker-card-title { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.tracker-card-title:hover { color: var(--primary); }
.tracker-parent-stub-group { display: grid; gap: 5px; }
.tracker-parent-stub { min-height: 30px; padding: 5px 8px; display: flex; align-items: center; gap: 7px; overflow: hidden; border: 1px solid #d3cfc9; border-radius: 8px; background: #e8e5e0; color: #75716b; pointer-events: none; user-select: none; }
.tracker-parent-stub span { flex: 0 0 auto; font-size: 9px; font-weight: 850; letter-spacing: .025em; text-transform: uppercase; }
.tracker-parent-stub strong { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.tracker-parent-stub-children > .tracker-work-list.is-nested { margin-top: 0; margin-left: 8px; padding-left: 8px; border-left-color: #cbc6bf; }
.tracker-work-card > p { max-height: 4.4em; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; white-space: pre-line; }
.tracker-card-badges { min-height: 28px; display: flex; flex-wrap: wrap; gap: 5px; }
.tracker-work-card > footer { padding-top: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 9px; border-top: 1px solid #eeeae4; color: var(--muted); font-size: 10px; }
.tracker-card-menu { position: relative; }
.tracker-card-menu > summary { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 900; letter-spacing: 1px; list-style: none; }
.tracker-card-menu > summary::-webkit-details-marker { display: none; }
.tracker-card-menu > summary:hover { background: #f2efea; color: var(--primary); }
.tracker-card-menu[open] > summary { background: var(--primary-soft); color: var(--primary); }
.tracker-card-menu-popover { position: absolute; z-index: 20; top: 32px; right: 0; width: 245px; padding: 10px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(42,41,38,.18); }
.tracker-card-menu-popover > a, .tracker-card-menu-popover button { width: 100%; min-height: 36px; padding: 7px 9px; display: flex; align-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; font-size: 12px; font-weight: 700; }
.tracker-card-menu-popover > a:hover, .tracker-card-menu-popover button:hover { background: #f4f1ed; }
.tracker-card-menu-popover form { margin: 0; display: grid; gap: 6px; }
.tracker-card-menu-popover label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.tracker-card-menu-popover select { min-height: 36px; padding: 5px 8px; }
.tracker-card-menu-popover button.is-danger { color: var(--danger); }
.tracker-task-context-menu { position: fixed; z-index: 50; width: 210px; padding: 7px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 18px 45px rgba(42,41,38,.2); }
.tracker-task-context-menu.is-creating { width: min(290px, calc(100vw - 16px)); }
.tracker-task-context-menu[hidden] { display: none; }
.tracker-task-context-menu form { margin: 0; }
.tracker-task-context-menu button { width: 100%; min-height: 39px; padding: 8px 10px; display: flex; align-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font: inherit; font-size: 13px; font-weight: 750; }
.tracker-task-context-menu button:hover, .tracker-task-context-menu button:focus-visible { background: #f4f1ed; outline: none; }
.tracker-task-context-menu button.is-danger { color: var(--danger); }
.tracker-task-context-menu button:disabled { color: #aaa59e; cursor: default; }
.tracker-task-context-menu button:disabled:hover { background: transparent; }
.tracker-task-context-menu .tracker-context-subtask-form { margin: 3px 0 5px; padding: 10px; display: grid; gap: 9px; border-radius: 9px; background: #f7f4ef; }
.tracker-task-context-menu .tracker-context-subtask-form[hidden] { display: none; }
.tracker-context-subtask-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.tracker-context-subtask-form input { width: 100%; min-width: 0; background: #fff; }
.tracker-context-subtask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tracker-task-context-menu .tracker-context-subtask-submit { justify-content: center; background: var(--primary); color: #fff; }
.tracker-task-context-menu .tracker-context-subtask-submit:hover, .tracker-task-context-menu .tracker-context-subtask-submit:focus-visible { background: #76005d; }
.tracker-context-subtask-actions [data-context-subtask-cancel] { justify-content: center; }
.tracker-menu-order { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tracker-quick-create { border-top: 1px solid #ddd8d0; }
.tracker-quick-create > summary { min-height: 42px; display: flex; align-items: center; color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 800; }
.tracker-quick-create form { display: grid; gap: 8px; }
.tracker-quick-create input, .tracker-quick-create select, .tracker-quick-create textarea { width: 100%; min-width: 0; background: #fff; }
.tracker-quick-create button { width: 100%; }
.tracker-create-panel { padding: 21px; }
.tracker-create-panel > summary { min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 800; }
.tracker-form-readonly { display: grid; gap: 7px; align-content: start; color: var(--ink); font-size: 13px; }
.tracker-form-readonly strong { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--tracker-soft); font-size: 13px; }
.tracker-legacy-note { padding: 2px 4px; display: flex; flex-wrap: wrap; align-items: start; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.tracker-legacy-note summary { cursor: pointer; color: var(--primary); font-weight: 750; }
.tracker-legacy-note details div { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 7px 14px; }
.tracker-detail-task-row { min-height: 58px; padding: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.tracker-detail-task-row > span:first-child { padding-left: calc(var(--task-depth, 0) * 14px); display: grid; gap: 2px; }
.tracker-detail-task-row small { color: var(--muted); font-size: 11px; }
.tracker-status-in_progress { border-color: #e7bbdb; background: #f7e8f3; color: #76005d; }
.tracker-status-discussion { border-color: #e8cc72; background: #fff6d6; color: #795400; }
.tracker-status-future { border-color: #bedaaa; background: #edf7e8; color: #2f7305; }
.tracker-status-draft { border-color: #d9d5ce; background: #f1efeb; color: #625e58; }
.tracker-status-done { border-color: #b7d6a4; background: #edf7e8; color: #2f7305; }
.tracker-status-deleted { border-color: #d6d2cb; background: #efede8; color: #68645e; text-decoration: line-through; }
.tracker-chip.tracker-overdue { grid-column: auto; border-color: #edb4af; background: #fff0ee; color: #a9332d; }

@media (max-width: 1180px) {
  .tracker-board { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .tracker-board.is-single { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tracker-board, .tracker-board.is-single { grid-template-columns: 1fr; }
  .tracker-toolbar .tracker-filters { display: grid; grid-template-columns: 1fr; }
  .tracker-detail-task-row { align-items: stretch; flex-direction: column; }
  .tracker-work-list.is-nested { margin-left: 7px; padding-left: 7px; }
}

/* Compact editable barista directory */
.container.content.barista-directory-page {
  width: 100%;
  height: calc(100vh - 76px);
  height: calc(100dvh - 76px);
  min-width: 0;
  min-height: 0;
  padding: 24px 24px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.barista-directory-page .page-heading { flex: 0 0 auto; margin: 0 0 18px; }
.barista-directory-page > .notice { flex: 0 0 auto; }
.barista-directory-summary { padding: 12px 15px; display: grid; grid-template-columns: auto auto; gap: 1px 9px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 22px rgba(42,41,38,.05); }
.barista-directory-summary strong { color: var(--primary); font-size: 21px; line-height: 1.1; text-align: right; }
.barista-directory-summary span { color: var(--muted); font-size: 12px; }
.barista-directory { min-width: 0; min-height: 0; flex: 1 1 auto; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 12px 32px rgba(42,41,38,.055); overflow: hidden; }
.barista-directory-toolbar { padding: 12px 14px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto; align-items: end; gap: 10px; border-bottom: 1px solid var(--line); background: #faf9f6; }
.barista-directory-toolbar label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.barista-directory-toolbar input, .barista-directory-toolbar select { width: 100%; min-height: 40px; background: #fff; }
.barista-directory-toolbar p { margin: 0; padding: 0 5px 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.barista-directory-toolbar p strong { color: var(--ink); }
.barista-directory-scroll { width: 100%; max-width: 100%; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.barista-directory-table { width: 100%; min-width: 1990px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.barista-directory-table th, .barista-directory-table td { height: 49px; padding: 0; border-right: 1px solid #ebe8e2; border-bottom: 1px solid #ebe8e2; background: #fff; vertical-align: middle; }
.barista-directory-table thead th { position: sticky; z-index: 5; top: 0; height: 39px; padding: 7px 9px; background: #f0ede8; color: #5f5a54; font-size: 10px; font-weight: 850; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.barista-directory-table th:first-child, .barista-directory-table td:first-child { width: 238px; }
.barista-directory-table th:nth-child(2) { width: 180px; }
.barista-directory-table th:nth-child(3) { width: 225px; }
.barista-directory-table th:nth-child(4) { width: 135px; }
.barista-directory-table th:nth-child(5) { width: 185px; }
.barista-directory-table th:nth-child(6) { width: 230px; }
.barista-directory-table th:nth-child(7), .barista-directory-table th:nth-child(8) { width: 155px; }
.barista-directory-table th:nth-child(9) { width: 190px; }
.barista-directory-table th:nth-child(10) { width: 185px; }
.barista-directory-table th:nth-child(11) { width: 310px; }
.barista-directory-table thead th:first-child { z-index: 8; left: 0; box-shadow: 6px 0 10px rgba(42,41,38,.07); }
.barista-directory-table .barista-name-cell { position: sticky; z-index: 4; left: 0; padding: 7px 11px; background: #fff; box-shadow: 6px 0 10px rgba(42,41,38,.055); text-align: left; }
.barista-name-cell a { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.barista-name-cell a:hover { color: var(--primary); }
.barista-name-cell small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.barista-cell-editor { position: relative; height: 48px; background: #fff; }
.barista-cell-editor::before { content: ''; position: absolute; z-index: 2; inset: 5px auto 5px 2px; width: 3px; border-radius: 3px; background: transparent; pointer-events: none; }
.barista-cell-editor.is-overridden::before { background: #bd3a91; }
.barista-cell-editor input, .barista-cell-editor select { width: 100%; height: 100%; min-width: 0; padding: 6px 29px 12px 9px; border: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font: inherit; box-shadow: none; }
.barista-cell-editor select { padding-right: 31px; }
.barista-cell-editor input:hover, .barista-cell-editor select:hover { background: #faf8f4; }
.barista-cell-editor input:focus, .barista-cell-editor select:focus { position: relative; z-index: 3; border-color: var(--primary); outline: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--primary); }
.barista-cell-editor.is-saving input, .barista-cell-editor.is-saving select { background: #fff9df; }
.barista-cell-editor.has-error input, .barista-cell-editor.has-error select { border-color: var(--danger); background: #fff6f4; }
.barista-cell-reset { position: absolute; z-index: 4; top: 4px; right: 3px; width: 25px; height: 25px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: #f1ede8; color: var(--primary); cursor: pointer; font-size: 15px; font-weight: 900; }
.barista-cell-reset:hover { background: var(--primary); color: #fff; }
.barista-cell-reset[hidden] { display: none; }
.barista-cell-status { position: absolute; z-index: 4; right: 5px; bottom: 1px; max-width: calc(100% - 12px); overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 800; line-height: 10px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.barista-cell-status.is-saving { color: #8a6500; }
.barista-cell-status.is-saved { color: #35740d; }
.barista-cell-status.is-error { color: var(--danger); }
.barista-connection-cell { padding: 5px 9px !important; }
.barista-connection-cell .status-pill { min-height: 21px; margin-right: 5px; padding: 2px 7px; font-size: 9px; }
.barista-connection-cell strong, .barista-connection-cell code, .barista-connection-cell small { display: block; margin-top: 2px; overflow: hidden; font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.barista-connection-cell strong { display: inline; font-size: 11px; }
.telegram-linked-login { display: inline-flex !important; align-items: center; gap: 7px; overflow: visible !important; white-space: nowrap; }
.telegram-linked-login form { margin: 0; display: inline-flex; }
.telegram-unlink-button { width: 30px; height: 30px; min-width: 30px; padding: 6px; display: inline-grid; place-items: center; border: 1px solid var(--danger); border-radius: 9px; background: #fff0ee; color: var(--danger); cursor: pointer; box-shadow: 0 2px 7px rgba(169, 51, 45, .12); }
.telegram-unlink-button:hover { border-color: var(--danger); background: var(--danger); color: #fff; }
.telegram-unlink-button:focus-visible { outline: 3px solid rgba(198, 51, 48, .22); outline-offset: 2px; }
.telegram-unlink-button:disabled { cursor: wait; opacity: .55; }
.telegram-unlink-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.barista-directory-help { margin: 0; padding: 9px 14px 11px; border-top: 1px solid var(--line); background: #faf9f6; color: var(--muted); font-size: 10px; }
.barista-directory-table [data-directory-empty] td { padding: 38px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  .container.content.barista-directory-page { height: calc(100vh - 70px); height: calc(100dvh - 70px); padding: 16px 12px 10px; }
  .barista-directory-page.page-heading-actions, .barista-directory-page .page-heading-actions { align-items: stretch; }
  .barista-directory-summary { align-self: start; }
  .barista-directory-toolbar { grid-template-columns: 1fr; }
  .barista-directory-toolbar p { padding-bottom: 0; }
}

/* Managerial finance */
.finance-page .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.finance-page .page-heading p { margin-bottom: 0; }
.finance-page > .tabs { margin: 18px 0 0; padding: 5px; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #f0ede7; }
.finance-page > .tabs a { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 800; white-space: nowrap; }
.finance-page > .tabs a.is-active { background: white; color: var(--primary); box-shadow: 0 2px 10px rgba(42, 41, 38, .08); }
.finance-page > .panel { margin-top: 18px; }
.finance-form-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.finance-form-grid .panel { margin: 0; }
.finance-page form.stack { max-width: none; }
.finance-page form.stack label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.finance-page form.stack textarea { min-height: 84px; resize: vertical; }
.finance-page .data-table small { display: block; margin-top: 4px; color: var(--muted); }
.finance-overview-links { display: flex; flex-wrap: wrap; gap: 12px; }
.finance-overview-links a { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; }
.finance-z-period { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.finance-z-period label { display: grid; gap: 4px; }
.finance-z-matrix { min-width: max-content; }
.finance-z-matrix td { min-width: 112px; text-align: center; border: 2px solid white; }
.finance-z-matrix td button { width: 100%; min-height: 48px; border: 0; background: transparent; cursor: pointer; font-weight: 700; }
.finance-z-matched { background: #d9f5dc; }
.finance-z-attention { background: #fff1b8; }
.finance-z-missing { background: #ffd8d6; }
.finance-z-today { background: #fff; }
.finance-z-empty { background: #f1f1ef; color: var(--muted); }
.finance-z-dialog { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 16px; padding: 24px; overflow: auto; }
.finance-z-dialog::backdrop { background: rgba(20, 25, 30, .65); }
.finance-z-dialog-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.finance-z-dialog-head small { display: block; color: var(--muted); margin-top: 4px; }
.finance-z-report { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.finance-z-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.finance-page .data-table form { margin: 0; }
.finance-page details summary { color: var(--primary); cursor: pointer; font-weight: 750; }
.finance-page details form { min-width: 210px; margin-top: 8px; }
.finance-page .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.finance-forecast { display: grid; grid-template-columns: repeat(14, minmax(82px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.finance-forecast article { min-width: 82px; padding: 10px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.finance-forecast small { color: var(--muted); }
.finance-forecast strong { white-space: nowrap; }
@media (max-width: 820px) {
  .finance-page .page-heading { align-items: stretch; flex-direction: column; }
  .finance-form-grid { grid-template-columns: 1fr; }
}
.factory-shift-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .35rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}
.factory-shift-form label { display: grid; gap: .15rem; font-size: .75rem; }
.factory-shift-form input[type="time"] { width: 6.5rem; }
.factory-shift-form input[type="text"] { width: 9rem; }
.factory-shift-form button { white-space: nowrap; }

/* Compose2 individual places, selection and staged employee cards. */
.compose2-expand { width: 22px; min-height: 20px; padding: 0; border: 1px solid #999; border-radius: 3px; background: white; cursor: pointer; font-size: 16px; }
.compose2-assignments-table thead tr:nth-child(2) th { height: 22px; font-size: 10px; position: static; min-width: 74px; }
.compose2-assignment-cell.is-selected { box-shadow: inset 0 0 0 2px #2466b1; }
.compose2-assignment-card.preference-conflict { background: #fff3b5; }
.compose2-assignment-cell.is-paste-ineligible { background-image: repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(100,100,100,.12) 6px, rgba(100,100,100,.12) 8px); }
.compose2-assignment-cell:focus-visible { outline: 2px solid #2466b1; outline-offset: -2px; }
.compose2-card-save { display: flex; gap: 8px; position: sticky; bottom: 0; padding: 10px 0; background: white; }
.compose2-card-save[hidden] { display: none; }
.compose2-card-day-point { font-size: 9px; max-width: 52px; overflow-wrap: anywhere; }
.compose2-candidate-list { display: grid; gap: 6px; max-height: 55vh; overflow-y: auto; }
.compose2-candidate-list button { display: grid; gap: 3px; text-align: left; }
.compose2-match { justify-self: start; }
.compose2-layout-dialog fieldset > label { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; }
.compose2-layout-dialog fieldset > label select { flex: 1; }
[data-compose2-grid-cell] { user-select: none; }

/* Excel-like Compose2 grid: readable text, continuous borders and hover navigation. */
.schedule-compose2-page .app-shell { display: block; }
.schedule-compose2-page .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 220px; transform: translateX(calc(-100% + 7px)); transition: transform .18s ease; box-shadow: 10px 0 30px rgba(0,0,0,.12); }
.schedule-compose2-page .sidebar:hover,
.schedule-compose2-page .sidebar:focus-within { transform: translateX(0); }
.schedule-compose2-page .container.content { max-width: none; padding: 10px 16px; }
.schedule-compose2-page .compose2-table-panel { border-radius: 0; }
.schedule-compose2-page .compose2-table { width: max-content; min-width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0; border-top: 1px solid #999; border-left: 1px solid #999; font-family: Calibri, Carlito, Arial, sans-serif; font-size: 11px; line-height: 1.2; }
.schedule-compose2-page .compose2-table th,
.schedule-compose2-page .compose2-table td { height: 22px; padding: 2px 4px; border: 0; border-right: 1px solid #999; border-bottom: 1px solid #999; color: #111; font-weight: 400; }
.schedule-compose2-page .compose2-table thead th { height: auto; background: #f2f2f2; font-weight: 600; white-space: nowrap; }
.schedule-compose2-page .compose2-table th:first-child { width: 88px; min-width: 88px; background: #f2f2f2; white-space: nowrap; }
.schedule-compose2-page .compose2-ready-table th:not(:first-child):not(:last-child),
.schedule-compose2-page .compose2-ready-table td:not(:first-child):not(:last-child) { width: auto; min-width: 72px; max-width: none; }
.schedule-compose2-page .compose2-ready-table thead th { height: 28px; padding: 2px 4px; }
.schedule-compose2-page .compose2-name-button { min-height: 22px; padding: 0; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow-wrap: normal; }
.schedule-compose2-page .compose2-status-cell { user-select: none; touch-action: pan-x; }
.schedule-compose2-page .compose2-status-cell > button { min-height: 22px; font-size: 11px; }
.schedule-compose2-page .compose2-total-heading { white-space: nowrap; }
.schedule-compose2-page .compose2-total-heading span { display: inline; }
.schedule-compose2-page .compose2-layout-button { margin: 0 0 0 4px; vertical-align: middle; }
.schedule-compose2-page .compose2-table .compose2-total { font-weight: 600; }
.schedule-compose2-page .compose2-assignments-table th:not(:first-child):not(:last-child),
.schedule-compose2-page .compose2-assignments-table td:not(:first-child):not(:last-child) { width: auto; min-width: 86px; max-width: none; }
.schedule-compose2-page .compose2-assignments-table thead th { padding: 3px 4px; height: 25px; }
.schedule-compose2-page .compose2-assignments-table thead tr:nth-child(2) th { position: static; width: auto; min-width: 86px; font-size: 11px; }
.schedule-compose2-page .compose2-assignment-cell { height: 32px !important; padding: 2px 4px !important; vertical-align: middle !important; }
.schedule-compose2-page .compose2-assignment-card { min-height: 20px; padding: 2px 0; font: inherit; }
.schedule-compose2-page .compose2-assignment-card .composer-assignment-name { font-size: 11px; font-weight: 400; white-space: nowrap; overflow: visible; overflow-wrap: normal; }
.schedule-compose2-page .compose2-status-cell.is-selected,
.schedule-compose2-page .compose2-assignment-cell.is-selected { outline: 2px solid #2466b1; outline-offset: -2px; box-shadow: inset 0 0 0 2px #2466b1; }
.schedule-compose2-page .compose2-assignment-card.preference-conflict { background: #fff3b5 !important; color: #111 !important; }
.schedule-compose2-page .compose2-assignment-card.forbidden-conflict { background: #ffd6d6 !important; color: #111 !important; }
.compose2-status-cell.is-assigned, .compose2-legend .is-assigned { background: #fff200; }
.compose2-selection-hint { margin: 0; color: #555; font-size: 11px; }
@media (max-width: 600px) {
  .schedule-compose2-page .sidebar { display: none; }
  .schedule-compose2-page .container.content { padding: 10px; }
}

/* Compose2: independent table membership and weekly point cards. */
.compose2-layout-dialog { width: min(1050px, calc(100vw - 32px)); }
.compose2-layout-dialog [data-compose2-layout-fields] { display: block; overflow: visible; max-height: none; }
.compose2-layout-dialog form { gap: 8px; padding: 18px; }
.compose2-layout-dialog h3, .compose2-layout-dialog p { margin: 4px 0; }
.compose2-layout-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.compose2-layout-columns section { min-width: 0; }
.compose2-layout-members, .compose2-layout-candidates { margin: 6px 0; padding: 0; list-style: none; max-height: min(55vh, 480px); overflow: auto; }
.compose2-layout-members li, .compose2-layout-candidates li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 7px; border: 1px solid var(--border, #ddd); border-radius: 6px; margin-bottom: 3px; background: #fff; }
.compose2-layout-members button, .compose2-layout-candidates button { padding: 5px 8px; }
.compose2-layout-members li[draggable="true"], .compose2-layout-candidates li[draggable="true"] { cursor: grab; }
.compose2-layout-columns small { display: block; color: #666; }
.compose2-member-actions { display: flex; gap: 6px; flex-shrink: 0; }
.compose2-layout-columns input { width: 100%; }
.compose2-point-heading { border: 0; padding: 2px 4px; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.compose2-point-dialog { width: min(1200px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; padding: 24px; }
.compose2-point-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.compose2-point-columns > section { min-width: 0; }
.compose2-point-days { display: grid; gap: 10px; }
.compose2-point-day { padding: 12px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
.compose2-point-day.is-closed { background: #f1f0ed; }
.compose2-point-day header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.compose2-point-day header label { display: flex; align-items: center; gap: 6px; }
.compose2-point-day input { width: 64px; }
.compose2-point-day header small { color: #666; }
.compose2-point-employee, .compose2-point-assignment { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px; margin: 6px 0; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: grab; }
.compose2-point-employee > span, .compose2-point-assignment > span { flex: 1; min-width: 120px; }
.compose2-point-employee small { width: 100%; color: #666; }
.compose2-point-members { margin: 16px 0; }
.compose2-point-pool { border-top: 1px solid #ddd; padding-top: 12px; }
.compose2-point-pool [data-point-pool] { max-height: 300px; overflow: auto; }
.compose2-point-save { position: sticky; bottom: -24px; background: #fff; padding: 14px 0; border-top: 1px solid #ddd; }
@media (max-width: 760px) {
  .compose2-layout-columns, .compose2-point-columns { grid-template-columns: minmax(0, 1fr); }
  .compose2-layout-members, .compose2-layout-candidates { max-height: 32vh; }
  .compose2-point-save { flex-wrap: wrap; }
}
