:root { color-scheme: light; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: #f3f6f4; color: #1d2924; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: #f5f5f7; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; gap: 18px; text-align: center; color: #6e6e73; }
.grid-symbol { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2,1fr); gap: 4px; }
.grid-symbol span { display: block; border-radius: 3px; background: #0b63ce; }
.grid-symbol span:nth-child(2), .grid-symbol span:nth-child(3) { background: #79aee8; }
.grid-symbol-light span { background: #fff; }
.grid-symbol-light span:nth-child(2), .grid-symbol-light span:nth-child(3) { background: rgba(255,255,255,.55); }
.auth-screen { min-height: 100vh; padding: 64px 22px; display: grid; place-items: start center; background: #edf3ef; }
.auth-card { width: min(430px, 100%); padding: 36px; border: 1px solid #e3e6ea; border-radius: 28px; background: #fff; box-shadow: 0 26px 80px rgba(26, 44, 71, .1); text-align: center; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; color: #102f45; }
.auth-card h1 { margin: 24px 0 28px; font-size: 30px; }
.auth-loading, .auth-status { color: #6e6e73; }
.qr-frame { width: 260px; height: 260px; margin: 24px auto 16px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 22px; background: #fff; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.auth-status { min-height: 24px; margin: 0 0 18px; }
.auth-status:empty { display: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 26px 18px; background: #102f45; color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 24px; font-size: 18px; }
.module-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 22px; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.08); }
.module-nav button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: rgba(255,255,255,.7); font-weight: 700; }
.module-nav button.is-active { background: #fff; color: #0b63ce; }
.primary-nav { display: flex; flex-direction: column; gap: 5px; }
.primary-nav .nav-item { min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.72); text-align: left; }
.primary-nav .nav-item.is-active { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.workspace { min-width: 0; }
.workspace-header { min-height: 88px; padding: 20px 30px; border-bottom: 1px solid #e5e7eb; background: rgba(255,255,255,.96); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.workspace-header h2 { margin: 3px 0 0; font-size: 26px; }
.workspace-kicker { color: #0b63ce; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.session-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #52616b; font-size: 14px; }
.icon-button, .text-button { min-height: 44px; border: 1px solid #dfe3e8; border-radius: 11px; background: #fff; color: #344054; }
.icon-button { width: 44px; font-size: 21px; }.text-button { padding: 0 15px; }
.glyph-close { position: relative; font-size: 0; }
.glyph-close::before, .glyph-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
.glyph-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.glyph-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.toolbar { min-height: 0; padding: 0 30px; background: #fff; }
.toolbar:not(:empty) { padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid #e8eaee; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.toolbar label { display: grid; gap: 5px; color: #6e6e73; font-size: 12px; }
.toolbar input, .toolbar select { min-height: 44px; padding: 0 12px; border: 1px solid #d9dee7; border-radius: 10px; background: #fff; color: #1d1d1f; }
.content { min-height: calc(100vh - 88px); padding: 26px 30px 46px; }
.notice { margin: 16px 30px 0; padding: 12px 16px; border-radius: 12px; background: #eef4ff; color: #0b63ce; }
.notice.is-error { background: #fff3f2; color: #b42318; }.notice.is-warn { background: #fff7e8; color: #9a5b00; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card, .panel, .record-card, .archive-card, .admin-card { border: 1px solid #e4e7ec; border-radius: 18px; background: #fff; box-shadow: 0 7px 24px rgba(16,42,67,.035); }
.metric-card { padding: 20px; }.metric-label { color: #6e6e73; font-size: 13px; }.metric-value { margin-top: 8px; color: #102f45; font-size: 30px; font-weight: 600; }
.section-heading { margin: 24px 0 14px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.section-heading h3 { margin: 0; font-size: 19px; }.section-meta, .record-sub, .record-meta, .archive-address { color: #6e6e73; font-size: 13px; line-height: 1.55; }
.record-list, .case-list, .admin-list { display: flex; flex-direction: column; gap: 12px; }
.record-card, .case-card { width: 100%; padding: 18px 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; border: 1px solid #e4e7ec; text-align: left; }
.record-card:hover, .case-card:hover, .archive-card:hover { border-color: #a9c7ee; transform: translateY(-1px); }
.record-title, .case-title { color: #1d1d1f; font-size: 16px; font-weight: 600; }
.record-title-row, .case-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eef4ff; color: #0b63ce; font-size: 12px; font-weight: 500; }
.pill.warn { background: #fff4e5; color: #9a5b00; }.pill.done { background: #e7f6ed; color: #177245; }
.pill.neutral { background: #f2f2f7; color: #6e6e73; }
.archive-grid, .planning-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.archive-card { padding: 18px; border: 1px solid #e4e7ec; text-align: left; }
.analytics-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.panel { padding: 20px; }.chart-title { margin: 0 0 16px; font-size: 16px; }
.breakdown-row { margin: 12px 0; }.breakdown-head { display: flex; justify-content: space-between; font-size: 13px; }.progress-track { height: 7px; margin-top: 7px; border-radius: 999px; background: #edf0f3; overflow: hidden; }.progress-fill { height: 100%; background: #0b63ce; }
.ranking-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 100px 100px; gap: 14px; align-items: center; padding: 16px; border-bottom: 1px solid #edf0f3; background: #fff; }
.rank-number { font-size: 22px; font-weight: 800; color: #0b63ce; }.rank-name { font-weight: 800; }.rank-meta { color: #6e6e73; font-size: 12px; }.rank-stat { text-align: right; }.rank-stat strong { display: block; font-size: 18px; }.rank-stat span { color: #8e8e93; font-size: 11px; }
.case-card { grid-template-columns: minmax(0,1fr) auto; }.case-amount { color: #0b63ce; font-size: 17px; font-weight: 600; text-align: right; }.case-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: #6e6e73; font-size: 13px; }
.action-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.sync-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -8px 0 18px; padding: 12px 16px; border: 1px solid #dce6f3; border-radius: 14px; background: #f7faff; color: #52616b; font-size: 13px; }.sync-summary strong { color: #102f45; }
.pagination-actions { display: flex; justify-content: center; margin: 22px 0; }
.stats-table-wrap { max-height: 390px; overflow: auto; }.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }.stats-table th, .stats-table td { padding: 11px 12px; border-bottom: 1px solid #edf0f3; text-align: right; white-space: nowrap; }.stats-table th:first-child, .stats-table td:first-child { position: sticky; left: 0; background: #fff; text-align: left; }.stats-table th { position: sticky; top: 0; background: #f8fafc; color: #52616b; }
.attention-panel { margin-top: 16px; }.section-heading.compact { margin: 0 0 12px; }.attention-list { display: grid; gap: 10px; }.attention-row { width: 100%; display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border: 0; border-bottom: 1px solid #edf0f3; background: transparent; color: #1d1d1f; text-align: left; }.attention-row:last-child { border-bottom: 0; }.attention-row span:last-child { text-align: right; }.attention-row strong, .attention-row small { display: block; }.attention-row small { margin-top: 4px; color: #6e6e73; }
.button { min-height: 42px; padding: 0 17px; border: 0; border-radius: 12px; font-weight: 700; }.button.primary { background: #0b63ce; color: #fff; }.button.secondary { border: 1px solid #ccd6e2; background: #fff; color: #0b63ce; }.button.danger { background: #fff3f2; color: #b42318; }.button:disabled { opacity: .5; cursor: default; }
.empty-state { padding: 70px 20px; color: #8e8e93; text-align: center; }
.detail-layer, .form-layer { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 1fr min(680px, 94vw); }
.form-layer { z-index: 240; place-items: center; grid-template-columns: 1fr; }
.detail-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,24,40,.42); }
.detail-panel { position: relative; grid-column: 2; height: 100vh; overflow-y: auto; background: #fff; box-shadow: -20px 0 70px rgba(16,24,40,.18); }
.detail-header { position: sticky; top: 0; z-index: 2; padding: 20px 24px; border-bottom: 1px solid #eaecf0; background: rgba(255,255,255,.97); display: flex; justify-content: space-between; align-items: center; }
.detail-header h3 { margin: 0; }.detail-eyebrow { color: #0b63ce; font-size: 12px; font-weight: 800; }.detail-content { padding: 24px; }
.detail-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #edf0f3; }.detail-section h4 { margin: 0 0 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.detail-fact { min-width: 0; }.detail-fact span { display: block; color: #8e8e93; font-size: 12px; }.detail-fact strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.form-dialog { position: relative; width: min(640px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(16,24,40,.24); }
.workbench-form { padding: 24px; }.form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }.form-field { display: grid; gap: 6px; color: #52616b; font-size: 12px; }.form-field.is-wide { grid-column: 1 / -1; }.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #d9dee7; border-radius: 11px; color: #1d1d1f; background: #fff; }.form-field textarea { min-height: 92px; resize: vertical; }.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }.form-error { min-height: 20px; color: #b42318; font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }.admin-card { padding: 18px; }.admin-card h4 { margin: 0 0 10px; }.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mortgage-admin-page .section-heading { align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.mortgage-admin-page .section-heading:first-child { margin-top: 0; }
.admin-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mortgage-admin-page .admin-grid { display: block; border: 1px solid var(--wb-line); border-radius: 10px; overflow: hidden; background: #fff; }
.mortgage-admin-page .admin-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 16px; padding: 16px 18px; border: 0; border-radius: 0; box-shadow: none; }
.mortgage-admin-page .admin-card + .admin-card { border-top: 1px solid var(--wb-line); }
.mortgage-admin-page .admin-card h4 { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 600; }
.mortgage-admin-page .admin-card > :not(.admin-actions) { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
.mortgage-admin-page .admin-actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
.mortgage-admin-page .record-sub, .mortgage-admin-page .case-facts { margin: 0; font-size: 12px; line-height: 1.5; }
.mobile-module-wrap, .mobile-nav-wrap { display: none; }
.dirty-banner { margin-bottom: 16px; padding: 12px 15px; border-radius: 12px; background: #fff7e8; color: #9a5b00; }
.workspace-spatial .content { height: calc(100vh - 88px); min-height: 660px; padding: 0; }
.workspace-spatial .toolbar, .workspace-spatial #notice-region { display: none; }

.planning-toolbar { width: 100%; }
.planning-org-label { align-self: center; margin-right: 2px; padding: 7px 11px; border-radius: 999px; background: #eef4ff; color: #0b63ce; font-size: 12px; font-weight: 600; }
.planning-hero { display: grid; grid-template-columns: minmax(340px,1.45fr) minmax(230px,.72fr); gap: 14px; align-items: stretch; }
.planning-hero-main, .planning-team-progress, .planning-outlet-progress { border: 1px solid #dce3ec; border-radius: 20px; background: #fff; box-shadow: 0 7px 24px rgba(16,42,67,.035); }
.planning-hero-main { grid-row: span 2; padding: 25px 26px; background: linear-gradient(145deg,#fff 0%,#f8fbff 100%); }
.planning-eyebrow { color: #0b63ce; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.planning-coverage-head { margin-top: 22px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.planning-coverage-head h3 { margin: 0; color: #102f45; font-size: 22px; }
.planning-coverage-head p { margin: 6px 0 0; color: #6e6e73; font-size: 13px; }
.planning-coverage-head > strong { color: #0b63ce; font-size: clamp(36px,5vw,56px); line-height: .95; letter-spacing: -.05em; }
.planning-coverage-track, .planning-progress-track { overflow: hidden; border-radius: 999px; background: #e7edf5; }
.planning-coverage-track { height: 11px; margin-top: 22px; }
.planning-coverage-track i, .planning-progress-track i { display: block; height: 100%; border-radius: inherit; background: #0b63ce; }
.planning-coverage-meta { margin-top: 9px; display: flex; justify-content: space-between; gap: 18px; color: #6e6e73; font-size: 12px; }
.planning-team-progress { padding: 19px 20px; }
.planning-team-progress > h4, .planning-outlet-progress h4 { margin: 0; color: #102f45; font-size: 16px; }
.planning-outlet-progress { padding: 15px 18px; display: grid; grid-template-columns: minmax(108px,.7fr) 1fr 1fr; gap: 16px; align-items: center; border-style: dashed; box-shadow: none; background: #fbfcfe; }
.planning-outlet-kicker { display: block; margin-bottom: 3px; color: #8e8e93; font-size: 12px; font-weight: 700; }
.planning-outlet-progress h4 { font-size: 14px; }
.planning-progress-line { margin-top: 13px; }
.planning-outlet-progress .planning-progress-line { margin-top: 0; }
.planning-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; color: #52616b; font-size: 12px; }
.planning-progress-head strong { color: #102f45; font-size: 15px; }
.planning-progress-head small { margin-left: 2px; color: #8e8e93; font-size: 12px; font-weight: 500; }
.planning-progress-track { height: 6px; margin-top: 7px; }
.planning-progress-line.outlet .planning-progress-track i { background: #74869a; }
.planning-progress-foot { margin-top: 5px; color: #8e8e93; font-size: 12px; }
.planning-section-heading > div > p { margin: 4px 0 0; color: #8e8e93; font-size: 12px; }
.planning-owner-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.planning-owner-card { min-width: 0; padding: 16px; border: 1px solid #e1e6ed; border-radius: 16px; background: #fff; color: inherit; text-align: left; box-shadow: 0 5px 18px rgba(16,42,67,.03); }
.planning-owner-card:hover { border-color: #9dbce2; transform: translateY(-1px); }
.planning-owner-head { display: flex; justify-content: space-between; gap: 12px; }
.planning-owner-head strong, .planning-owner-head span { display: block; }
.planning-owner-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #102f45; font-size: 15px; }
.planning-owner-head span { margin-top: 4px; color: #8e8e93; font-size: 12px; }
.planning-owner-head b { color: #0b63ce; font-size: 18px; white-space: nowrap; }
.planning-owner-metrics { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 5px 10px; color: #52616b; font-size: 12px; }
.planning-period-note { margin: -2px 0 12px; padding: 10px 13px; border: 1px solid #f0d5a7; border-radius: 12px; background: #fff9ee; color: #8a5a14; font-size: 12px; }
.pill.location-building { background: #e7f6ed; color: #177245; }
.pill.location-calibration { background: #fff4e5; color: #9a5b00; }
.pill.location-scene-unit { background: #e7f6ed; color: #177245; }
.pill.location-scene-building { background: #eaf3ff; color: #0b63ce; }
.pill.location-scene-pending { background: #fff4e5; color: #9a5b00; }
.pill.location-pending { background: #eff1f4; color: #667085; }

@media (max-width: 900px) {
  .app-shell { display: block; }.sidebar { display: none; }.workspace-header { padding: 16px 18px; min-height: 76px; }.workspace-header h2 { font-size: 21px; }.session-label { display: none; }
  .mobile-module-wrap, .mobile-nav-wrap { display: block; padding: 10px 16px 0; background: #fff; overflow-x: auto; }.mobile-module-nav, .mobile-nav { display: flex; gap: 8px; min-width: max-content; }
  .mobile-module-nav button, .mobile-nav button { min-height: 44px; padding: 0 14px; border: 1px solid #dfe3e8; border-radius: 6px; background: #fff; color: #52616b; }.mobile-module-nav button.is-active, .mobile-nav button.is-active { border-color: #0b63ce; background: #eef4ff; color: #0b63ce; font-weight: 600; }
  .toolbar, .content { padding-left: 16px; padding-right: 16px; }.content { min-height: calc(100vh - 130px); }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.archive-grid, .planning-grid, .analytics-grid, .admin-grid { grid-template-columns: 1fr; }
  .detail-layer { grid-template-columns: 1fr; }.detail-panel { grid-column: 1; width: 100%; }.form-fields { grid-template-columns: 1fr; }.form-field.is-wide { grid-column: auto; }
  .attention-row { align-items: flex-start; }.attention-row span:last-child { max-width: 48%; }
  .workspace-spatial .content { height: calc(100vh - 164px); min-height: 580px; }
  .planning-hero { grid-template-columns: 1fr; }.planning-hero-main { grid-row: auto; }.planning-outlet-progress { grid-template-columns: 1fr 1fr; }.planning-outlet-progress > div:first-child { grid-column: 1 / -1; }
  .planning-owner-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .mortgage-admin-page .admin-card { grid-template-columns: minmax(0,1fr); padding: 14px; }
  .mortgage-admin-page .admin-actions { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .planning-hero-main { padding: 20px; }.planning-coverage-head { align-items: start; }.planning-coverage-head > strong { font-size: 36px; }.planning-coverage-meta { display: grid; gap: 4px; }
  .planning-owner-grid { grid-template-columns: 1fr; }.planning-outlet-progress { grid-template-columns: 1fr; }.planning-outlet-progress > div:first-child { grid-column: auto; }
}

/* 2026-08-09 workbench information architecture */
.workspace:not(.workspace-spatial) { background: #f3f6f8; }
.workspace:not(.workspace-spatial) .content { width: min(100%, 1580px); margin: 0 auto; padding: 24px 28px 48px; }
.workspace-header { position: sticky; top: 0; z-index: 90; min-height: 76px; padding: 15px 28px; }
.workspace-header h2 { margin-top: 1px; font-size: 24px; letter-spacing: -.02em; }
.workspace-kicker { letter-spacing: .04em; }
.toolbar { position: sticky; top: 76px; z-index: 78; padding-inline: 28px; box-shadow: 0 1px 0 rgba(16,42,67,.06); }
.toolbar:not(:empty) { padding-top: 12px; padding-bottom: 12px; }
.toolbar input, .toolbar select { min-width: 180px; min-height: 44px; border-color: #d8e0e7; }
.toolbar input[type="search"] { min-width: min(380px, 56vw); }
.page-intro { min-height: 48px; margin: 0 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-intro h3 { margin: 0; color: #183247; font-size: 22px; letter-spacing: -.02em; }
.page-intro p { margin: 5px 0 0; color: #71808d; font-size: 12px; }
.page-intro > strong { color: #526778; font-size: 13px; font-weight: 700; white-space: nowrap; }
.page-intro .action-strip { margin: 0; }
.summary-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { min-height: 100px; padding: 18px 20px; border-color: #e1e8ed; border-radius: 16px; box-shadow: 0 8px 24px rgba(17,49,72,.035); }
.metric-label { color: #71808d; font-size: 12px; }
.metric-value { margin-top: 7px; color: #15334a; font-size: 29px; letter-spacing: -.04em; }
.panel { border-color: #e1e8ed; border-radius: 18px; box-shadow: 0 8px 26px rgba(17,49,72,.035); }
.empty-state, .page-error { min-height: 260px; padding: 56px 24px; border: 1px solid #e1e8ed; border-radius: 18px; display: grid; place-content: center; justify-items: center; gap: 10px; color: #71808d; background: #fff; text-align: center; }
.empty-state h3, .page-error strong { margin: 0; color: #405767; font-size: 16px; }
.page-error span { max-width: 480px; font-size: 13px; }

.page-skeleton { display: grid; gap: 18px; }
.page-skeleton-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.page-skeleton-metrics i, .page-skeleton-layout i { display: block; border-radius: 17px; background: linear-gradient(100deg,#e9eef2 20%,#f7f9fa 42%,#e9eef2 64%); background-size: 220% 100%; animation: wb-local-skeleton 1.15s linear infinite; }
.page-skeleton-metrics i { height: 76px; }
.page-skeleton-layout { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.7fr); gap: 16px; }
.page-skeleton-layout i { height: 520px; }
@keyframes wb-local-skeleton { to { background-position-x: -220%; } }
.workspace-loading { display: none; }
.workspace-spatial .workspace-loading { display: block; top: 76px; }
.workspace-spatial .workspace-loading.is-hidden { display: none; }
.workspace-spatial .spatial-page-error { height: 100%; min-height: 520px; border: 0; border-radius: 0; }

.records-table, .archive-table { overflow: hidden; border: 1px solid #e0e7ec; border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(17,49,72,.04); }
.records-table-head, .records-table-row { display: grid; grid-template-columns: minmax(340px,1.6fr) 170px 130px 120px; gap: 14px; align-items: center; }
.archive-table-head, .archive-table-row { display: grid; grid-template-columns: minmax(260px,1.25fr) 90px minmax(260px,1.4fr) 80px 90px; gap: 14px; align-items: center; }
.records-table-head, .archive-table-head { min-height: 42px; padding: 0 18px; color: var(--wb-muted); background: #f9fafc; font-size: 12px; font-weight: 500; }
.records-table-row, .archive-table-row { width: 100%; min-height: 74px; padding: 10px 18px; border: 0; border-top: 1px solid #edf1f3; color: #314a5c; background: #fff; text-align: left; transition: background .16s ease; }
.records-table-row:hover, .archive-table-row:hover { background: #f7fbff; }
.records-table-row > span, .archive-table-row > span { min-width: 0; color: #5e7180; font-size: 12px; }
.records-object { display: grid; grid-template-columns: minmax(0,1fr); column-gap: 12px; align-items: center; }
.records-object.has-photo { grid-template-columns: 48px minmax(0,1fr); }
.records-object img { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: linear-gradient(145deg,#e7eef3,#f5f7f8); }
.records-object b, .archive-name b { overflow: hidden; color: #1d1d1f; font-size: 14px; text-overflow: ellipsis; white-space: normal; }
.records-object small, .archive-name small { overflow: hidden; color: #6e6e73; font-size: 12px; text-overflow: ellipsis; white-space: normal; }
.records-table-row em, .archive-state { display: inline-flex; padding: 5px 9px; border-radius: 5px; color: #42627a; background: #eef3f6; font-size: 12px; font-style: normal; font-weight: 500; }
.archive-name { display: grid; gap: 5px; }
.archive-state { color: #9a6a15; background: #fff5df; }
.archive-state.is-profiled { color: #16734c; background: #e8f6ef; }
.archive-facets { margin: -4px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.archive-facets > span { padding: 7px 11px; border: 1px solid #e0e7ec; border-radius: 999px; color: #617483; background: #fff; font-size: 11px; }
.archive-facets b { margin-left: 4px; color: #1f4d6d; }

.detail-layer { grid-template-columns: 1fr min(780px, 96vw); }
.detail-panel { background: #f4f7f9; }
.detail-header { min-height: 76px; padding: 15px 22px; }
.detail-header h3 { max-width: 640px; overflow: hidden; color: #17354b; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.detail-content { max-width: none; padding: 18px 20px 44px; }
.detail-content > .action-strip { margin: 0 0 14px; padding: 12px; border: 1px solid #e1e8ed; border-radius: 15px; background: #fff; }
.detail-section { margin: 0 0 14px; padding: 18px; border: 1px solid #e1e8ed; border-radius: 16px; background: #fff; box-shadow: none; }
.detail-master-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-master-grid .detail-section { min-width: 0; }
.visit-current { padding: 0; overflow: hidden; }
.visit-current-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #fff; background: linear-gradient(135deg,#0c5ea7,#167ca7); }
.visit-current-head > div { display: grid; gap: 3px; }
.visit-current-head span { color: rgba(255,255,255,.75); font-size: 10px; }
.visit-current-head strong { font-size: 18px; }
.visit-current-head time { font-size: 12px; white-space: nowrap; }
.visit-current > .detail-photo-section { margin: 0; padding: 16px 18px 0; border: 0; border-radius: 0; box-shadow: none; }
.visit-current-grid { padding: 16px 18px 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 24px; }
.detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 22px; }
.detail-fact span { color: #6e6e73; font-size: 12px; }
.detail-fact strong { color: #263f52; font-size: 13px; font-weight: 650; }
.detail-photo-button { height: 190px; }
.customer-link-list { display: grid; gap: 9px; }
.customer-link-card { padding: 13px 14px; border: 1px solid #e5ebef; border-radius: 13px; background: #fafcfd; }
.customer-link-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.customer-link-head > div { display: grid; gap: 3px; }
.customer-link-head strong { color: #1c3b50; font-size: 14px; }
.customer-link-head span, .customer-link-card small { color: #788a98; font-size: 10px; }
.customer-link-head .button { min-height: 30px; padding-inline: 10px; font-size: 10px; }
.customer-link-facts { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.customer-link-facts span { padding: 4px 7px; border-radius: 7px; color: #516c7e; background: #edf3f6; font-size: 10px; }
.customer-link-card p { margin: 8px 0 0; color: #405b6e; font-size: 11px; line-height: 1.5; }
.customer-link-card > small { display: block; margin-top: 8px; }
.visit-timeline { position: relative; gap: 6px; }
.timeline-item { min-height: 62px; padding: 9px 11px; grid-template-columns: 44px minmax(0,1fr); border-color: transparent; background: #f7f9fa; }
.timeline-item:hover { border-color: #cbdbe6; }
.timeline-item.is-active { border-color: #91b9e5; background: #eef4ff; box-shadow: none; }
.timeline-item img { width: 44px; height: 44px; }
.timeline-dot { margin-left: 16px; }
.timeline-item strong { color: #264255; font-size: 11px; }
.timeline-item small { font-size: 10px; }

.form-dialog { width: min(700px, calc(100vw - 32px)); }
.form-lookup { position: relative; }
.form-lookup input[type="search"] { padding-right: 38px; }
.form-lookup-selected { margin-top: 7px; padding: 10px 11px; border: 1px solid #cfe0eb; border-radius: 10px; display: grid; gap: 3px; color: #1c4967; background: #f1f8fc; }
.form-lookup-selected strong { font-size: 12px; }
.form-lookup-selected span { color: #648092; font-size: 10px; }
.form-lookup-results { position: absolute; z-index: 20; right: 0; left: 0; max-height: 300px; margin-top: 5px; padding: 5px; overflow-y: auto; border: 1px solid #d9e3ea; border-radius: 12px; background: #fff; box-shadow: 0 18px 44px rgba(17,45,65,.18); }
.form-lookup-option { width: 100%; padding: 10px; border: 0; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #284759; background: #fff; text-align: left; }
.form-lookup-option:hover { background: #f0f6fa; }
.form-lookup-option > span { min-width: 0; display: grid; gap: 3px; }
.form-lookup-option strong, .form-lookup-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-lookup-option strong { font-size: 12px; }
.form-lookup-option small { color: #748794; font-size: 10px; }
.form-lookup-option b { flex: 0 0 auto; padding: 4px 6px; border-radius: 6px; color: #30729b; background: #e9f4fb; font-size: 9px; }
.form-lookup-state { padding: 18px 12px; color: #71818c; font-size: 11px; text-align: center; }
.form-lookup-state.is-error { color: #b42318; }

.settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; align-items: start; }
.settings-card { padding: 0; overflow: hidden; }
.settings-card h4 { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e7ecef; color: #1a3b51; font-size: 15px; }
.setting-item { min-height: 54px; padding: 11px 18px; border-bottom: 1px solid #edf1f3; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-item:last-child { border-bottom: 0; }
.setting-item span { color: #687d8b; font-size: 12px; }
.setting-item strong { color: #23465c; font-size: 12px; text-align: right; }

.planning-owner-area { min-height: 42px; margin: 9px 0 12px; color: #1f5478; font-size: 15px; font-weight: 780; line-height: 1.5; }

@media (max-width: 1100px) {
  .records-table-head, .records-table-row { grid-template-columns: minmax(0,1.4fr) 150px 110px 100px; }
  .archive-table-head, .archive-table-row { grid-template-columns: minmax(0,1.2fr) 64px minmax(0,1fr) 64px 72px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .workspace-header { position: relative; min-height: 68px; padding: 12px 16px; }
  .toolbar { position: relative; top: auto; padding-inline: 16px; overflow-x: auto; }
  .workspace:not(.workspace-spatial) .content { padding: 18px 14px 34px; }
  .page-skeleton-metrics { grid-template-columns: 1fr 1fr; }
  .page-skeleton-layout { grid-template-columns: 1fr; }
  .page-skeleton-layout i { height: 260px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 86px; padding: 14px 15px; }
  .metric-value { font-size: 24px; }
  .records-table-head, .archive-table-head { display: none; }
  .records-table, .archive-table { border: 0; display: grid; gap: 9px; overflow: visible; background: transparent; box-shadow: none; }
  .records-table-row, .archive-table-row { min-height: 0; padding: 14px; border: 1px solid #e0e7ec; border-radius: 14px; display: grid; gap: 9px; box-shadow: 0 5px 18px rgba(17,49,72,.035); }
  .records-table-row { grid-template-columns: 1fr auto; }
  .records-object { grid-column: 1 / -1; }
  .records-table-row > :nth-child(3) { text-align: right; }
  .archive-table-row { grid-template-columns: 1fr auto; }
  .archive-name { grid-column: 1 / -1; }
  .archive-table-row > :nth-child(3) { grid-column: 1 / -1; }
  .records-table-row > :last-child, .archive-table-row > :last-child { display: block; }
  .detail-layer { grid-template-columns: 1fr; }
  .detail-panel { grid-column: 1; width: 100%; }
  .detail-master-grid { grid-template-columns: 1fr; gap: 0; }
  .settings-grid { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 560px) {
  .page-intro { min-height: 38px; margin-bottom: 12px; }
  .page-intro h3 { font-size: 18px; }
  .summary-grid { gap: 8px; }
  .metric-card { min-height: 76px; padding: 12px 13px; }
  .metric-label { font-size: 10px; }
  .metric-value { margin-top: 4px; font-size: 21px; }
  .toolbar-row { flex-wrap: nowrap; min-width: max-content; }
  .toolbar input[type="search"] { min-width: 250px; }
  .detail-header { min-height: 64px; padding: 12px 14px; }
  .detail-header h3 { max-width: calc(100vw - 110px); font-size: 17px; }
  .detail-content { padding: 12px 10px 30px; }
  .detail-section { padding: 14px; }
  .visit-current-grid, .detail-grid { grid-template-columns: 1fr; }
  .visit-current-head { align-items: start; flex-direction: column; gap: 7px; }
  .photo-grid { grid-template-columns: 1fr; }
  .detail-photo-button { height: 230px; }
  .form-dialog { width: calc(100vw - 16px); max-height: 94vh; }
  .workbench-form { padding: 16px; }
  .form-fields { grid-template-columns: 1fr; }
}
.form-field[hidden] { display: none; }
.form-checkbox-group { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.form-checkbox-group legend { margin-bottom: 6px; color: #52616b; font-size: 12px; }
.form-checkbox-group .form-field { display: flex; flex-direction: row-reverse; align-items: center; min-height: 44px; cursor: pointer; }
.form-checkbox-group input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: #0b63ce; }

/* Workbench visual system */
:root {
  --wb-ink: #142334;
  --wb-muted: #667587;
  --wb-line: #e4eaf0;
  --wb-paper: #ffffff;
  --wb-canvas: #f3f6f8;
  --wb-blue: #0b63ce;
  --wb-green: #16845b;
  --wb-shadow: none;
}
body { color: var(--wb-ink); background: var(--wb-canvas); }
.app-shell { grid-template-columns: 256px minmax(0, 1fr); background: var(--wb-canvas); }
.sidebar { padding: 24px 16px 18px; background: linear-gradient(178deg, #0c2f46 0%, #10283a 58%, #0b2030 100%); box-shadow: 10px 0 40px rgba(12, 37, 54, .08); }
.sidebar-brand { gap: 13px; min-height: 64px; padding: 0 11px 24px; }
.sidebar-brand > div:last-child { display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 18px; letter-spacing: .02em; }
.sidebar-brand span { color: rgba(255,255,255,.54); font-size: 11px; }
.module-nav { padding: 4px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.055); }
.module-nav button { border-radius: 9px; font-size: 12px; }
.primary-nav { gap: 3px; }
.primary-nav .nav-item { position: relative; min-height: 44px; padding: 0 14px 0 17px; border-radius: 10px; font-size: 13px; }
.primary-nav .nav-item.is-active { background: rgba(255,255,255,.14); box-shadow: none; }
.workspace { position: relative; min-width: 0; background: radial-gradient(circle at 88% -10%, rgba(62,130,200,.08), transparent 30%), var(--wb-canvas); }
.workspace-header { position: relative; z-index: 60; min-height: 82px; padding: 17px clamp(22px, 2.5vw, 40px); border-color: rgba(216,225,233,.9); background: rgba(255,255,255,.92); box-shadow: 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(16px); }
.workspace-title { min-width: 0; flex: 1 1 auto; }
.workspace-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-header h2 { margin-top: 2px; color: #162536; font-size: clamp(22px, 2.1vw, 29px); letter-spacing: -.03em; }
.workspace-kicker { color: #6b7e91; font-size: 10px; letter-spacing: .12em; }
.header-actions { flex: 0 0 auto; gap: 8px; }
.session-chip { min-width: 0; height: 42px; padding: 0 13px 0 6px; border: 1px solid #e1e7ed; border-radius: 21px; display: flex; align-items: center; gap: 8px; background: #fff; }
.session-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#1768c6,#16845b); font-size: 12px; font-weight: 800; }
.session-label { max-width: 210px; color: #425466; font-size: 12px; }
.icon-button, .text-button { height: 44px; min-height: 44px; border-color: #e0e7ee; border-radius: 12px; }
.icon-button { width: 44px; }
.refresh-button span { display: block; transition: transform .25s ease; }
.refresh-button:hover span { transform: rotate(65deg); }
.text-button { padding: 0 14px; color: #536578; font-size: 12px; }
.toolbar { padding-right: clamp(22px,2.5vw,40px); padding-left: clamp(22px,2.5vw,40px); background: rgba(255,255,255,.94); }
.toolbar:not(:empty) { border-color: #e4eaf0; }
.toolbar input, .toolbar select { border-color: #dce4eb; background: #fbfcfd; }
.content { width: 100%; max-width: 1760px; min-height: calc(100vh - 82px); margin: 0 auto; padding: 28px clamp(22px,2.5vw,40px) 56px; }
.workspace-loading { position: absolute; z-index: 80; top: 81px; right: 0; left: 0; height: 3px; overflow: hidden; background: rgba(11,99,206,.08); }
.workspace-loading span { position: absolute; inset: 0 auto 0 0; width: 38%; background: linear-gradient(90deg,transparent,#0b63ce,#5cb6e7,transparent); animation: workspace-progress 1.05s ease-in-out infinite; }
.workspace-loading b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes workspace-progress { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
.notice { border: 1px solid #dce8f6; box-shadow: 0 5px 16px rgba(34,75,114,.04); }
.metric-card, .panel, .record-card, .archive-card, .admin-card { border-color: var(--wb-line); box-shadow: var(--wb-shadow); }
.summary-grid { gap: 16px; }
.metric-card { position: relative; min-height: 116px; padding: 22px 22px 18px; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -28px; bottom: -48px; width: 100px; height: 100px; border-radius: 50%; background: rgba(11,99,206,.055); }
.metric-label { color: var(--wb-muted); font-size: 12px; }
.metric-value { margin-top: 10px; color: #13324b; font-size: clamp(27px,2.7vw,36px); letter-spacing: -.04em; }
.section-heading { margin: 30px 0 15px; }
.section-heading h3 { color: #172b3d; font-size: 19px; letter-spacing: -.02em; }
.panel { border-radius: 20px; }
.record-list { gap: 11px; }
.record-card { min-height: 92px; padding: 14px 18px; grid-template-columns: minmax(0,1fr) auto; align-items: center; border-radius: 16px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.record-card.has-photo { grid-template-columns: 88px minmax(0,1fr) auto; }
.record-photo { width: 88px; height: 64px; border-radius: 11px; object-fit: cover; background: #edf1f4; }
.record-body { min-width: 0; }
.record-meta { display: grid; gap: 4px; text-align: right; }
.archive-grid { grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 14px; }
.archive-card { min-height: 136px; border-radius: 17px; transition: transform .15s ease, border-color .15s ease; }
.case-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; border: 1px solid var(--wb-line,#e5e5ea); border-radius: 10px; background: #fff; overflow: hidden; }
.case-card { min-width: 0; min-height: 104px; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--wb-line,#e5e5ea); border-radius: 0; background: #fff; box-shadow: none; align-content: start; transition: background .15s ease; }
.case-card:last-child { border-bottom: 0; }
.case-card > div:first-child { min-width: 0; }
.case-card:hover { background: #f9fafc; }
.case-head { align-items: center; }
.case-title { font-size: 16px; font-weight: 600; }
.case-facts { gap: 6px 15px; }
.case-facts span { position: relative; }
.case-facts span + span::before { content: ""; position: absolute; top: 50%; left: -8px; width: 3px; height: 3px; border-radius: 50%; background: #bac5ce; }
.case-next-action { margin-top: 8px; color: #6e6e73; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.case-amount { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mortgage-overview { padding: 18px 0 22px; border-bottom: 1px solid var(--wb-line); margin-bottom: 18px; }
.mortgage-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mortgage-overview-head > div { display: flex; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
.mortgage-overview-head small, .mortgage-next > span, .mortgage-next time { color: var(--wb-muted); font-size: 12px; }
.mortgage-overview-head strong { color: var(--wb-ink); font-size: 28px; font-weight: 600; }
.mortgage-next { display: grid; gap: 6px; margin-top: 14px; }
.mortgage-next strong { font-size: 15px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.mortgage-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.action-disclosure { position: relative; }
.action-disclosure summary { min-height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--wb-line); border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; list-style: none; }
.action-disclosure summary::-webkit-details-marker { display: none; }
.action-disclosure summary::after { content: "⌄"; }
.action-disclosure[open] summary::after { content: "⌃"; }
.action-disclosure-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--wb-line); border-radius: 10px; background: #fff; }
.action-disclosure[open] { flex: 1 1 240px; }
.action-disclosure-menu .button { white-space: normal; }

.mortgage-stage-section { overflow: hidden; }
.mortgage-stage-rail { display: flex; align-items: flex-start; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: thin; }
.mortgage-stage-node { position: relative; flex: 1 0 112px; min-width: 112px; padding-right: 14px; }
.mortgage-stage-node::before { content: ""; position: absolute; top: 8px; right: 0; left: 17px; height: 2px; background: #e2e8ed; }
.mortgage-stage-node:last-child::before { display: none; }
.mortgage-stage-node > i { position: relative; z-index: 1; display: block; width: 17px; height: 17px; border: 4px solid #dbe3e9; border-radius: 50%; background: #fff; }
.mortgage-stage-node > div { margin-top: 9px; display: grid; gap: 3px; }
.mortgage-stage-node strong { color: #5d6d7b; font-size: 12px; line-height: 1.35; }
.mortgage-stage-node span, .mortgage-stage-node small { color: #6e6e73; font-size: 12px; line-height: 1.5; }
.mortgage-stage-node.is-done::before, .mortgage-stage-node.is-current::before, .mortgage-stage-node.is-rework::before { background: #80b5e8; }
.mortgage-stage-node.is-done > i { border-color: #2f95ce; background: #2f95ce; box-shadow: inset 0 0 0 3px #fff; }
.mortgage-stage-node.is-current > i { border-color: #0b63ce; box-shadow: 0 0 0 5px rgba(11,99,206,.12); }
.mortgage-stage-node.is-current strong { color: #0b63ce; }
.mortgage-stage-node.is-rework > i { border-color: #d97706; background: #fff7e8; }
.analytics-grid { gap: 18px; }
.progress-track { height: 8px; }
.progress-fill { border-radius: 99px; background: linear-gradient(90deg,#0b63ce,#3a9ad9); }
.trend-panel { margin-top: 18px; padding: 20px 22px 18px; }
.chart-caption { margin: 0; color: #6e6e73; font-size: 12px; }
.trend-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; }
.trend-chart { height: 240px; min-width: calc(var(--trend-count,16) * 64px); padding: 20px 4px 0; display: flex; align-items: stretch; gap: 8px; }
.mortgage-trend-chart.is-zero { height: 100px; }
.trend-column { min-width: 0; flex: 1; display: grid; grid-template-rows: 18px minmax(0,1fr) 22px; align-items: end; justify-items: stretch; text-align: center; }
.trend-column span { color: #6e6e73; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend-column i { width: min(28px,80%); min-height: 3px; margin: 0 auto; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg,#4ca9d9,#0b63ce); box-shadow: 0 8px 16px rgba(11,99,206,.12); transition: height .22s ease; }
.trend-column small { align-self: center; color: #6e6e73; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-chart { height: 210px; display: grid; place-items: center; color: #8996a2; font-size: 12px; }
.button { min-height: 44px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.button.primary { background: linear-gradient(135deg,#0b63ce,#0879ba); box-shadow: 0 8px 18px rgba(11,99,206,.16); }
.empty-state { padding: 76px 20px; }
.empty-state h3 { color: #7b8997; font-size: 14px; font-weight: 600; }
.detail-layer { grid-template-columns: 1fr min(760px, 94vw); }
.detail-panel { background: #fbfcfd; box-shadow: -24px 0 80px rgba(13,32,48,.2); }
.detail-header { min-height: 78px; padding: 18px 26px; backdrop-filter: blur(14px); }
.detail-content { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px 28px 54px; }
.detail-section { margin: 0 0 14px; padding: 21px; border: 1px solid #e5ebf0; border-radius: 17px; background: #fff; box-shadow: 0 7px 22px rgba(19,45,67,.035); }
.detail-section h4 { color: #1a3145; font-size: 14px; }
.detail-section-title { margin-bottom: 13px; display: flex; justify-content: space-between; align-items: center; }
.detail-section-title h4 { margin: 0; }
.detail-section-title span { color: #7b8997; font-size: 11px; }
.detail-grid { gap: 15px 24px; }
.detail-fact span { color: #6e6e73; }
.detail-fact strong { color: #263b4c; line-height: 1.55; }
.photo-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.detail-photo-button { min-width: 0; height: 220px; padding: 0; border: 1px solid #e1e8ee; border-radius: 13px; overflow: hidden; background: #edf2f5; cursor: zoom-in; }
.detail-photo-button img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.detail-photo-button:hover img { transform: scale(1.025); }
.photo-viewer { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 24px; }
.photo-viewer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(5,13,20,.9); }
.photo-viewer-dialog { position: relative; z-index: 1; width: min(94vw, 1500px); height: 92vh; display: grid; place-items: center; pointer-events: none; }
.photo-viewer-dialog img { display: block; max-width: 100%; max-height: 92vh; object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,.42); pointer-events: auto; }
.photo-viewer-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; color: #fff; background: rgba(20,32,42,.72); font-size: 26px; pointer-events: auto; }
.visit-timeline { display: grid; gap: 8px; }
.timeline-item { width: 100%; min-width: 0; padding: 10px; border: 1px solid #e8edf1; border-radius: 12px; display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 11px; align-items: center; color: inherit; background: #fbfcfd; text-align: left; }
.timeline-item.is-active { border-color: #91b9e5; background: #f3f8ff; }
.timeline-item img { width: 58px; height: 48px; border-radius: 8px; object-fit: cover; }
.timeline-item > span:last-child { display: grid; gap: 3px; }
.timeline-item strong { font-size: 12px; }
.timeline-item small { overflow: hidden; color: #708090; font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.timeline-dot { width: 10px; height: 10px; margin-left: 22px; border-radius: 50%; background: #70a5d9; box-shadow: 0 0 0 5px #e9f2fb; }

/* Planning stays operational; the map is shared with the grid view. */
.planning-hero { grid-template-columns: minmax(440px,1.6fr) minmax(280px,.8fr); gap: 16px; }
.planning-hero-main, .planning-team-progress, .planning-outlet-progress { border-color: #dfe7ee; border-radius: 22px; box-shadow: var(--wb-shadow); }
.planning-hero-main { min-height: 250px; padding: 28px 30px; background: radial-gradient(circle at 88% 5%,rgba(37,128,204,.13),transparent 34%),linear-gradient(145deg,#fff,#f7fbff); }
.planning-coverage-head > strong { color: #0b63ce; }
.planning-coverage-track { height: 12px; }
.planning-coverage-track i { background: linear-gradient(90deg,#0b63ce,#2d9fcb); }
.planning-owner-grid { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 13px; }
.planning-owner-card { min-height: 148px; border-radius: 17px; box-shadow: 0 7px 22px rgba(21,51,75,.04); }
.planning-heading-actions { display: flex; align-items: center; gap: 12px; }

/* Grid map and route overlay */
.workspace-spatial .workspace-header { position: relative; inset: auto; z-index: 80; min-height: 82px; }
.workspace.workspace-spatial .workspace-header > .workspace-title { display: block !important; }
.workspace-spatial .content { max-width: none; height: calc(100vh - 82px); min-height: 660px; padding: 0; }
.workspace-spatial .spatial-desktop { height: 100%; border: 0; border-radius: 0; grid-template-rows: auto minmax(0,1fr); box-shadow: none; }
.workspace-spatial .spatial-commandbar { min-height: 78px; padding: 12px 18px; grid-template-columns: auto minmax(230px,1fr) auto auto; gap: 12px; border-color: #e0e7ed; background: rgba(255,255,255,.95); backdrop-filter: blur(16px); }
.spatial-phase-tabs { flex-wrap: nowrap; }
.spatial-phase-tabs button { min-width: 52px; }
.spatial-assignment-toolbar { min-height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; }
.spatial-assignment-segment { padding: 3px; border-color: #dce6e0; border-radius: 10px; background: #eff5f1; }
.spatial-assignment-option { min-width: 58px; height: 32px; padding: 0 10px; border-radius: 8px; color: #64756b; background: transparent; font-size: 11px; font-weight: 750; line-height: 32px; }
.spatial-assignment-option.is-active { color: #13714d; background: #fff; box-shadow: 0 3px 9px rgba(27,91,61,.12); }
.spatial-assignment-toolbar > strong { min-width: 54px; padding: 0 4px; color: #3e5548; font-size: 11px; text-align: center; }

@media (max-width: 1360px) {
  .workspace-spatial .spatial-commandbar { grid-template-columns: auto minmax(220px,1fr) auto; }
  .workspace-spatial .spatial-summary-inline { display: none; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .workspace-header { min-height: 72px; }
  .header-actions { gap: 6px; }
  .session-chip { width: 34px; height: 34px; padding: 2px; border: 0; }
  .session-avatar { width: 30px; height: 30px; }
  .session-label { display: none; }
  .workspace-loading { top: 71px; }
  .content { min-height: calc(100vh - 124px); padding: 20px 16px 42px; }
  .workspace-spatial .content { height: calc(100vh - 150px); min-height: 590px; }
  .workspace-spatial .spatial-commandbar { min-height: 122px; padding: 10px 12px; grid-template-columns: 1fr auto; }
  .workspace-spatial .spatial-search-wrap { grid-column: 1 / -1; grid-row: 2; }
  .spatial-assignment-toolbar { grid-column: 1 / -1; }
  .planning-hero { grid-template-columns: 1fr; }
  .planning-heading-actions { align-items: flex-end; flex-direction: column; }
  .record-card.has-photo { grid-template-columns: 72px minmax(0,1fr); }
  .record-photo { width: 72px; height: 58px; }
  .record-card.has-photo .record-meta { grid-column: 2; text-align: left; }
  .photo-grid { grid-template-columns: 1fr; }
  .case-list { grid-template-columns: 1fr; }
  .detail-photo-button { height: min(58vw, 320px); }
}

@media (max-width: 560px) {
  .workspace-title h2 { font-size: 20px; }
  .text-button { padding: 0 10px; }
  .refresh-button { display: none; }
  .summary-grid { gap: 10px; }
  .metric-card { min-height: 98px; padding: 17px; }
  .metric-value { font-size: 27px; }
  .record-card, .record-card.has-photo { grid-template-columns: 1fr; }
  .record-photo { width: 100%; height: 150px; }
  .record-card .record-meta, .record-card.has-photo .record-meta { text-align: left; }
  .case-card { grid-template-columns: minmax(0,1fr) auto; padding: 14px; gap: 12px; }
  .case-amount { align-self: start; margin-top: 0; font-size: 18px; text-align: right; }
  .detail-content { padding: 16px 14px 38px; }
  .detail-section { padding: 17px; }
  .detail-grid { grid-template-columns: 1fr; }
  .workspace-spatial .spatial-commandbar { min-height: 136px; }
  .spatial-assignment-toolbar { overflow-x: auto; }
}

@media (max-width: 900px) {
  .detail-layer { grid-template-columns: 1fr; }
  .detail-panel { grid-column: 1; width: 100%; }
  .archive-table-row { grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "name name name" "phase location state" "visits visits state"; column-gap: 8px; row-gap: 6px; }
  .archive-table-row .archive-name { grid-area: name; }
  .archive-table-row > :nth-child(2) { grid-area: phase; }
  .archive-table-row > :nth-child(3) { grid-area: location; grid-column: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .archive-table-row > :nth-child(4) { grid-area: visits; }
  .archive-table-row > :nth-child(5) { grid-area: state; align-self: center; display: block; }
}

.planning-outlet-progress { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
.planning-outlet-progress > div:first-child { grid-column: 1 / -1; }
.planning-outlet-progress .planning-progress-head { white-space: nowrap; }

@media (max-width: 560px) {
  .planning-outlet-progress { grid-template-columns: 1fr; }
  .planning-outlet-progress > div:first-child { grid-column: auto; }
  .toolbar { overflow: visible; }
  .toolbar-row { width: 100%; min-width: 0; flex-wrap: wrap; align-items: end; }
  .toolbar-row label { min-width: 0; flex: 1 1 132px; }
  .toolbar input, .toolbar select, .toolbar input[type="search"] { width: 100%; min-width: 0; }
  .toolbar-row .button { flex: 0 0 auto; }
}

/* Final visit-detail and planning layout: dense enough for desktop, still
   structurally identical to the mobile work flow. */
.detail-layer { grid-template-columns: 1fr min(1040px,96vw); }
.detail-content { max-width: 1040px; padding: 22px 24px 48px; }
.detail-header h3 { max-width: min(780px,calc(100vw - 140px)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-current { display: grid; grid-template-columns: minmax(300px,.88fr) minmax(0,1.12fr); align-items: start; }
.visit-current-head { grid-column: 1 / -1; }
.visit-current > .detail-photo-section { grid-column: 1; min-width: 0; margin: 0; padding: 18px; border: 0; border-right: 1px solid #e8edf1; border-radius: 0; box-shadow: none; }
.visit-current > .detail-photo-section .detail-section-title { margin-bottom: 10px; }
.visit-current > .detail-photo-section .photo-grid { grid-template-columns: 1fr; }
.visit-current > .detail-photo-section .detail-photo-button { width: 100%; height: auto; max-height: 300px; aspect-ratio: 4 / 3; }
.visit-current-grid { grid-column: 2; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; padding: 20px 22px; }
.detail-grid .detail-fact.is-wide { grid-column: 1 / -1; }
.detail-fact strong { overflow-wrap: anywhere; word-break: normal; }
.customer-product-list { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.customer-product-list > span { padding: 3px 7px; border-radius: 7px; color: #176b4c; background: #eaf7f1; font-size: 10px; font-weight: 750; }
.visit-timeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
.timeline-item { display: flex; align-items: flex-start; }
.timeline-item.has-photo { display: flex; }
.timeline-item > img { flex: 0 0 58px; }
.timeline-item > span:last-child { min-width: 0; flex: 1 1 auto; display: block; }
.timeline-item strong { display: block; overflow: hidden; font-variant-numeric: tabular-nums; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; }
.timeline-item small { display: block; width: 100%; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.timeline-dot { flex: 0 0 9px; align-self: flex-start; width: 9px; height: 9px; margin: 4px 7px 0 2px; }

.planning-hero { width: 100%; min-width: 0; max-width: 100%; grid-template-columns: minmax(420px,1.15fr) minmax(500px,1fr); align-items: stretch; }
.planning-hero-main { grid-row: auto; min-height: 0; padding: 25px 27px; }
.planning-quota-pair { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.planning-quota-card { min-width: 0; padding: 19px 18px; border: 1px solid #dfe7ee; border-radius: 20px; background: #fff; box-shadow: var(--wb-shadow); }
.planning-quota-card.outlet { border-color: #d7e9df; background: linear-gradient(150deg,#fff,#f6fbf8); }
.planning-quota-title { min-height: 43px; display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.planning-quota-title h4 { margin: 0; color: #173247; font-size: 15px; line-height: 1.35; }
.planning-quota-title span { display: block; margin-top: 3px; color: #82909d; font-size: 12px; }
.planning-quota-card .planning-progress-line { margin-top: 12px; }
.planning-progress-line.outlet .planning-progress-track i { background: #16845b; }
.planning-progress-line.personal .planning-progress-track i { background: #7c3aed; }
@media (max-width: 1360px) {
  .planning-hero { grid-template-columns: 1fr; }
  .planning-quota-pair { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .detail-layer { grid-template-columns: 1fr; }
  .detail-panel { grid-column: 1; width: 100%; }
  .detail-content { max-width: none; }
}

@media (max-width: 700px) {
  .workspace, .content, .planning-hero, .planning-hero-main, .planning-quota-pair, .planning-owner-grid { min-width: 0; max-width: 100%; }
  .visit-current { grid-template-columns: 1fr; }
  .visit-current > .detail-photo-section { grid-column: 1; border-right: 0; border-bottom: 1px solid #e8edf1; }
  .visit-current-grid { grid-column: 1; grid-template-columns: 1fr; }
  .visit-timeline { grid-template-columns: 1fr; }
  .planning-hero-main { padding: 22px 18px; }
  .planning-coverage-head { gap: 8px; }
  .planning-coverage-head h3 { font-size: 20px; }
  .planning-coverage-head p { font-size: 12px; line-height: 1.45; }
  .planning-coverage-head > strong { flex: 0 0 auto; font-size: 38px; }
  .planning-coverage-meta { gap: 3px; display: grid; }
  .planning-quota-pair { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .planning-quota-card { padding: 14px 12px; border-radius: 15px; }
  .planning-quota-title { min-height: 47px; }
  .planning-quota-title h4 { font-size: 13px; }
  .planning-progress-head { gap: 5px; }
  .planning-progress-head strong { font-size: 13px; }
  .planning-progress-head small { font-size: 12px; }
  .planning-owner-grid { grid-template-columns: 1fr; }
  .planning-owner-card { min-height: 0; }
  .planning-section-heading { width: 100%; min-width: 0; flex-direction: column; align-items: stretch; }
  .planning-section-heading > div, .planning-heading-actions { min-width: 0; }
  .planning-heading-actions { width: 100%; align-items: stretch; }
  .planning-heading-actions .button { width: 100%; }
}

/* Area plans contain only progress and complete physical slices. */
.planning-area-panel { min-width: 0; padding: 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px 22px; align-items: center; }
.planning-area-main { min-width: 0; display: grid; gap: 6px; }
.planning-area-main > span { color: #7a8995; font-size: 12px; font-weight: 600; }
.planning-area-main > strong { overflow-wrap: anywhere; color: #17364b; font-size: 21px; line-height: 1.32; }
.planning-area-main > p { margin: 0; overflow-wrap: anywhere; color: #617584; font-size: 12px; line-height: 1.65; }
.planning-area-facts { min-width: 0; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.planning-area-facts > span { padding: 6px 9px; border-radius: 8px; color: #426074; background: #eef3f6; font-size: 12px; }
.planning-exchange-panel { min-width: 0; padding: 20px; }
.planning-exchange-list { display: grid; gap: 9px; }
.planning-exchange-row { min-width: 0; padding: 12px 14px; border: 1px solid #e2e8ed; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fbfcfd; }
.planning-exchange-row > div:first-child { min-width: 0; display: grid; gap: 4px; }
.planning-exchange-row strong, .planning-exchange-row span { overflow-wrap: anywhere; }
.planning-exchange-row span { color: #70818e; font-size: 12px; }
.planning-exchange-row > div:last-child { flex: 0 0 auto; display: flex; gap: 7px; }
.planning-exchange-row .button { min-height: 34px; padding-inline: 11px; font-size: 14px; }

/* Detail sheets must size from the actual drawer width, never page width. */
.detail-panel, .detail-content, .detail-master-grid, .detail-master-grid > .detail-section { min-width: 0; max-width: 100%; }
.detail-panel { width: min(1040px,96vw); overflow-x: hidden; }
.detail-content { width: 100%; overflow-x: hidden; }
.detail-master-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)); }
.detail-section, .detail-grid, .detail-fact { min-width: 0; }
.detail-fact strong { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.timeline-item { min-width: 0; }
.timeline-dot { position: static !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important; margin: 4px 7px 0 2px !important; }
.timeline-item > span:last-child { min-width: 0; }
.timeline-item strong { width: 100%; }

/* Linked business is deliberately different from filing and assignment blue. */
.archive-table-row.is-business { border-top-color: #e4d8fb; background: #fbf9ff; }
.archive-table-row.is-business:hover { background: #f6f1ff; }
.archive-name b { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.archive-business, .relation-business { padding: 3px 6px; border-radius: 5px; color: #6d28d9; background: #ede9fe; font-size: 12px; font-style: normal; font-weight: 500; white-space: nowrap; }
.customer-link-card.is-business, .relation-card.is-business { border-color: #c4b5fd; background: #faf8ff; }
.customer-link-head strong, .relation-card strong { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.relation-products { margin-top: 6px; color: #6d28d9; font-size: 10px; font-weight: 700; }

@media (max-width: 700px) {
  .detail-panel { width: 100%; max-width: 100vw; }
  .detail-master-grid { grid-template-columns: 1fr; }
  .planning-toolbar { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; gap: 10px; }
  .planning-toolbar > * { width: 100%; min-width: 0; max-width: 100%; }
  .planning-toolbar > .planning-org-label { width: fit-content; }
  .planning-toolbar label { display: grid; grid-template-columns: minmax(0,1fr); }
  .planning-toolbar .button { width: 100%; }
  .planning-hero { grid-template-columns: minmax(0,1fr); }
  .planning-coverage-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .planning-coverage-head > div { width: 100%; min-width: 0; }
  .planning-coverage-head > strong { max-width: 100%; align-self: flex-start; font-size: 40px; line-height: 1; letter-spacing: -.04em; }
  .planning-quota-pair { grid-template-columns: minmax(0,1fr); }
  .planning-quota-card { width: 100%; min-width: 0; }
  .planning-section-heading { flex-direction: column; align-items: stretch; }
  .planning-area-panel { grid-template-columns: 1fr; padding: 17px; }
  .planning-area-panel > .button { width: 100%; }
  .planning-exchange-row { align-items: stretch; flex-direction: column; }
  .planning-exchange-row > div:last-child { width: 100%; }
  .planning-exchange-row .button { flex: 1 1 0; }
}

/* 2026-08 mobile parity: Quiet Precision blue, neutral surfaces, no accent strips. */
:root {
  --wb-primary: #0b63ce;
  --wb-primary-deep: #102f45;
  --wb-primary-soft: #eef4ff;
  --wb-canvas: #f5f5f7;
  --wb-line: #e5e5ea;
  --wb-muted: #6e6e73;
  --wb-ink: #1d1d1f;
  --wb-shadow: none;
}
body { background: var(--wb-canvas); color: var(--wb-ink); }
.boot-screen, .auth-screen { background: var(--wb-canvas); color: var(--wb-muted); }
.boot-screen .grid-symbol { margin: 0 auto; }
.auth-card { border-color: var(--wb-line); border-radius: 18px; box-shadow: 0 24px 70px rgba(29, 29, 31, .1); }
.auth-brand { color: var(--wb-primary-deep); }
.qr-frame { border-color: var(--wb-line); border-radius: 16px; }
.sidebar { background: var(--wb-primary-deep); }
.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand > div:last-child { min-width: 0; display: grid; gap: 2px; }
.sidebar-brand > div:last-child span { color: rgba(255,255,255,.58); font-size: 10px; font-weight: 600; }
.module-nav { border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.055); }
.module-nav button { border-radius: 8px; }
.module-nav button.is-active { color: var(--wb-primary-deep); background: #fff; }
.primary-nav .nav-item { border-radius: 9px; }
.primary-nav .nav-item.is-active { color: #fff; background: rgba(255,255,255,.14); box-shadow: none; }
.workspace, .workspace:not(.workspace-spatial) { background: var(--wb-canvas); }
.workspace-header { border-color: var(--wb-line); background: rgba(255,255,255,.96); }
.workspace-kicker { color: var(--wb-primary); }
.session-avatar { background: var(--wb-primary); }
.workspace-loading { background: rgba(11,99,206,.1); }
.workspace-loading span { background: var(--wb-primary); }
.metric-card, .panel, .record-card, .archive-card, .admin-card { border-color: var(--wb-line); border-radius: 10px; box-shadow: var(--wb-shadow); }
.metric-card::after { display: none; }
.metric-value { color: var(--wb-ink); font-variant-numeric: tabular-nums; }
.summary-grid.summary-ledger { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-bottom: 16px; border: 1px solid var(--wb-line); border-radius: 10px; overflow: hidden; background: #fff; }
.summary-ledger .metric-card { min-height: 0; padding: 12px; border: 0; border-right: 1px solid var(--wb-line); border-radius: 0; background: transparent; box-shadow: none; }
.summary-ledger .metric-card:last-child { border-right: 0; }
.summary-ledger .metric-label { color: var(--wb-muted); font-size: 12px; }
.summary-ledger .metric-value { margin-top: 5px; font-size: clamp(20px,2vw,26px); font-weight: 600; overflow-wrap: anywhere; }
.empty-actions { margin: -46px 0 28px; position: relative; display: flex; justify-content: center; }
.workspace-loading.is-refresh { position: fixed; z-index: 85; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); top: auto; width: auto; min-height: 44px; margin: 0; padding: 10px 14px; gap: 8px; border: 1px solid var(--wb-line); border-radius: 10px; color: var(--wb-ink); background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.notice.is-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.button.primary { color: #fff; background: var(--wb-primary); box-shadow: none; }
.button.primary:hover { background: #0957b7; }
.button.secondary { border-color: #d0d5dd; color: #344054; background: #fff; }
.button.secondary:hover { background: #f9fafc; border-color: #98a2b3; }
.progress-fill, .planning-coverage-track i, .planning-progress-track i { background: var(--wb-primary); }
.trend-column i { background: #3478f6; box-shadow: none; }
.pill { color: var(--wb-primary); background: var(--wb-primary-soft); }
.detail-eyebrow { color: var(--wb-primary); }
.visit-current-head { background: var(--wb-primary); }
.detail-note { white-space: pre-line; }
.detail-rapport-card { margin-bottom: 16px; padding: 16px 18px; border: 1px solid #d6e4f5; border-radius: 13px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 14px; color: var(--wb-ink); background: var(--wb-primary-soft); }
.detail-rapport-card div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.detail-rapport-card span { color: var(--wb-muted); font-size: 10px; font-weight: 700; }
.detail-rapport-card strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.detail-rapport-card > b { color: var(--wb-primary); font-size: 18px; }
.detail-rapport-card > small { grid-column: 1 / -1; color: var(--wb-muted); font-size: 10px; }
.business-presence.is-linked { border-color: #c4b5fd; color: #6d28d9; background: #f3efff; }
.inspector-primary { background: var(--wb-primary); }
.inspector-primary:hover { background: #0957b7; }
.inspector-rapport { border-color: #d6e4f5; color: var(--wb-ink); background: var(--wb-primary-soft); }
.inspector-rapport span, .inspector-rapport small { color: var(--wb-muted); }
.inspector-rapport b { color: var(--wb-primary); }

.planning-org-label { border-radius: 8px; color: var(--wb-primary); background: var(--wb-primary-soft); }
.planning-hero-main { border-radius: 16px; background: #fff; }
.planning-quota-card { border-radius: 14px; }
.planning-quota-card.outlet { border-color: #d6e4f5; background: #f8fbff; }
.planning-coverage-head > strong { color: var(--wb-primary); }
.planning-progress-line.outlet .planning-progress-track i { background: var(--wb-primary); }
.planning-analysis-grid { min-width: 0; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(360px,.85fr); gap: 14px; }
.planning-analysis-summary, .planning-phase-analysis { min-width: 0; padding: 20px; }
.planning-analysis-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.planning-analysis-facts > div { min-width: 0; padding: 13px; border: 1px solid #e5e5ea; border-radius: 10px; background: #fafafa; }
.planning-analysis-facts span, .planning-analysis-facts small { display: block; color: var(--wb-muted); font-size: 12px; }
.planning-analysis-facts strong { display: block; margin: 7px 0 4px; color: var(--wb-ink); font-size: 20px; }
.planning-effective { margin-top: 12px; padding: 11px 13px; border-radius: 10px; display: flex; align-items: baseline; justify-content: space-between; color: #3a3a3c; background: var(--wb-primary-soft); }
.planning-effective span { font-size: 12px; }
.planning-effective strong { color: var(--wb-primary); font-size: 18px; }
.planning-phase-analysis .detail-section-title { margin-bottom: 12px; }
.planning-phase-analysis .breakdown-row { margin: 9px 0; }
.planning-owner-grid { grid-template-columns: repeat(4,minmax(220px,1fr)); }
.planning-owner-card { min-height: 0; padding: 17px; border-radius: 13px; }
.planning-owner-card.is-complete { border-color: #9bc3ae; background: #f7fbf8; }
.planning-owner-card.is-behind { border-color: #ead3ad; }
.planning-owner-card.is-progress-only { cursor: default; }
.planning-owner-card.is-progress-only:hover { border-color: #e1e6ed; transform: none; }
.planning-assignment-control { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 17px 19px; }
.planning-assignment-control > div { display: grid; gap: 3px; }
.planning-assignment-control span { color: var(--wb-muted); font-size: 12px; }
.planning-assignment-control strong { color: var(--wb-ink); font-size: 18px; }
.planning-assignment-control.is-cleared { background: #f7f8fa; }
.planning-toolbar-status { color: var(--wb-muted); font-size: 12px; font-weight: 700; }
.planning-owner-head { align-items: start; }
.planning-owner-head > div { min-width: 0; display: grid; gap: 4px; }
.planning-owner-head > div span { overflow: hidden; color: var(--wb-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.planning-owner-head > b { flex: 0 0 auto; color: var(--wb-primary); font-size: 18px; }
.planning-owner-progress { margin-top: 15px; display: grid; gap: 10px; }
.planning-owner-progress > div { display: grid; gap: 5px; }
.planning-owner-progress span { color: #5f6975; font-size: 12px; }
.planning-owner-progress i { height: 6px; overflow: hidden; border-radius: 4px; background: #e9ebef; }
.planning-owner-progress i b { display: block; height: 100%; border-radius: inherit; background: var(--wb-primary); }
.planning-owner-progress > div:last-child i b { background: #6d8fc0; }
.planning-owner-metrics { margin-top: 14px; }

/* Active states use the full row/card surface; no decorative left rail. */
.timeline-item.is-active { border-color: #91b9e5; background: var(--wb-primary-soft); box-shadow: none; }

/* Relationship objects are businesses/customers; people and facts explain each link. */
.relation-section { padding: 0; overflow: hidden; }
.relation-section-title { margin: 0; padding: 18px 20px 14px; border-bottom: 1px solid var(--wb-line); }
.relation-section-title > span { color: var(--wb-muted); font-size: 11px; font-weight: 650; }
.relation-summary-list { min-width: 0; padding: 16px 20px 18px; display: grid; gap: 9px; }
.relation-summary-row { min-width: 0; padding: 14px; border: 1px solid var(--wb-line); border-radius: 11px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; background: #fbfbfc; }
.relation-summary-main { min-width: 0; display: grid; gap: 6px; }
.relation-summary-row-head { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.relation-summary-name { min-width: 0; overflow-wrap: anywhere; color: var(--wb-ink); font-size: 13px; line-height: 1.45; }
.relation-summary-label { flex: 0 0 auto; padding: 3px 6px; border-radius: 6px; color: var(--wb-primary); background: var(--wb-primary-soft); font-size: 9px; font-weight: 750; }
.relation-summary-detail { min-width: 0; flex: 1 1 140px; overflow-wrap: anywhere; color: var(--wb-muted); font-size: 10px; line-height: 1.55; }
.relation-reason-block { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 8px; }
.relation-reason-title { padding-top: 2px; color: var(--wb-muted); font-size: 10px; line-height: 1.55; }
.relation-reason-list { min-width: 0; display: grid; gap: 6px; }
.relation-reason-row { min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 7px; }
.relation-summary-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.relation-summary-actions .button { min-height: 29px; padding: 5px 9px; font-size: 9px; }
.relation-empty { padding: 30px 20px; color: var(--wb-muted); font-size: 12px; text-align: center; }
.relation-network-hint { margin: 0; padding: 0 20px 16px; color: var(--wb-muted); font-size: 9px; text-align: right; }

@media (max-width: 1320px) {
  .planning-owner-grid { grid-template-columns: repeat(2,minmax(220px,1fr)); }
  .planning-analysis-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .planning-analysis-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .auth-screen { padding: 28px 16px; }
  .auth-card { padding: 28px 20px; }
  .qr-frame { width: min(248px,100%); height: auto; aspect-ratio: 1; }
  .planning-section-heading { flex-direction: column; align-items: stretch; }
  .planning-owner-grid, .planning-analysis-facts { grid-template-columns: 1fr; }
  .planning-assignment-control { align-items: stretch; flex-direction: column; }
  .planning-assignment-control .button { width: 100%; }
  .detail-rapport-card { grid-template-columns: minmax(0,1fr) auto; }
  .relation-summary-row { align-items: flex-start; }
}

/* 2026-08-14 shell isolation and mini-program-aligned navigation. */
.app-shell { grid-template-columns: 232px minmax(0,1fr); }
.sidebar {
  padding: 20px 14px 18px;
  border-right: 1px solid var(--wb-line);
  color: var(--wb-ink);
  background: #fff;
  box-shadow: none;
}
.sidebar-brand { min-height: 58px; margin-bottom: 18px; padding: 0 10px 18px; border-bottom-color: var(--wb-line); }
.sidebar-brand strong { color: var(--wb-ink); font-size: 17px; }
.sidebar-brand > div:last-child span { color: var(--wb-muted); font-size: 10px; }
.sidebar .grid-symbol-light span { background: var(--wb-primary); }
.sidebar .grid-symbol-light span:nth-child(2),
.sidebar .grid-symbol-light span:nth-child(3) { background: #79aee8; }

.module-nav {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  grid-template-columns: none;
  flex-direction: column;
  gap: 20px;
  background: transparent;
}
.nav-group { min-width: 0; }
.nav-group-title { margin: 0 10px 7px; color: #8e8e93; font-size: 11px; font-weight: 700; line-height: 1.4; }
.nav-group-items { display: grid; gap: 3px; }
.module-nav .nav-item {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: #3a3a3c;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.module-nav .nav-item:hover { color: var(--wb-primary); background: #f5f8fc; }
.module-nav .nav-item.is-active { color: var(--wb-primary); background: var(--wb-primary-soft); font-weight: 600; }
.module-nav .nav-item:focus { outline: 0; }
.module-nav .nav-item:focus-visible { outline: 2px solid var(--wb-primary); outline-offset: 1px; }

/* The shared map stylesheet also contains its old page shell. These direct-child
   rules keep that shell from leaking into the unified workbench. */
.app-shell > .workspace { min-width: 0; padding: 0; }
.app-shell > .workspace:not(.workspace-spatial) > .workspace-header {
  position: relative;
  top: auto;
  min-height: 72px;
  margin: 0;
  padding: 14px clamp(20px,2.3vw,34px);
  border-radius: 0;
  align-items: center;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.app-shell > .workspace:not(.workspace-spatial) > .workspace-header h2 { margin: 0; font-size: clamp(20px,1.8vw,24px); font-weight: 600; }
.app-shell > .workspace > .toolbar {
  position: relative;
  top: auto;
  z-index: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: block;
  background: transparent;
  box-shadow: none;
}
.app-shell > .workspace > .toolbar:not(:empty) { padding: 16px clamp(20px,2.3vw,34px) 0; border: 0; }
.app-shell > .workspace > .toolbar > .toolbar-row { width: 100%; max-width: 1760px; margin: 0 auto; }
.app-shell > .workspace > .content { margin-top: 0; }
.app-shell > .workspace.workspace-spatial > .toolbar { display: none; }

.list-summary { min-height: 24px; margin: -5px 0 10px; display: flex; align-items: center; justify-content: flex-end; color: var(--wb-muted); font-size: 12px; }
.page-actions { margin: 0 0 14px; display: flex; justify-content: flex-end; }
.page-actions .action-strip { margin: 0; }

.planning-quality-overview { padding: 20px; }
.planning-quality-score { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.planning-quality-score > div { padding: 15px 17px; border-radius: 12px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3px 12px; background: var(--wb-primary-soft); }
.planning-quality-score span { color: var(--wb-muted); font-size: 12px; }
.planning-quality-score strong { grid-row: 1 / 3; grid-column: 2; color: var(--wb-primary); font-size: 28px; }
.planning-quality-score small { color: #52616b; font-size: 12px; }
.planning-quality-metrics { margin-top: 12px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.planning-quality-cell { min-width: 0; padding: 13px; border: 1px solid #e5e5ea; border-radius: 11px; display: grid; gap: 5px; background: #fafafa; }
.planning-quality-cell span { color: var(--wb-muted); font-size: 12px; }
.planning-quality-cell strong { color: var(--wb-ink); font-size: 12px; }
.planning-quality-cell small { color: #52616b; font-size: 12px; }
.planning-quality-foot { margin-top: 11px; display: flex; justify-content: space-between; gap: 12px; color: var(--wb-muted); font-size: 12px; }
.planning-quality-table { margin-top: 12px; padding: 0; overflow-x: auto; }
.planning-quality-table-head,
.planning-quality-table-row { min-width: 980px; display: grid; grid-template-columns: 150px 110px repeat(4,minmax(150px,1fr)); align-items: center; gap: 10px; }
.planning-quality-table-head { padding: 11px 16px; color: var(--wb-muted); background: #f5f5f7; font-size: 12px; font-weight: 600; }
.planning-quality-table-row { padding: 13px 16px; border-top: 1px solid #ececf0; }
.planning-quality-table-row > strong { color: var(--wb-ink); font-size: 12px; }
.planning-quality-table-row > span { min-width: 0; display: grid; gap: 4px; }
.planning-quality-table-row b { color: #304658; font-size: 12px; font-weight: 740; }
.planning-quality-table-row small { color: var(--wb-muted); font-size: 12px; }
.planning-audit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.planning-audit-card { min-width: 0; padding: 19px; }
.planning-audit-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.planning-audit-head h4 { margin: 0; color: var(--wb-ink); font-size: 15px; }
.planning-audit-head span { display: block; margin-top: 4px; color: var(--wb-muted); font-size: 12px; }
.planning-audit-head > strong { color: #b54708; font-size: 12px; }
.planning-audit-numbers { margin-top: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.planning-audit-numbers > div { padding: 12px 8px; border-radius: 10px; background: #f6f7f9; text-align: center; }
.planning-audit-numbers strong,
.planning-audit-numbers span { display: block; }
.planning-audit-numbers strong { color: var(--wb-ink); font-size: 21px; }
.planning-audit-numbers span { margin-top: 3px; color: var(--wb-muted); font-size: 12px; }
.planning-audit-categories { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.planning-audit-categories > span { padding: 5px 8px; border-radius: 999px; color: #52616b; background: #eef2f5; font-size: 12px; }
.planning-audit-categories b { color: #b54708; }
.planning-audit-flags { margin-top: 13px; border-top: 1px solid #ececf0; }
.planning-audit-flags article { padding: 12px 0; border-bottom: 1px solid #ececf0; }
.planning-audit-flags article:last-child { padding-bottom: 0; border-bottom: 0; }
.planning-audit-flags article > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.planning-audit-flags strong { color: var(--wb-ink); font-size: 12px; }
.planning-audit-flags article > div span { padding: 4px 7px; border-radius: 999px; color: #9b5c00; background: #fff3dc; font-size: 12px; }
.planning-audit-flags article > div span.anomaly { color: #b42318; background: #fff0ee; }
.planning-audit-flags small { display: block; margin-top: 5px; color: var(--wb-muted); font-size: 12px; }
.planning-audit-flags p { margin: 5px 0 0; color: #3f4b58; font-size: 12px; line-height: 1.5; }
.planning-audit-clear { padding: 30px 12px; color: #067647; font-size: 12px; text-align: center; }
.web-quality-ranking { display: grid; gap: 0; border: 1px solid var(--wb-line); border-radius: 10px; background: #fff; overflow: hidden; }
.web-quality-rank-row.panel { margin: 0; padding: 20px; border: 0; border-bottom: 1px solid var(--wb-line); border-radius: 0; }
.web-quality-rank-row:last-child { border-bottom: 0; }
.web-quality-rank-row .rank-name { font-size: 15px; font-weight: 600; }
.web-quality-rank-row .rank-number { font-size: 20px; font-weight: 600; }
.web-quality-rank-main { display: grid; grid-template-columns: 32px minmax(150px,1fr) minmax(300px,1.8fr); align-items: center; gap: 16px; }
.web-quality-rank-scores { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.web-quality-rank-scores > span { padding: 0 8px; border-left: 1px solid var(--wb-line); text-align: right; font-variant-numeric: tabular-nums; }
.web-quality-rank-scores strong,
.web-quality-rank-scores small { display: block; }
.web-quality-rank-scores strong { color: var(--wb-ink); font-size: 16px; }
.web-quality-rank-scores small { margin-top: 4px; color: var(--wb-muted); font-size: 12px; }
.web-quality-rank-rates { margin: 16px 0 0 48px; display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px 24px; }
.web-quality-rank-rates > span { min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; line-height: 1.6; }
.web-quality-rank-rates i { color: var(--wb-muted); font-size: 12px; font-style: normal; }
.web-quality-rank-rates b { color: #475467; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .app-shell > .workspace:not(.workspace-spatial) > .workspace-header { min-height: 68px; padding: 12px 16px; }
  .app-shell > .workspace > .toolbar:not(:empty) { padding: 10px 16px 0; }
  .planning-quality-metrics,
  .planning-audit-grid { grid-template-columns: 1fr 1fr; }
  .web-quality-rank-main { grid-template-columns: 42px minmax(0,1fr); }
  .web-quality-rank-scores { grid-column: 1 / -1; }
  .web-quality-rank-rates { margin-left: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Keep the legally required ICP notice in normal flow below every active surface. */
.site-compliance {
  min-height: 30px;
  padding: 7px 16px calc(7px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(216, 225, 233, .9);
  color: #667085;
  background: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.site-compliance a { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: inherit; text-decoration: none; white-space: nowrap; }
.site-compliance img { flex: 0 0 20px; width: 20px; height: 20px; }
.site-compliance a:hover,
.site-compliance a:focus-visible { color: #0b63ce; text-decoration: underline; text-underline-offset: 3px; }
/* 我的走访：沿用全局 Quiet Precision 蓝色操作体系。 */
.planning-console {
  --planning-accent: var(--wb-primary);
  --planning-accent-dark: var(--wb-primary);
  --planning-accent-soft: var(--wb-primary-soft);
  --planning-line: var(--wb-line);
  min-width: 0;
  color: var(--wb-ink);
}
.planning-subnav {
  margin: 0 0 16px;
  overflow-x: auto;
  display: flex;
  border-bottom: 1px solid var(--planning-line);
  scrollbar-width: thin;
}
.planning-subnav button {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--wb-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
.planning-subnav button.is-active { border-bottom-color: var(--planning-accent); color: var(--planning-accent-dark); }
.planning-subnav button:hover { color: var(--planning-accent-dark); background: var(--planning-accent-soft); }
.planning-subnav button:focus-visible,
.workload-period-switch button:focus-visible,
.workload-branch-toggle:focus-visible,
.workload-web-rules button:focus-visible,
.workload-web-history > button:focus-visible { outline: 2px solid var(--planning-accent); outline-offset: 2px; }
.planning-view-panel { min-width: 0; }
.planning-console .planning-section-heading { margin-top: 18px; margin-bottom: 9px; }
.planning-console .workload-web-heading { margin-top: 0; }
.planning-console .planning-section-heading h3 { color: var(--wb-ink); }
.planning-console .planning-section-heading > div > p { color: var(--wb-muted); font-size: 12px; }
.planning-heading-actions { min-width: 0; }
.workload-period-switch { padding: 3px; border: 1px solid var(--planning-line); border-radius: 8px; display: inline-flex; gap: 2px; background: var(--wb-canvas); }
.workload-period-switch button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 6px; color: var(--wb-muted); background: transparent; font-size: 12px; font-weight: 600; }
.workload-period-switch button.is-active { color: var(--planning-accent-dark); background: #fff; box-shadow: none; }

.mine-dashboard-back { margin: -7px 0 12px; display: flex; justify-content: flex-end; }
.mine-dashboard-back button,
.workload-mine-link { padding: 0; border: 0; color: var(--planning-accent-dark); background: transparent; font-size: 12px; font-weight: 700; }
.mine-dashboard-back button:hover,
.workload-mine-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.mine-dashboard-back button:focus-visible,
.workload-mine-link:focus-visible { outline: 2px solid var(--planning-accent); outline-offset: 3px; }
.mine-dashboard-hero,
.mine-distribution,
.mine-profile-card {
  border: 1px solid var(--planning-line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}
.mine-dashboard-hero { padding: 17px 19px 0; }
.mine-task-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mine-task-head > span { display: flex; align-items: baseline; gap: 8px; }
.mine-task-head strong { color: var(--wb-ink); font-size: 13px; }
.mine-task-head small { color: var(--wb-muted); font-size: 12px; }
.mine-task-head > b { color: var(--planning-accent-dark); font-size: 18px; }
.mine-task-number { margin: 10px 0 9px; display: flex; align-items: baseline; gap: 7px; }
.mine-task-number strong { color: var(--wb-ink); font-size: 30px; line-height: 1; }
.mine-task-number span,
.mine-task-note,
.mine-revisit { color: var(--wb-muted); font-size: 12px; }
.mine-task-note { margin: 9px 0 0; }
.mine-kpis { margin: 16px -19px 0; border-bottom: 0; }
.mine-revisit { margin: 0 -19px; padding: 9px 12px; border-top: 1px solid var(--planning-line); }
.mine-section-heading { margin-top: 18px !important; }
.mine-distribution-row { min-height: 58px; padding: 9px 14px; border-top: 1px solid var(--planning-line); display: grid; grid-template-columns: minmax(180px,.8fr) minmax(180px,1.2fr) 58px; align-items: center; gap: 14px; }
.mine-distribution-row:first-child { border-top: 0; }
.mine-distribution-row > div { min-width: 0; display: grid; gap: 3px; }
.mine-distribution-row strong { overflow: hidden; color: var(--wb-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mine-distribution-row small { color: var(--wb-muted); font-size: 12px; }
.mine-distribution-row > i { height: 6px; overflow: hidden; border-radius: 4px; background: var(--wb-line); }
.mine-distribution-row > i b { display: block; height: 100%; border-radius: inherit; background: var(--planning-accent); }
.mine-distribution-row > span { color: var(--wb-muted); font-size: 12px; text-align: right; }
.mine-profile-card { margin-bottom: 12px; }
.mine-period-empty { padding: 48px 20px; margin-top: 20px; border: 1px solid var(--wb-line); border-radius: 10px; background: #fff; text-align: center; }
.mine-period-empty strong { color: #475467; font-size: 15px; font-weight: 500; }
.mine-period-empty p { margin: 10px 0 0; color: var(--wb-muted); font-size: 13px; line-height: 1.6; }
.mine-profile-card > header { min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--planning-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mine-profile-card > header strong { color: var(--wb-ink); font-size: 13px; }
.mine-profile-card > header span { color: var(--wb-muted); font-size: 12px; }
.mine-profile-card .mine-distribution { border: 0; border-radius: 0; }
.mine-insight-note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--planning-line); color: var(--wb-muted); font-size: 12px; }
.mine-business-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--planning-line); }
.mine-business-grid > span { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--planning-line); }
.mine-business-grid > span:last-child { border-right: 0; }
.mine-business-grid b,
.mine-business-grid small { display: block; }
.mine-business-grid b { color: var(--wb-ink); font-size: 18px; }
.mine-business-grid small { margin-top: 3px; color: var(--wb-muted); font-size: 12px; }
.mine-tags { padding: 10px 14px 2px; display: flex; flex-wrap: wrap; gap: 7px; }
.mine-tags:last-child { padding-bottom: 12px; }
.mine-tags span { padding: 5px 8px; border-radius: 6px; color: var(--planning-accent-dark); background: var(--planning-accent-soft); font-size: 12px; }
.mine-tags b { font-weight: 600; }

.workload-web-overall {
  margin-bottom: 14px;
  padding: 17px 19px;
  border: 1px solid var(--planning-line);
  border-radius: 9px;
  display: grid;
  grid-template-columns: minmax(280px,1fr) minmax(420px,1.25fr);
  align-items: center;
  gap: 24px;
  background: #fff;
  box-shadow: none;
}
.workload-web-overall > div:first-child { min-width: 0; display: grid; gap: 8px; }
.workload-web-overall > div:first-child > span { color: var(--wb-muted); font-size: 12px; }
.workload-web-overall > div:first-child > i,
.workload-web-track { height: 6px; overflow: hidden; border-radius: 4px; background: var(--wb-line); }
.workload-web-overall > div:first-child > i b,
.workload-web-track b { display: block; height: 100%; border-radius: inherit; background: var(--planning-accent); }
.workload-summary-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--planning-line); border-radius: 7px; overflow: hidden; }
.workload-summary-values > span { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--planning-line); display: grid; gap: 2px; }
.workload-summary-values > span:last-child { border-right: 0; }
.workload-summary-values small { color: var(--wb-muted); font-size: 12px; }
.workload-summary-values strong { color: var(--wb-ink); font-size: 18px; }
.workload-web-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-block: 1px solid var(--planning-line); }
.workload-web-kpis span { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--planning-line); }
.workload-web-kpis span:last-child { border-right: 0; }
.workload-web-kpis b,
.workload-web-kpis small { display: block; }
.workload-web-kpis b { color: var(--wb-ink); font-size: 18px; }
.workload-web-kpis small { margin-top: 3px; color: var(--wb-muted); font-size: 12px; }

.workload-web-grid { border: 1px solid var(--planning-line); border-radius: 9px; overflow: hidden; background: #fff; }
.workload-web-person { min-width: 0; padding: 16px 18px; background: #fff; box-shadow: none; }
.workload-web-person header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workload-web-person header > div { min-width: 0; display: grid; gap: 3px; }
.workload-web-person header strong { color: var(--wb-ink); font-size: 14px; }
.workload-web-person header span { overflow: hidden; color: var(--wb-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workload-web-person header > b { color: var(--planning-accent-dark); font-size: 18px; }
.workload-web-core { margin: 14px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.workload-web-core > strong { color: var(--wb-ink); font-size: 22px; }
.workload-web-core small,
.workload-web-core > span { color: var(--wb-muted); font-size: 12px; }
.workload-web-track { display: block; }
.workload-web-carry { margin: 7px 0 0; color: #8a5a14; font-size: 12px; }
.workload-web-facts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--planning-line); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.workload-web-facts > span { min-width: 0; padding-right: 8px; border-right: 1px solid var(--planning-line); }
.workload-web-facts > span:last-child { border-right: 0; }
.workload-web-facts b,
.workload-web-facts small { display: block; }
.workload-web-facts b { color: var(--wb-ink); font-size: 14px; }
.workload-web-facts small { margin-top: 2px; color: var(--wb-muted); font-size: 12px; }

.workload-web-subheading { margin-top: 18px; }
.workload-web-branches { min-width: 0; border: 1px solid var(--planning-line); border-radius: 9px; overflow: hidden; background: #fff; }
.workload-ledger-head,
.workload-ledger-row,
.workload-ledger-member {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px,1.35fr) 120px 76px 80px 66px 66px 82px 68px;
  align-items: center;
  gap: 10px;
}
.workload-ledger-head { min-height: 36px; padding: 0 15px; color: var(--wb-muted); background: var(--wb-canvas); font-size: 12px; font-weight: 700; }
.workload-web-branch { min-width: 0; border-top: 1px solid var(--planning-line); box-shadow: none; }
.workload-web-branch:first-of-type { border-top: 0; }
.workload-ledger-row { min-height: 58px; padding: 10px 15px; }
.workload-ledger-identity { min-width: 0; display: grid; gap: 3px; }
.workload-ledger-identity strong { overflow: hidden; color: var(--wb-ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.workload-ledger-identity span { overflow: hidden; color: var(--wb-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workload-web-branch.is-manager-team .workload-ledger-identity strong { color: var(--wb-ink); }
.workload-ledger-value { color: var(--wb-ink); font-size: 14px; white-space: nowrap; }
.workload-ledger-rate { color: var(--wb-muted); font-size: 14px; }
.workload-ledger-metric { color: #3a3a3c; font-size: 13px; }
.workload-ledger-metric::before { content: ""; }
.workload-branch-toggle { min-height: 34px; padding: 0 10px; border: 1px solid #c8daf3; border-radius: 7px; color: var(--planning-accent-dark); background: #fff; font-size: 12px; font-weight: 700; }
.workload-branch-toggle:hover { background: var(--planning-accent-soft); }
.workload-web-branch-people { border-top: 1px solid var(--planning-line); background: #f7f8fa; }
.workload-ledger-member { min-height: 54px; margin-left: 20px; padding: 9px 15px; border-bottom: 1px solid #ececf0; }
.workload-ledger-member:last-child { border-bottom: 0; }
.workload-ledger-member .workload-ledger-identity strong { font-size: 13px; }

.workload-task-section { margin-top: 18px; }
.workload-task-ledger,
.workload-web-rules,
.workload-web-history,
.workload-web-physical,
.planning-slice-toolbar {
  border: 1px solid var(--planning-line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}
.workload-task-head,
.workload-task-row { display: grid; grid-template-columns: minmax(190px,1.4fr) 150px 150px 140px 76px; align-items: center; gap: 12px; }
.workload-task-head { min-height: 36px; padding: 0 15px; color: var(--wb-muted); background: var(--wb-canvas); font-size: 12px; font-weight: 700; }
.workload-task-row { min-height: 72px; padding: 11px 15px; border-top: 1px solid var(--planning-line); }
.workload-task-standard,
.workload-task-completed { min-width: 0; display: grid; gap: 2px; }
.workload-task-standard small,
.workload-task-completed small { color: var(--wb-muted); font-size: 12px; }
.workload-task-standard > small, .workload-task-completed > small { display: none; }
.workload-task-standard strong,
.workload-task-completed strong { color: var(--wb-ink); font-size: 16px; }
.workload-task-standard span,
.workload-task-completed span { color: var(--wb-muted); font-size: 12px; }
.workload-task-standard span.is-adjusted { color: #8a5a14; }
.workload-task-row .button { min-height: 36px; padding: 0 12px; border-color: #c8daf3; color: var(--planning-accent-dark); font-size: 14px; }
.workload-web-history { margin-top: 18px; }
.workload-web-history > button { width: 100%; min-height: 46px; padding: 0 15px; border: 0; display: flex; align-items: center; justify-content: space-between; color: var(--wb-ink); background: #fff; font-size: 13px; font-weight: 600; }
.workload-web-history > button:hover { background: var(--planning-accent-soft); }
.workload-web-history > button b { color: var(--planning-accent-dark); font-size: 12px; }
.workload-web-history > div { padding: 10px 15px; border-top: 1px solid var(--planning-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workload-web-history > div > span { display: grid; gap: 3px; }
.workload-web-history strong { color: var(--wb-ink); font-size: 12px; }
.workload-web-history small,
.workload-web-history p { color: var(--wb-muted); font-size: 12px; }
.workload-web-history p { margin: 0; padding: 18px 15px; border-top: 1px solid var(--planning-line); }

.workload-rule-head,
.workload-web-rules button { display: grid; grid-template-columns: minmax(180px,1fr) 100px minmax(220px,.8fr) 70px; align-items: center; gap: 12px; }
.workload-rule-head { min-height: 36px; padding: 0 15px; color: var(--wb-muted); background: var(--wb-canvas); font-size: 12px; font-weight: 700; }
.workload-web-rules button { width: 100%; min-height: 52px; padding: 9px 15px; border: 0; border-top: 1px solid var(--planning-line); color: inherit; background: #fff; text-align: left; }
.workload-web-rules button:hover { background: var(--planning-accent-soft); }
.workload-web-rules strong { color: var(--wb-ink); font-size: 13px; }
.workload-web-rules small { color: var(--wb-muted); font-size: 12px; }
.workload-web-rules button > b { color: var(--wb-ink); font-size: 13px; line-height: 1.35; text-align: right; }
.workload-web-rules button > span { color: var(--planning-accent-dark); font-size: 12px; font-weight: 700; }

.planning-slice-toolbar { margin-bottom: 12px; padding: 12px 15px; overflow: visible; display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.planning-slice-toolbar label { min-width: 220px; display: grid; gap: 5px; color: var(--wb-muted); font-size: 12px; }
.planning-slice-toolbar select { min-height: 40px; }
.planning-slice-toolbar .button { min-height: 44px; }
.planning-slice-toolbar.is-cleared { align-items: center; }
.planning-toolbar-status { margin-right: auto; color: var(--wb-muted); font-size: 12px; font-weight: 700; }
.workload-web-physical { margin-bottom: 12px; padding: 15px 18px; display: flex; align-items: center; gap: 32px; }
.workload-web-physical > div { min-width: 150px; display: grid; gap: 4px; }
.workload-web-physical span { color: var(--wb-muted); font-size: 12px; }
.workload-web-physical strong { color: var(--wb-ink); font-size: 18px; }
.planning-console .planning-assignment-control,
.planning-console .planning-area-panel,
.planning-console .planning-exchange-panel,
.planning-console .planning-quality-overview,
.planning-console .planning-quality-table,
.planning-console .planning-audit-card { border-color: var(--planning-line); border-radius: 9px; box-shadow: none; }
.planning-console .planning-quality-overview,
.planning-console .planning-audit-card { padding: 0; overflow: hidden; }
.planning-console .planning-quality-score { gap: 0; border-bottom: 1px solid var(--planning-line); }
.planning-console .planning-quality-score > div {
  padding: 14px 16px;
  border-right: 1px solid var(--planning-line);
  border-radius: 0;
  background: #fff;
}
.planning-console .planning-quality-score > div:last-child { border-right: 0; }
.planning-console .planning-quality-score span,
.planning-console .planning-quality-score small { font-size: 12px; }
.planning-console .planning-quality-metrics {
  margin-top: 0;
  gap: 0;
  border-bottom: 1px solid var(--planning-line);
}
.planning-console .planning-quality-cell {
  padding: 12px 14px;
  border-width: 0 1px 1px 0;
  border-color: var(--planning-line);
  border-radius: 0;
  background: #fff;
}
.planning-console .planning-quality-cell span,
.planning-console .planning-quality-cell small { font-size: 12px; }
.planning-console .planning-quality-cell strong { font-size: 12px; }
.planning-console .planning-quality-foot { margin: 0; padding: 10px 14px; font-size: 12px; }
.planning-console .planning-quality-table-head { color: var(--wb-muted); background: var(--wb-canvas); font-size: 12px; }
.planning-console .planning-quality-table-row b { font-size: 12px; }
.planning-console .planning-quality-table-row small { font-size: 12px; }
.planning-console .planning-quality-score strong,
.planning-console .planning-quality-cell strong { color: var(--planning-accent-dark); }
.planning-console .planning-audit-grid { gap: 10px; }
.planning-console .planning-audit-head { padding: 14px 16px; border-bottom: 1px solid var(--planning-line); }
.planning-console .planning-audit-head span { font-size: 12px; }
.planning-console .planning-audit-numbers {
  margin-top: 0;
  gap: 0;
  border-bottom: 1px solid var(--planning-line);
}
.planning-console .planning-audit-numbers > div {
  padding: 12px 8px;
  border-right: 1px solid var(--planning-line);
  border-radius: 0;
  background: #fff;
}
.planning-console .planning-audit-numbers > div:last-child { border-right: 0; }
.planning-console .planning-audit-numbers span { font-size: 12px; }
.planning-console .planning-audit-categories { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--planning-line); }
.planning-console .planning-audit-categories > span { border-radius: 6px; font-size: 12px; }
.planning-console .planning-audit-flags { margin: 0; padding: 0 16px; border-top: 0; }
.planning-console .planning-audit-flags strong { font-size: 12px; }
.planning-console .planning-audit-flags small,
.planning-console .planning-audit-flags article > div span { font-size: 12px; }
.planning-console .planning-audit-flags p { font-size: 12px; }

@media (max-width: 1100px) {
  .workload-web-overall { grid-template-columns: 1fr; }
  .workload-ledger-head { display: none; }
  .workload-task-head { display: none; }
  .workload-task-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .workload-task-row > .workload-ledger-identity { grid-column: 1 / -1; }
  .workload-task-row .button { width: 100%; }
  .workload-task-standard > small, .workload-task-completed > small { display: block; }
  .workload-ledger-row,
  .workload-ledger-member { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px 10px; }
  .workload-ledger-identity { grid-column: 1 / -1; }
  .workload-ledger-value { grid-column: 1 / 3; }
  .workload-ledger-rate { grid-column: 3; }
  .workload-branch-toggle,
  .workload-ledger-spacer,
  .workload-mine-link { grid-column: 4; grid-row: 2; }
  .workload-ledger-metric { padding-top: 7px; border-top: 1px solid var(--planning-line); }
  .workload-ledger-metric::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--wb-muted); font-size: 12px; }
}

@media (max-width: 900px) {
  .planning-console .planning-quality-metrics,
  .planning-console .planning-audit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .planning-subnav { margin-inline: -4px; }
  .planning-subnav button { min-width: 64px; min-height: 44px; padding-inline: 13px; }
  .planning-console .planning-section-heading { align-items: stretch; }
  .planning-heading-actions { width: 100%; }
  .workload-period-switch { width: 100%; }
  .workload-period-switch button { min-height: 40px; flex: 1 1 0; }
  .workload-web-overall { padding: 14px; gap: 15px; }
  .workload-summary-values > span { padding: 8px 7px; }
  .workload-summary-values strong { font-size: 16px; }
  .workload-web-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .workload-web-kpis span { padding: 9px 5px; }
  .workload-web-kpis b { overflow-wrap: anywhere; font-size: 15px; }
  .workload-web-kpis small { font-size: 12px; line-height: 1.25; }
  .workload-web-person { padding: 14px; }
  .mine-dashboard-hero { padding: 14px 14px 0; }
  .mine-kpis { margin-inline: -14px; }
  .mine-revisit { margin-inline: -14px; }
  .mine-distribution-row { grid-template-columns: minmax(0,1fr) 58px; gap: 7px 12px; }
  .mine-distribution-row > i { grid-column: 1; }
  .mine-distribution-row > span { grid-column: 2; grid-row: 2; }
  .mine-business-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mine-business-grid > span:nth-child(2) { border-right: 0; }
  .mine-business-grid > span:nth-child(-n+2) { border-bottom: 1px solid var(--planning-line); }
  .workload-web-core { align-items: flex-start; flex-direction: column; }
  .workload-web-facts > span { padding-right: 5px; }
  .workload-web-facts b { font-size: 13px; }
  .workload-web-facts small { font-size: 12px; }
  .workload-ledger-row,
  .workload-ledger-member { padding: 11px 12px; }
  .workload-ledger-member { margin-left: 8px; }
  .workload-task-row { padding: 12px; }
  .workload-task-row .button { min-height: 44px; }
  .workload-rule-head { display: none; }
  .workload-web-rules button { min-height: 56px; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; }
  .workload-web-rules button > strong,
  .workload-web-rules button > small { grid-column: 1; }
  .workload-web-rules button > b,
  .workload-web-rules button > span { grid-column: 2; }
  .workload-web-rules button > b { grid-row: 1; }
  .workload-web-rules button > span { grid-row: 2; }
  .planning-slice-toolbar { align-items: stretch; flex-direction: column; }
  .planning-slice-toolbar label,
  .planning-slice-toolbar .button { width: 100%; min-width: 0; }
  .planning-slice-toolbar .button { min-height: 44px; }
  .workload-web-physical { align-items: stretch; flex-direction: column; gap: 10px; }
  .planning-console .planning-quality-score,
  .planning-console .planning-quality-metrics,
  .planning-console .planning-audit-grid { grid-template-columns: 1fr; }
}

/* Mobile navigation keeps the module selector and page destinations on one row. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-module-picker { display: block; min-width: 0; }
.mobile-module-picker select { width: 100%; min-height: 44px; padding: 0 8px; border: 1px solid var(--wb-line); border-radius: 8px; color: var(--wb-ink); background: #fff; font-size: 14px; }
@media (max-width: 900px) {
  .app-shell > .workspace:not(.workspace-spatial) > .mobile-module-wrap { float: left; width: 140px; padding: 8px 0 8px 14px; }
  .app-shell > .workspace:not(.workspace-spatial) > .mobile-nav-wrap { padding: 8px 14px 8px 8px; }
  .app-shell > .workspace:not(.workspace-spatial) > .toolbar,
  .app-shell > .workspace:not(.workspace-spatial) > .content { clear: both; }
  .mobile-module-nav { min-width: 0; }
  .workspace-spatial .mobile-module-picker { width: 150px; }
  .toolbar input, .toolbar select { font-size: 16px; }
  .toolbar input[type="date"] { padding-inline: 6px; }
  .summary-ledger .metric-card { padding: 10px 8px; }
  .mine-dashboard-heading { flex-direction: row; align-items: center; gap: 12px; }
  .mine-dashboard-heading .planning-heading-actions { width: auto; }
  .mine-dashboard-heading .workload-period-switch { width: auto; }
  .mine-dashboard-heading .workload-period-switch button { min-height: 44px; }
}
/* Reliability and accessibility guards for the unified shell. */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #0b63ce;
  outline-offset: 2px;
}
.boot-screen .button { justify-self: center; }
.boot-screen, .auth-screen, .app-shell { min-height: 100dvh; }
.sidebar { height: 100dvh; }
.detail-panel { height: 100vh; height: 100dvh; }
.form-dialog { max-height: 90vh; max-height: 90dvh; }
.workspace-spatial { position: relative; }
.workspace-spatial #notice-region {
  position: absolute;
  z-index: 135;
  top: 88px;
  left: 50%;
  width: min(620px, calc(100% - 32px));
  display: block;
  transform: translateX(-50%);
  pointer-events: none;
}
.workspace-spatial #notice-region .notice {
  margin: 0;
  border: 1px solid currentColor;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .14);
  pointer-events: auto;
}

@media (max-width: 900px) {
  .app-shell > .workspace > .mobile-module-wrap,
  .app-shell > .workspace > .mobile-nav-wrap { margin: 0; }
  .app-shell.app-shell-spatial {
    height: calc(100dvh - 31px - env(safe-area-inset-bottom));
    min-height: 0;
    overflow: hidden;
  }
  .app-shell > .workspace.workspace-spatial {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }
  .app-shell > .workspace.workspace-spatial > .mobile-module-wrap,
  .app-shell > .workspace.workspace-spatial > .mobile-nav-wrap { display: block; }
  .workspace-spatial .content {
    height: auto;
    min-height: 0;
    grid-area: 4 / 1;
  }
  .workspace-spatial #notice-region {
    position: relative;
    top: 8px;
    left: auto;
    height: 0;
    grid-area: 4 / 1;
    align-self: start;
    justify-self: center;
    transform: none;
  }
  .workspace-spatial .workspace-loading {
    position: relative;
    inset: auto;
    width: 100%;
    grid-area: 4 / 1;
    align-self: start;
  }
}

@media (max-width: 560px) {
  .refresh-button { width: 36px; display: inline-flex; align-items: center; justify-content: center; }
}

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

/* Profile: a continuous visit journal beside a compact reference column. */
#detail-layer[data-detail-kind="profile"] { grid-template-columns: 1fr min(960px,calc(100vw - 48px)); }
#detail-layer[data-detail-kind="profile"] .detail-panel { width: 100%; background: #fff; }
#detail-layer[data-detail-kind="profile"] .detail-header { min-height: 76px; padding: 16px 28px 12px; background: #fff; border-bottom: 0; }
#detail-layer[data-detail-kind="profile"] .detail-header h3 { margin-top: 4px; color: #182b40; font-size: 23px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
#detail-layer[data-detail-kind="profile"] .detail-eyebrow { color: var(--wb-muted); font-size: 12px; font-weight: 400; }
#detail-layer[data-detail-kind="profile"] .detail-content { max-width: none; padding: 0; overflow: visible; }
.visit-profile-detail { min-width: 0; color: var(--wb-ink); font-size: 14px; }
.profile-overview { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 28px 22px; border-bottom: 1px solid var(--wb-line); }
.profile-overview-identity { min-width: 0; }
.profile-location { margin: 0; color: #526172; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.profile-identity-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 8px; color: var(--wb-muted); font-size: 12px; line-height: 1.6; }
.profile-identity-line:empty { display: none; }
.profile-identity-line > span + span { border-left: 1px solid #dce3ec; padding-left: 12px; }
.profile-identity-line .profile-rapport { color: #246f65; }
.profile-overview > .action-strip { flex-shrink: 0; margin: 0; }
.profile-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: start; }
.profile-detail-main { min-width: 0; padding: 26px 28px 36px; }
.profile-detail-support { min-width: 0; padding: 6px 22px 26px; border-left: 1px solid var(--wb-line); background: #f8fafc; }
.profile-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 6px; }
.profile-history-heading h4 { margin: 0; color: #182b40; font-size: 16px; font-weight: 600; }
.profile-history-heading > span { color: var(--wb-muted); font-size: 12px; }
.visit-profile-detail .detail-section { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--wb-line); border-radius: 0; background: transparent; box-shadow: none; }
.visit-profile-detail .detail-section h4 { margin: 0 0 12px; color: #344054; font-size: 13px; font-weight: 600; }
.visit-profile-detail .detail-section-title h4 { margin: 0; }
.visit-profile-detail .detail-section-title span { color: var(--wb-muted); font-size: 12px; }
.visit-profile-detail .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; }
.visit-profile-detail .detail-fact strong { color: #344054; font-size: 13px; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
.visit-profile-detail .detail-fact span { color: var(--wb-muted); font-size: 12px; line-height: 1.6; }
.visit-profile-detail .detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.visit-profile-detail .detail-tags > span { padding: 3px 7px; border-radius: 4px; background: #edf1f6; color: #526172; font-size: 12px; line-height: 1.5; }
.visit-profile-detail .detail-note { margin: 0; color: #526172; font-size: 13px; line-height: 1.7; }
.profile-detail-support .detail-grid { grid-template-columns: minmax(0,1fr); gap: 8px; }
.profile-detail-support .detail-fact { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: baseline; gap: 8px; }
.profile-detail-support #visit-detail-enterprise .detail-section:first-of-type > h4 { display: none; }
.profile-related-section { padding: 18px 0; border-bottom: 1px solid var(--wb-line); }
.profile-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.profile-section-heading h4 { margin: 0; font-size: 13px; font-weight: 600; color: #344054; }
.profile-section-heading > .action-strip { margin: 0; }
.profile-pipeline-list > button { width: 100%; text-align: left; color: var(--wb-primary); cursor: pointer; }
.profile-section-status { margin: 10px 0 0; color: var(--wb-muted); font-size: 12px; line-height: 1.7; }
.profile-related-section > .detail-section { padding-bottom: 0; border-bottom: 0; }
.profile-related-section > .detail-section:first-child { padding-top: 0; }
.visit-profile-detail .relation-section { padding: 0; }
.visit-profile-detail .relation-section-title { display: flex; flex-wrap: wrap; margin: 0; padding: 0; gap: 6px; border: 0; }
.visit-profile-detail .relation-empty { margin: 0; padding: 12px 0 0; text-align: left; color: var(--wb-muted); background: transparent; font-size: 12px; }
.visit-profile-detail .relation-summary-list { padding: 8px 0 0; gap: 0; }
.visit-profile-detail .relation-summary-row { display: grid; gap: 8px; padding: 14px 0; border: 0; border-radius: 0; background: transparent; }
.visit-profile-detail .relation-summary-row + .relation-summary-row { border-top: 1px solid var(--wb-line); }
.visit-profile-detail .relation-summary-name { font-size: 14px; }
.visit-profile-detail .relation-summary-label, .visit-profile-detail .relation-summary-detail, .visit-profile-detail .relation-reason-title { font-size: 12px; }
.visit-profile-detail .action-strip { gap: 6px 12px; }
.profile-detail-support .button, .profile-record-management .button { min-height: 32px; padding: 3px 0; border: 0; border-radius: 3px; color: var(--wb-primary); background: transparent; box-shadow: none; font-size: 12px; font-weight: 500; }
.profile-detail-support .button:hover, .profile-record-management .button:hover { text-decoration: underline; }
.profile-record-management .button.danger, .profile-detail-support .button.danger { color: #778496; }
.profile-record-management .button.danger:hover, .profile-detail-support .button.danger:hover { color: #a44c55; }
.profile-maintenance { padding-top: 14px; }
.profile-maintenance .action-strip { margin: 0; }
.visit-profile-detail .profile-visit-row { position: relative; margin: 0 0 0 4px; padding: 20px 0 24px 20px; border: 0; border-left: 1px solid #e1e7ef; border-radius: 0; background: transparent; }
.profile-visit-row::before { content: ""; position: absolute; top: 26px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: #c3cfdd; box-shadow: 0 0 0 4px #fff; }
.profile-visit-row:first-of-type::before { background: #4d81c3; }
.profile-visit-row:last-child { padding-bottom: 0; }
.profile-visit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--wb-muted); font-size: 12px; }
.profile-visit-meta time { color: #344054; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.profile-date { padding: 0; border: 0; border-radius: 3px; background: transparent; text-align: left; }
.profile-date:hover time { color: var(--wb-primary); }
.profile-visit-meta small { font-size: 12px; }
.profile-latest { color: #4874a8; }
.profile-visit-outcome { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: #526172; font-size: 12px; }
.profile-visit-outcome:empty { display: none; }
.profile-memo-empty { color: var(--wb-muted); }
.profile-visit-memo { margin-top: 10px; }
.profile-visit-memo p { margin: 0; color: #243548; font-size: 15px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.visit-profile-detail .profile-text-button { display: inline-flex; width: auto; min-height: 36px; align-items: center; margin: 8px 0 0; padding: 4px 0; border: 0; border-radius: 4px; color: var(--wb-primary); background: transparent; font-size: 12px; line-height: 1.5; text-align: left; cursor: pointer; }
.profile-visit-next { display: flex; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 4px; color: #344054; background: #f3f6fa; font-size: 13px; line-height: 1.7; }
.profile-visit-next > span { flex: 0 0 auto; color: var(--wb-muted); }
.profile-visit-next p { margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-visit-facts { margin-top: 14px; }
.visit-profile-detail .visit-current { display: block; padding: 0; border: 0; }
.visit-profile-detail .visit-current-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; padding: 0; }
.visit-current-grid .detail-fact { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 8px; }
.profile-visit-facts > .detail-section:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-visit-facts .detail-grid .detail-fact { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: baseline; gap: 8px; }
.profile-record-management { padding: 8px 0 0; }
.profile-record-management > small { display: none; }
.profile-record-management .action-strip { margin: 0; }
.visit-profile-detail .photo-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,150px),1fr)); gap: 10px; }
.visit-profile-detail .detail-photo-button { height: 158px; border-radius: 6px; }
.visit-profile-detail .empty-state { padding: 30px 0; text-align: left; background: transparent; }
@media (max-width: 900px) {
  #detail-layer[data-detail-kind="profile"] { grid-template-columns: 1fr; }
  #detail-layer[data-detail-kind="profile"] .detail-panel { grid-column: 1; }
}
@media (max-width: 720px) {
  #detail-layer[data-detail-kind="profile"] .detail-header { min-height: 72px; padding: 14px 18px 10px; gap: 12px; }
  #detail-layer[data-detail-kind="profile"] .detail-header h3 { font-size: 20px; }
  .profile-overview { padding: 0 18px 18px; gap: 12px; }
  .profile-overview .button { padding-inline: 10px; }
  .profile-detail-layout { grid-template-columns: minmax(0,1fr); }
  .profile-detail-main { padding: 22px 18px 28px; }
  .profile-detail-support { padding: 2px 18px 24px; border-left: 0; border-top: 1px solid var(--wb-line); }
  .profile-detail-support .detail-fact { grid-template-columns: 92px minmax(0,1fr); }
  .profile-detail-support .button, .profile-record-management .button, .visit-profile-detail .profile-text-button { min-height: 44px; }
  .visit-profile-detail .visit-current-grid { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .profile-visit-facts .detail-grid { grid-template-columns: minmax(0,1fr); }
  .profile-visit-next { display: block; }
  .profile-visit-next > span { display: block; margin-bottom: 4px; }
}

/* Workbench map theme. Coordinates, business layer semantics and gestures live in the renderer. */
.workspace-spatial .spatial-desktop {
  /* The shared layer palette already balances saturation and text contrast. */
  --map-category-weight: 100%;
  background: #f3f6fa;
}
.app-shell.app-shell-spatial { height: calc(100dvh - 32px - env(safe-area-inset-bottom)); min-height: 0; grid-template-rows: minmax(0,1fr); }
.app-shell > .workspace.workspace-spatial { height: 100%; min-height: 0; }
.app-shell-spatial > .sidebar { height: 100%; }
.workspace-spatial .content { min-height: 0; height: calc(100dvh - 114px - env(safe-area-inset-bottom)); }
.workspace-spatial .spatial-commandbar { display: flex; flex-wrap: wrap; align-items: center; min-height: 68px; padding: 12px 20px; gap: 10px 14px; border-color: #e1e7ef; background: #fff; box-shadow: none; }
.workspace-spatial .spatial-title-block { flex-shrink: 0; gap: 0; }
.workspace-spatial .spatial-title-block > strong { display: none; }
.workspace-spatial .spatial-search-wrap { flex: 1 1 180px; min-width: 160px; }
.workspace-spatial .spatial-search-wrap input { height: 40px; border-color: #dce3ed; border-radius: 7px; color: #24384c; background: #f8fafc; }
.workspace-spatial .spatial-search-wrap input:focus { border-color: #7aa3d7; box-shadow: 0 0 0 3px #eaf1fb; }
.workspace-spatial .spatial-search-wrap::before { color: #74859b; }
.workspace-spatial .spatial-phase-tabs, .workspace-spatial .spatial-layer-tabs { height: auto; min-height: 40px; margin: 0; padding: 3px; box-sizing: border-box; border: 1px solid #e1e7ef; border-radius: 7px; background: #f3f6fa; }
.workspace-spatial .spatial-phase-tabs button, .workspace-spatial .spatial-layer-tabs button { min-width: 48px; min-height: 32px; padding: 0 12px; border-radius: 4px; color: #68788c; font-size: 13px; font-weight: 500; }
.workspace-spatial .spatial-phase-tabs button.is-active, .workspace-spatial .spatial-layer-tabs button.is-active { color: #245f9e; background: #fff; box-shadow: 0 1px 3px #1f36551a; font-weight: 600; }
.workspace-spatial .spatial-summary-inline { display: none; }
.workspace-spatial .spatial-assignment-toolbar { flex: 1 0 100%; min-height: 36px; justify-content: flex-start; }
.workspace-spatial .spatial-viewport { background: radial-gradient(#cfd8e4 .7px,transparent .7px) 0 0 / 24px 24px #f3f6fa; }
.workspace-spatial .spatial-world .market-scene { background: transparent; }
.workspace-spatial .spatial-world .market-site { border-color: #cad5e1; border-radius: 8px; background: #edf2f6; box-shadow: none; }
.workspace-spatial .spatial-world .market-road { border-color: #d5dee9; color: #78899e; background: #fff; }
.workspace-spatial .spatial-world .market-building, .workspace-spatial .spatial-world .building-return, .workspace-spatial .spatial-world .building-upper.storefront { border-color: #b7c7d6; background: #e9eef5; box-shadow: 0 1px 3px #24384c0d; }
.workspace-spatial .spatial-world .market-building.hall { border-color: #adc1dc; background: repeating-linear-gradient(90deg,transparent 0 79px,#ffffff33 79px 80px),#c8d7eb; }
.workspace-spatial .spatial-world .market-building.cold { border-color: #b4c6d8; background: repeating-linear-gradient(90deg,transparent 0 238px,#9eafc333 238px 241px),repeating-linear-gradient(180deg,#d7e1ec 0 44px,#dfe7f0 44px 88px); }
.workspace-spatial .spatial-world .market-building.office, .workspace-spatial .spatial-world .building-upper { border-color: #b8c7d7; background: #d8e2ed; }
.workspace-spatial .spatial-world .store-unit { border-color: #728ca333; }
.workspace-spatial .spatial-world .market-building.is-selected, .workspace-spatial .spatial-world .building-return.is-selected { border-color: #2c74bd; box-shadow: inset 0 0 0 5px #2c74bd33; }
.workspace-spatial .spatial-world .building-name { min-width: 32px; padding: 4px 7px; border-color: #cad5e180; border-radius: 4px; color: #253b52; background: #fffffff5; box-shadow: 0 1px 4px #20375212; }
.workspace-spatial .spatial-world .building-name span { font-size: 14px; font-weight: 600; }
.workspace-spatial .spatial-world .building-name small { color: #6b7f95; font-size: 12px; }
.workspace-spatial .spatial-world .building-name.hall-name { min-width: 100px; padding: 9px 12px; border-color: #adc1dc80; border-radius: 6px; background: #fffffff2; }
.workspace-spatial .spatial-legend { padding: 9px 12px; gap: 8px 14px; border-color: #dce4ee; border-radius: 6px; color: #52677d; background: #fffffff5; box-shadow: 0 2px 8px #20375208; font-size: 12px; }
.workspace-spatial .spatial-legend small { font-size: 12px; color: #78899e; }
.workspace-spatial .spatial-legend i { border-color: #71869c33; }
.workspace-spatial .spatial-layer-legend { max-width: calc(100% - 32px); }
.workspace-spatial .spatial-zoom-tools { gap: 0; overflow: hidden; border: 1px solid #d8e1ec; border-radius: 7px; box-shadow: 0 2px 8px #2037520a; }
.workspace-spatial .spatial-zoom-tools button { border: 0; border-radius: 0; color: #3e5976; box-shadow: none; background: #fff; }
.workspace-spatial .spatial-zoom-tools button + button { border-top: 1px solid #e5ebf2; }
.workspace-spatial .spatial-zoom-tools button:last-child { font-size: 12px; font-weight: 500; }
.workspace-spatial .spatial-inspector { border-color: #dce4ee; background: #f8fafc; }
.workspace-spatial .inspector-head div span, .workspace-spatial .inspector-merchant p, .workspace-spatial .inspector-preview > span, .workspace-spatial .inspector-business, .workspace-spatial .inspector-rapport span, .workspace-spatial .inspector-rapport strong, .workspace-spatial .inspector-rapport b, .workspace-spatial .inspector-rapport small { font-size: 12px; }
.workspace-spatial .inspector-merchant { border-color: #e0e7ef; border-radius: 7px; box-shadow: none; }
.workspace-spatial .inspector-rapport { border: 0; border-radius: 4px; background: #edf3f6; color: #316b67; }
.workspace-spatial .inspector-primary { min-height: 40px; border-radius: 6px; font-size: 13px; font-weight: 500; }
@media (max-width: 900px) {
  .workspace-spatial .content { height: auto; min-height: 0; }
  .workspace-spatial .spatial-commandbar { padding: 10px 14px; }
  .workspace-spatial .spatial-layer-tabs { order: 0; flex-basis: auto; width: auto; }
}
@media (max-width: 600px) {
  .workspace-spatial .spatial-commandbar { gap: 8px 10px; padding: 10px 12px; }
  .workspace-spatial .spatial-search-wrap { flex: 1 1 140px; min-width: 120px; }
  .workspace-spatial .spatial-search-wrap input { padding-left: 30px; font-size: 12px; }
  .workspace-spatial .spatial-search-wrap::before { left: 10px; }
  .workspace-spatial .spatial-phase-tabs button { min-width: 42px; padding: 0 8px; }
  .workspace-spatial .spatial-layer-tabs { flex: 1 0 100%; }
  .workspace-spatial .spatial-layer-tabs button { min-height: 34px; }
  .workspace-spatial .spatial-legend { left: 10px; top: 10px; max-width: calc(100% - 20px); padding: 8px 10px; gap: 6px 10px; }
}


/* Point management uses a bounded ledger, with no dependency on the map canvas. */
.spatial-admin-page { min-width: 0; }
.spatial-admin-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.spatial-admin-heading h3 { margin: 0; color: var(--wb-ink); font-size: 20px; font-weight: 600; }
.spatial-admin-heading p { margin: 7px 0 0; color: var(--wb-muted); font-size: 13px; line-height: 1.6; }
.spatial-history-panel { border: 1px solid var(--wb-line); border-radius: 10px; background: #fff; overflow: hidden; }
.spatial-history-panel > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; }
.spatial-history-panel > header > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.spatial-history-panel h4 { margin: 0; font-size: 15px; font-weight: 600; }
.spatial-history-panel > header span { color: var(--wb-muted); font-size: 12px; }
.spatial-history-head, .spatial-history-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.1fr) 120px 64px; gap: 20px; padding: 16px 20px; align-items: center; font-size: 14px; }
.spatial-history-head { padding-block: 12px; background: #f9fafc; color: var(--wb-muted); font-size: 12px; }
.spatial-history-row { border-top: 1px solid var(--wb-line); }
.spatial-history-row > div { display: grid; gap: 5px; min-width: 0; }
.spatial-history-row strong { font-weight: 500; overflow-wrap: anywhere; }
.spatial-history-row small { color: var(--wb-muted); font-size: 12px; line-height: 1.5; }
.spatial-history-version { color: var(--wb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.spatial-history-status { font-size: 12px; color: #475467; }
.spatial-history-empty { padding: 60px 20px; border-top: 1px solid var(--wb-line); text-align: center; }
.spatial-history-empty strong { color: #475467; font-size: 15px; font-weight: 500; }
.spatial-history-empty p { margin: 10px 0 0; color: var(--wb-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 680px) {
  .spatial-history-head { display: none; }
  .spatial-history-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px 16px; padding: 16px; }
  .spatial-history-row > div:nth-child(2), .spatial-history-status { text-align: right; }
  .spatial-history-panel > header { padding: 16px; }
}

/* Grid archive filters share the native client hierarchy and keep usable touch targets. */
.archive-state-tabs { display:flex; gap:24px; border-bottom:1px solid var(--wb-line); margin-bottom:16px; }
.archive-state-tabs button { min-height:44px; padding:8px 2px; border:0; border-bottom:2px solid transparent; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.archive-state-tabs button[aria-pressed="true"] { color:var(--wb-primary); border-bottom-color:currentColor; font-weight:600; }
.archive-state-tabs button:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.archive-filter-toolbar select, .archive-filter-toolbar input, .archive-filter-toolbar button { min-height:44px; }
.archive-filter-toolbar label { min-width:0; }

/* Deferred map styles must not truncate ordinary visit titles or clip panels. */
.workspace:not(.workspace-spatial) .record-title { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.workspace:not(.workspace-spatial) .content > .panel { overflow:visible; }

.tech-park-pending-notice { display:flex; align-items:center; gap:6px; width:100%; min-height:44px; margin:0 0 12px; padding:12px 16px; border:1px solid #F0C36A; border-radius:10px; background:#FFF7E6; color:#6E4309; font:600 15px/1.5 system-ui,sans-serif; text-align:left; cursor:pointer; }
.tech-park-pending-notice strong { color:#9A5900; font-size:19px; font-variant-numeric:tabular-nums; }
.tech-park-pending-notice span { margin-left:auto; }
.tech-park-pending-notice:focus-visible { outline:2px solid #0B63CE; outline-offset:2px; }

/* Home notifications and recent work share one compact reading surface. */
#view-title:focus{outline:none;}
.workbench-home{width:100%;min-width:0;}.home-nav-link{width:100%;margin-bottom:12px;}.home-business-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}.home-business-links button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:12px 16px;border:1px solid #E5E5EA;border-radius:8px;background:#fff;color:#1D1D1F;font:inherit;text-align:left;cursor:pointer;}.home-business-links button>span:last-child{color:#6E6E73;}.home-business-links button:focus-visible{outline:2px solid #0B63CE;outline-offset:2px;}@media(max-width:560px){.home-business-links{grid-template-columns:1fr;gap:8px;}}
#home-activity-region:empty { display:none; }
.home-activity{--activity-ink:#6E6E73;--activity-bg:#F5F5F7;overflow:hidden;padding:0 12px;background:#fff;border:1px solid #E5E5EA;border-radius:12px;}
.home-notifications{display:flex;align-items:center;gap:12px;min-height:48px;border-bottom:1px solid #EFF0F2;}.home-notice-label{flex:none;margin:0;font-size:14px;font-weight:600;color:#1D1D1F;white-space:nowrap;}.home-notice-list{display:flex;flex-wrap:wrap;align-items:center;gap:0 8px;min-width:0;}.home-notification{display:flex;align-items:center;flex:none;min-width:44px;min-height:44px;white-space:nowrap;}.home-notification-chip{display:flex;align-items:center;gap:6px;padding:4px 8px;border-radius:5px;background:var(--activity-bg);color:var(--activity-ink);font-size:12px;line-height:18px;}.home-notification-count{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;}.home-notice-empty{font-size:12px;color:#6E6E73;}
.home-activity-head{display:flex;align-items:center;gap:8px;}.home-activity-heading{font-size:13px;font-weight:600;color:#1D1D1F;}.home-report-link{display:flex;align-items:center;gap:4px;flex:1;min-width:0;min-height:44px;white-space:nowrap;}.home-range{margin-left:auto;font-size:12px;color:#6E6E73;}.home-retry{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;color:#B54708;font-size:12px;}
.home-metrics{display:flex;padding:0 0 12px;}.home-metric{flex:1;min-width:0;min-height:44px;text-align:center;}.home-metric-value{display:flex;align-items:baseline;justify-content:center;gap:2px;white-space:nowrap;color:#1D1D1F;font-variant-numeric:tabular-nums;}.home-metric-value strong,.home-metric-value>text:first-child{font-size:20px;font-weight:600;line-height:1.2;}.home-metric-unit,.home-metric-value>span{font-size:12px;color:#6E6E73;}.home-metric-label{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:4px;font-size:12px;color:#6E6E73;white-space:nowrap;}.home-metric-dot,.home-metric-label i{display:block;width:4px;height:4px;flex:none;border-radius:50%;background:var(--activity-ink);}
.home-entry-row{display:flex;align-items:stretch;border-top:1px solid #EFF0F2;}.home-latest-row{display:flex;align-items:center;gap:6px;flex:1;min-width:0;min-height:44px;}.home-latest-tag{flex:none;border-radius:4px;padding:2px 5px;font-size:12px;line-height:16px;color:var(--activity-ink);background:var(--activity-bg);}.home-latest-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#414149;font-size:12px;}.home-activity-arrow{color:#6E6E73;}.home-daily-brief{display:flex;align-items:center;justify-content:center;flex:none;min-height:44px;margin-left:8px;padding:0 0 0 10px;border-left:1px solid #EFF0F2;color:#0B63CE;font-size:12px;white-space:nowrap;}
@media(max-width:360px){.home-notifications{gap:8px;}.home-notice-list{gap:0 5px;}.home-notification-chip{gap:4px;padding:4px 6px;}.home-metric-value strong,.home-metric-value>text:first-child{font-size:18px;}}
.home-activity .kind-pipeline{--activity-ink:#185FC2;--activity-bg:#EDF3FF;}
.home-activity .kind-visit{--activity-ink:#08796B;--activity-bg:#EAF7F2;}
.home-activity .kind-merchant{--activity-ink:#B03C73;--activity-bg:#FCEEF4;}
.home-activity .kind-product{--activity-ink:#A95112;--activity-bg:#FFF2E5;}
.home-activity .kind-order{--activity-ink:#3F6C25;--activity-bg:#F1F6E9;}
.home-activity .kind-park{--activity-ink:#7145AD;--activity-bg:#F3EDFC;}
.home-activity .kind-mortgage{--activity-ink:#185FC2;--activity-bg:#EDF3FF;}
.home-activity .kind-orders{--activity-ink:#A95112;--activity-bg:#FFF2E5;}
.home-activity .kind-campaign{--activity-ink:#00758A;--activity-bg:#EAF6FA;}
.home-activity{margin:0 0 12px;}.home-activity button{appearance:none;font-family:inherit;cursor:pointer;box-shadow:none;text-align:left;}.home-activity button:focus-visible{outline:2px solid #0B63CE;outline-offset:-2px;}.home-activity-head h3{margin:0;font-size:14px;font-weight:600;color:#1D1D1F;}.home-activity .home-report-link,.home-activity .home-retry,.home-activity .home-latest-row{border:0;background:transparent;padding:0;}.home-activity .home-notification{border:0;background:transparent;padding:0;}.home-activity .home-metric{border:0;background:transparent;border-radius:0;padding:0;text-align:center;}.home-activity .home-metric:first-child{border:0;}.home-activity .home-daily-brief{border:0;border-left:1px solid #EFF0F2;border-radius:0;background:transparent;}
