:root {
  color-scheme: light;
  --ink: #162236;
  --muted: #667085;
  --line: #e6eaf0;
  --canvas: #f5f7fa;
  --panel: #ffffff;
  --nav: #101a2a;
  --nav-soft: #1a2940;
  --blue: #2f6fed;
  --green: #18a575;
  --amber: #e99b22;
  --purple: #8157d9;
  --radius: 14px;
  --active-order-width: 145px;
  --active-client-width: 260px;
  --active-stage-width: 190px;
  --active-product-width: 190px;
  --active-paid-width: 70px;
  --active-closing-width: 145px;
  --active-delivery-width: 145px;
  --active-value-width: 145px;
  --active-link-width: 300px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; }
[hidden] { display: none !important; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #233958, #101a2a 70%); }
.login-card { width: min(420px, 100%); padding: 34px; border-radius: 20px; background: white; box-shadow: 0 24px 80px #0005; }
.login-card > img { margin-bottom: 20px; border-radius: 12px; }
.login-card h1 { font-size: 1.6rem; margin: 8px 0; }
.login-description { color: #637084; line-height: 1.5; margin-bottom: 26px; }
.login-submit { width: 100%; }
.is-seller #data-menu [data-view^="data-"], .is-seller [id^="data-"][id$="-view"], .is-seller .bulk-action-bar,
.is-seller .active-selection-cell, .is-seller [data-select-active-order], .is-seller [data-select-active-stage] { display: none !important; }
.backup-status-card { flex-wrap: wrap; overflow-wrap: anywhere; }
@media (max-width: 480px) { .login-screen { padding: 16px; } .login-card { padding: 26px; } }
button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; background: var(--nav); color: #fff; display: flex; flex-direction: column; }
.sidebar-heading { position: relative; display: block; }
.mobile-menu-button, .mobile-sidebar-close, .mobile-nav-backdrop { display: none; }
.system-switcher { position: relative; min-width: 0; flex: 1; }
.brand { width: 100%; color: inherit; display: flex; gap: 12px; align-items: center; padding: 0 10px 30px; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.brand-mark { display: block; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 9px; object-fit: contain; box-shadow: 0 8px 24px #07102080; }
.brand > span:not(.brand-menu-chevron) { min-width: 0; flex: 1; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.03rem; }
.brand small { margin-top: 2px; color: #95a3b8; font-size: .8rem; }
.brand-menu-chevron { width: auto; color: #78889e; font-size: 1rem; transition: transform .16s ease; }
.brand[aria-expanded="true"] .brand-menu-chevron { transform: rotate(180deg); }
.brand:focus-visible { outline: 3px solid #6da0ff80; outline-offset: 2px; border-radius: 10px; }
.system-menu { position: absolute; z-index: 70; top: 54px; left: 6px; right: 6px; padding: 8px; border: 1px solid #344762; border-radius: 12px; background: #17253a; box-shadow: 0 18px 42px #050b14a6; }
.system-menu[hidden] { display: none; }
.system-menu p { margin: 3px 7px 7px; color: #91a0b5; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.system-menu-link { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; color: #fff; text-decoration: none; }
.system-menu-link:hover { background: #223652; }
.system-menu-link:focus-visible { outline: 3px solid #6da0ff80; outline-offset: -1px; }
.system-menu-link img { display: block; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; object-fit: contain; }
.system-menu-link > span:not(.system-menu-arrow) { min-width: 0; flex: 1; }
.system-menu-link strong, .system-menu-link small { display: block; }
.system-menu-link strong { font-size: .86rem; }
.system-menu-link small { margin-top: 2px; color: #9dacbf; font-size: .72rem; }
.system-menu-arrow { width: auto; color: #8394aa; font-size: 1rem; }
nav { display: grid; gap: 7px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; background: transparent; color: #aeb9c9; padding: 12px 13px; text-align: left; font-weight: 650; font-size: .93rem; }
.nav-item span { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-item:hover, .nav-item.is-active { background: var(--nav-soft); color: #fff; }
.nav-group { display: grid; gap: 3px; }
.nav-group-toggle { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 12px 13px; background: transparent; color: #aeb9c9; text-align: left; font-weight: 700; font-size: .93rem; }
.nav-group-toggle:hover, .nav-group-toggle[aria-expanded="true"] { color: #fff; }
.nav-icon { width: 20px; text-align: center; font-size: 1.05rem; }
.nav-label { flex: 1; }
.nav-chevron { width: 18px; color: #718097; text-align: center; transition: transform .18s ease; }
.nav-group-toggle[aria-expanded="false"] .nav-chevron { transform: rotate(-90deg); }
.nav-children { display: grid; gap: 3px; }
.nav-children[hidden] { display: none; }
.nav-subitem { position: relative; padding: 9px 13px 9px 45px; font-size: .86rem; }
.nav-subitem.is-active::before { content: ""; position: absolute; left: 27px; width: 5px; height: 5px; border-radius: 50%; background: #6da0ff; }
.sidebar-footer { position: relative; display: grid; gap: 10px; margin-top: auto; }
.profile-switcher { position: relative; }
.profile-button { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 9px; border: 1px solid #31415a; border-radius: 12px; padding: 10px 11px; background: #142136; color: white; text-align: left; }
.profile-button:hover, .profile-button[aria-expanded="true"] { border-color: #4b6488; background: #182840; }
.profile-avatar, .profile-menu button span { display: grid; place-items: center; border-radius: 50%; background: #2f6fed; color: white; font-weight: 850; }
.profile-avatar { width: 34px; height: 34px; font-size: .82rem; }
.profile-button-copy { min-width: 0; }
.profile-button-copy small, .profile-button-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button-copy small { margin-bottom: 2px; color: #95a3b8; font-size: .68rem; font-weight: 650; }
.profile-button-copy strong { font-size: .84rem; }
.profile-chevron { color: #8494aa; text-align: center; transition: transform .16s ease; }
.profile-button[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }
.profile-menu { position: absolute; z-index: 40; left: 0; right: 0; bottom: calc(100% + 7px); padding: 7px; border: 1px solid #344762; border-radius: 12px; background: #17253a; box-shadow: 0 16px 36px #050b1480; }
.profile-menu[hidden] { display: none; }
.profile-menu p { margin: 4px 7px 7px; color: #91a0b5; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.profile-menu button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 8px; background: transparent; color: #d9e1ec; text-align: left; font-size: .82rem; font-weight: 700; }
.profile-menu button:hover, .profile-menu button.is-active { background: #223652; color: white; }
.profile-menu button span { width: 25px; height: 25px; font-size: .68rem; }
.network-card { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid #31415a; border-radius: 12px; background: #142136; }
.network-card strong, .network-card small { display: block; }
.network-card strong { font-size: .84rem; }
.network-card small { margin-top: 2px; color: #95a3b8; font-size: .72rem; }
.network-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #42d39b; box-shadow: 0 0 0 4px #42d39b1f; }
main { min-width: 0; padding: 0 34px 50px; }
.topbar { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 5px; color: #7b8798; font-size: .72rem; font-weight: 800; letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.85rem; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 1.22rem; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.demo-badge { padding: 8px 11px; border-radius: 999px; color: #315892; background: #e9f1ff; font-size: .8rem; font-weight: 750; }
.primary-button { border: 0; border-radius: 10px; padding: 11px 16px; background: var(--blue); color: white; font-weight: 750; box-shadow: 0 7px 16px #2f6fed30; }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button { border: 1px solid #d7dde6; border-radius: 9px; padding: 9px 13px; background: white; color: #29384d; font-weight: 750; }
.secondary-button:hover { border-color: #b8c4d4; background: #f8fafc; }
.view { display: none; padding-top: 26px; }
.view.is-active { display: block; }
.notice { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 13px 16px; border: 1px solid #cfe0ff; border-radius: 11px; background: #eff5ff; color: #31527d; font-size: .88rem; }
.notice strong { color: #1c4278; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 132px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 5px 20px #24344d0a; }
.metric-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent); }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { font-size: .82rem; font-weight: 700; }
.metric-card strong { display: block; margin: 10px 0 5px; font-size: 2rem; letter-spacing: -.05em; }
.metric-card small { font-size: .76rem; }
.accent-blue { --accent: var(--blue); }.accent-amber { --accent: var(--amber); }.accent-purple { --accent: var(--purple); }.accent-green { --accent: var(--green); }
.section-heading { margin: 30px 0 14px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading > span { color: var(--muted); font-size: .84rem; }
.heading-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; }
.section-note { margin: -5px 0 16px; color: var(--muted); font-size: .82rem; }
.compact-heading { margin-top: 8px; }
.report-page-heading { align-items: center; }
.report-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.report-period { padding: 7px 10px; border-radius: 999px; background: #e9f1ff; color: #315892; font-size: .76rem; font-weight: 750; }
.report-period-picker { display: flex; align-items: center; gap: 8px; color: #667085; font-size: .72rem; font-weight: 700; }
.report-period-picker select { min-width: 170px; height: 38px; border: 1px solid #d5dce6; border-radius: 9px; padding: 0 34px 0 11px; background: white; color: #26364d; font: inherit; font-size: .8rem; cursor: pointer; }
.report-period-picker select:focus { border-color: var(--blue); outline: 3px solid #2f6fed20; }
.report-loading { display: grid; place-items: center; min-height: 180px; border: 1px dashed #d9dfe8; border-radius: 12px; color: var(--muted); }
.report-loading[hidden], .report-content[hidden] { display: none; }
.report-section { padding: 12px 0 30px; }
.report-section + .report-section { border-top: 1px solid var(--line); padding-top: 30px; }
.report-section h3 { margin: 0 0 16px; font-size: 1.55rem; letter-spacing: -.03em; }
.report-metrics, .report-grid { display: grid; gap: 12px; }
.report-metrics { margin-bottom: 12px; }
.report-grid { margin-bottom: 12px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.one-column { grid-template-columns: 1fr; }
.report-metric { min-height: 96px; padding: 17px 24px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 3px 13px #24344d08; }
.report-metric span, .report-metric strong { display: block; }
.report-metric span { margin-bottom: 2px; color: #344054; font-size: .83rem; font-weight: 700; }
.report-metric strong { font-size: 2.2rem; line-height: 1.05; letter-spacing: -.04em; }
.report-chart-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 3px 13px #24344d08; }
.report-chart-card.full-width { margin-bottom: 12px; }
.report-chart-title { min-height: 54px; display: flex; align-items: center; padding: 13px 24px; border-bottom: 1px solid var(--line); color: #344054; font-size: .83rem; font-weight: 750; }
.report-chart { min-height: 300px; overflow-x: auto; padding: 14px 14px 4px; scrollbar-width: thin; }
.report-chart-wide { min-height: 320px; }
.report-empty { min-height: 270px; display: grid; place-items: center; color: #8a95a5; font-size: .8rem; }
.donut-layout { min-height: 270px; display: grid; grid-template-columns: minmax(210px, 1fr) minmax(190px, .9fr); align-items: center; gap: 8px; }
.donut-chart { width: min(100%, 260px); margin: auto; overflow: visible; }
.donut-total { fill: var(--ink); font-size: 25px; font-weight: 800; }
.donut-caption { fill: #8a95a5; font-size: 9px; }
.chart-legend { display: grid; gap: 7px; margin: 0; padding: 0 10px 0 0; list-style: none; }
.chart-legend li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; font-size: .71rem; }
.chart-legend li > span { width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color); }
.chart-legend strong { overflow: hidden; color: #4b586a; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend em { color: #8a95a5; font-style: normal; white-space: nowrap; }
.cartesian-chart { display: block; max-width: none; height: 275px; }
.chart-grid-line { stroke: #e3e7ec; stroke-width: 1; }
.chart-axis-label, .chart-x-label, .chart-value { fill: #7b8798; font-family: inherit; font-size: 10px; }
.chart-value { fill: #5c6879; font-size: 10px; }
.chart-line { fill: none; stroke: #4b8ed2; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.bulk-action-bar { min-height: 52px; display: flex; align-items: center; gap: 9px; margin: -3px 0 14px; padding: 8px 10px 8px 15px; border: 1px solid #bed1f7; border-radius: 11px; background: #eef4ff; color: #4b5d78; font-size: .8rem; }
.bulk-action-bar[hidden] { display: none; }
.bulk-action-bar strong { color: #234e94; }
.bulk-action-buttons { display: flex; gap: 8px; margin-left: auto; }
.bulk-action-buttons button { padding: 8px 12px; font-size: .76rem; }
.danger-button { border: 1px solid #e5a5aa; border-radius: 9px; padding: 9px 13px; background: #fff; color: #b4232d; font-weight: 750; }
.danger-button:hover { border-color: #c7545d; background: #fff1f2; }
.danger-button:disabled, .bulk-action-buttons button:disabled { cursor: wait; opacity: .5; }
.row-select { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.selection-cell { width: 42px; min-width: 42px; padding: 0 12px; text-align: center; }
.bulk-check { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 0; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 14px; scrollbar-color: #bcc6d4 transparent; }
.kanban-column { min-height: 310px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #edf1f6; }
.kanban-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 2px 3px; font-size: .82rem; font-weight: 800; }
.kanban-title span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #dce3ec; text-align: center; font-size: .72rem; }
.order-card { margin-bottom: 9px; padding: 13px; border: 1px solid #e1e6ec; border-radius: 11px; background: white; box-shadow: 0 4px 12px #1622360a; }
.order-card strong { display: block; margin-bottom: 5px; font-size: .88rem; }
.order-card p { margin-bottom: 9px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.order-meta { display: flex; justify-content: space-between; gap: 8px; color: #778497; font-size: .72rem; }
.empty-column { padding: 26px 6px; color: #8c97a6; font-size: .78rem; text-align: center; }
.service-board { display: flex; gap: 10px; min-height: 560px; height: calc(100vh - 235px); overflow-x: auto; padding: 2px 2px 14px; scrollbar-color: #aeb9c8 transparent; }
.compact-search-bar { display: flex; justify-content: center; margin: 2px 0 14px; }
.compact-search-field { width: min(520px, 100%); display: flex; align-items: center; gap: 12px; }
.compact-search-field input { width: 100%; height: 36px; border: 1px solid #d6dde7; border-radius: 10px; padding: 0 38px 0 13px; background: white; color: #26364d; font-size: .8rem; box-shadow: 0 1px 3px #24344d0b; }
.compact-search-field input:focus { border-color: #8fa9d4; outline: 3px solid #2f6fed18; }
.compact-search-field input::placeholder { color: #9aa5b4; }
.search-icon { position: relative; width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid #26364d; border-radius: 50%; }
.search-icon::after { position: absolute; right: -8px; bottom: -5px; width: 10px; height: 2px; border-radius: 2px; background: #26364d; content: ""; transform: rotate(-47deg); transform-origin: left center; }
.service-column { --stage-bg: #e8edf4; --stage-ink: #415168; flex: 0 0 286px; width: 286px; overflow: hidden; border: 1px solid #dce2ea; border-top: 3px solid var(--stage-ink); border-radius: 10px; background: #eef2f6; transition: flex-basis .18s ease, width .18s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.service-column-heading { width: 100%; min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid #dfe4ea; padding: 11px 12px; background: #f9fafb; color: var(--ink); text-align: left; }
.stage-name { display: inline-flex; overflow: hidden; padding: 5px 9px; border-radius: 999px; background: var(--stage-bg); color: var(--stage-ink); font-size: .8rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.stage-total { color: #7b8798; font-size: .76rem; }
.service-column-body { height: calc(100% - 56px); overflow-y: auto; padding: 10px; scrollbar-width: thin; }
.service-card { margin-bottom: 9px; padding: 12px; border: 1px solid #dce2e9; border-radius: 9px; background: white; box-shadow: 0 2px 7px #1622360b; cursor: grab; user-select: none; transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease; }
.service-card:hover { box-shadow: 0 7px 18px #16223618; }
.service-card:active { cursor: grabbing; }
.service-card.is-dragging { opacity: .35; transform: scale(.98); box-shadow: none; }
.service-card.is-saving { opacity: .55; pointer-events: none; }
.service-column.is-drop-target { border-color: var(--stage-ink); background: var(--stage-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage-ink) 18%, transparent); }
.service-column.is-drop-target .service-column-body { background: color-mix(in srgb, var(--stage-bg) 45%, #eef2f6); }
.service-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.service-card-heading strong { overflow: hidden; color: #344054; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.card-phone { display: block; overflow: hidden; color: #7b8798; font-size: .72rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.card-edit { border: 0; border-radius: 6px; padding: 4px 6px; background: transparent; color: var(--blue); font-size: .7rem; font-weight: 750; }
.card-edit:hover { background: #edf3ff; }
.card-label { display: block; margin: 8px 0 4px; color: #7b8798; font-size: .68rem; }
.card-client { max-width: 100%; overflow: hidden; border: 0; border-radius: 5px; padding: 4px 6px; background: #e9effa; color: #28384f; font-size: .76rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.card-response { color: #344054; font-size: .76rem; font-variant-numeric: tabular-nums; }
.column-limit { padding: 9px; color: #788596; font-size: .7rem; text-align: center; }
.service-column.is-collapsed { flex-basis: 54px; width: 54px; }
.service-column.is-collapsed .service-column-heading { height: 100%; min-height: 0; justify-content: flex-start; border-bottom: 0; padding: 14px 10px; writing-mode: vertical-rl; }
.service-column.is-collapsed .stage-name { max-height: 240px; }
.service-column.is-collapsed .service-column-body { display: none; }
.tone-blue { --stage-bg: #dce9ff; --stage-ink: #315f9d; }
.tone-pink { --stage-bg: #f8d5f2; --stage-ink: #7b356c; }
.tone-red { --stage-bg: #ffd9dd; --stage-ink: #9a3f4a; }
.tone-magenta { --stage-bg: #f3c9f0; --stage-ink: #7f3479; }
.tone-yellow { --stage-bg: #ffe9ad; --stage-ink: #74560d; }
.tone-purple { --stage-bg: #e6dcff; --stage-ink: #5f4794; }
.tone-cyan { --stage-bg: #cceefa; --stage-ink: #216477; }
.tone-green { --stage-bg: #d5f1d8; --stage-ink: #2d6b38; }
.tone-gray { --stage-bg: #e4e7ec; --stage-ink: #475467; }
.grouped-orders { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px #24344d0a; }
.order-group + .order-group { border-top: 1px solid var(--line); }
.order-group-heading { width: 100%; min-height: 76px; display: grid; grid-template-columns: 22px minmax(200px, 1fr) auto; align-items: center; gap: 14px; border: 0; padding: 12px 20px; background: white; color: var(--ink); text-align: left; }
.order-group-heading:hover { background: #fafbfc; }
.order-group-heading small { display: block; margin-bottom: 5px; color: #7b8798; font-size: .68rem; font-weight: 650; }
.order-group-heading .stage-pill { background: var(--stage-bg); color: var(--stage-ink); font-size: .86rem; }
.group-chevron { color: #465467; font-size: 1.35rem; transition: transform .16s ease; }
.order-group.is-open .group-chevron { transform: rotate(90deg); }
.group-count { padding-right: 8px; color: #667085; font-size: .82rem; }
.order-group-body { padding: 0 20px 18px 56px; background: #fafbfc; }
.group-order-list { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.group-order-row { display: grid; grid-template-columns: 140px minmax(220px, 1.3fr) minmax(180px, 1fr) 120px 70px; align-items: center; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.group-order-row:last-child { border-bottom: 0; }
.group-order-row > span { overflow: hidden; color: #526074; text-overflow: ellipsis; white-space: nowrap; }
.group-empty { padding: 18px; border: 1px dashed #d9dfe8; border-radius: 9px; color: var(--muted); font-size: .8rem; text-align: center; }
.group-data-button { margin-top: 10px; font-size: .75rem; }
.active-order-group-body { padding-left: 20px; }
.active-orders-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: white; scrollbar-width: thin; }
.active-order-header, .active-order-row { display: grid; grid-template-columns: 42px var(--active-order-width) var(--active-client-width) var(--active-stage-width) var(--active-product-width) var(--active-paid-width) var(--active-closing-width) var(--active-delivery-width) var(--active-value-width) var(--active-link-width); min-width: calc(42px + var(--active-order-width) + var(--active-client-width) + var(--active-stage-width) + var(--active-product-width) + var(--active-paid-width) + var(--active-closing-width) + var(--active-delivery-width) + var(--active-value-width) + var(--active-link-width)); align-items: center; }
.active-order-header { min-height: 42px; border-bottom: 1px solid var(--line); background: #fafbfc; color: #6d7887; font-size: .68rem; font-weight: 750; }
.active-header-cell { position: relative; align-self: stretch; display: flex; align-items: center; overflow: hidden; padding: 0 10px; white-space: nowrap; }
.column-resizer { position: absolute; z-index: 2; top: 0; right: -4px; width: 9px; height: 100%; border: 0; padding: 0; background: transparent; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: transparent; }
.column-resizer:hover::after, .column-resizer:focus-visible::after, body.is-resizing-column .column-resizer::after { background: var(--blue); }
.column-resizer:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
body.is-resizing-column { cursor: col-resize; user-select: none; }
.active-order-row { min-height: 50px; border-bottom: 1px solid var(--line); transition: background .12s ease, opacity .15s ease; }
.active-order-row:last-child { border-bottom: 0; }
.active-order-row:hover { background: #f5f7fa; }
.active-order-row.is-selected { background: #edf4ff; }
.active-order-row.is-saving { opacity: .55; }
.inline-cell, .inline-link-cell { min-width: 0; padding: 5px 4px; }
.inline-cell input, .inline-cell select, .inline-link-cell input { width: 100%; height: 38px; min-width: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #344054; padding: 0 8px; outline: none; font-size: .78rem; text-overflow: ellipsis; }
.inline-cell select { cursor: pointer; }
.inline-cell input:hover, .inline-cell select:hover, .inline-link-cell input:hover { border-color: #d8dee8; background: white; }
.inline-cell input:focus, .inline-cell select:focus, .inline-link-cell input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px #2f6fed17; }
.inline-cell input:disabled, .inline-cell select:disabled, .inline-link-cell input:disabled { cursor: wait; opacity: .7; }
.inline-money { position: relative; }
.inline-money > span { position: absolute; z-index: 1; left: 13px; top: 16px; color: #8a95a5; font-size: .7rem; pointer-events: none; }
.inline-money input { padding-left: 30px; }
.inline-paid { display: grid; place-items: center; height: 50px; cursor: pointer; }
.inline-paid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.inline-paid span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #98a2b3; border-radius: 50%; color: transparent; font-size: .76rem; font-weight: 900; transition: .12s ease; }
.inline-paid input:checked + span { border-color: #18a575; background: #18a575; color: white; }
.inline-paid input:focus-visible + span { box-shadow: 0 0 0 3px #18a57524; }
.inline-link-cell { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 2px; }
.inline-link-cell input { color: #2f6fed; text-decoration: underline; }
.inline-link-cell a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--blue); text-decoration: none; font-size: 1rem; }
.inline-link-cell a:hover { background: #eaf1ff; }
.active-group-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 10px; }
.active-group-pagination span { color: var(--muted); font-size: .76rem; }
.active-group-pagination button { padding: 7px 10px; font-size: .72rem; }
.production-list { display: grid; gap: 14px; }
.production-loading, .production-empty { min-height: 150px; display: grid; place-content: center; gap: 5px; border: 1px dashed #cfd7e3; border-radius: var(--radius); background: #ffffffb8; color: var(--muted); text-align: center; }
.production-empty strong { color: #344054; font-size: .92rem; }
.production-empty span { font-size: .8rem; }
.production-date-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px #24344d0a; }
.production-date-heading { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.production-date-title { min-width: 0; display: grid; gap: 4px; }
.production-date-title strong { overflow: hidden; color: #24364f; font-size: .94rem; text-overflow: ellipsis; }
.production-date-title small { color: var(--muted); font-size: .72rem; }
.production-date-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #eaf1ff; color: #315f9d; font-size: .7rem; font-weight: 800; }
.production-date-badge.is-undated { background: #e9edf2; color: #59677a; }
.production-date-badge.is-today { background: #fff0c9; color: #75560d; }
.production-date-badge.is-upcoming { background: #e3f4e6; color: #2d6b38; }
.production-table { overflow-x: auto; scrollbar-width: thin; }
.production-table-header, .production-order-row { min-width: 1120px; display: grid; grid-template-columns: 120px minmax(220px, 1.5fr) minmax(150px, 1fr) 115px 115px 115px 70px 130px; align-items: center; }
.production-table-header { min-height: 40px; border-bottom: 1px solid var(--line); background: #fff; color: #7b8798; font-size: .67rem; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.production-table-header > span, .production-order-row > div { min-width: 0; padding: 10px 12px; }
.production-order-row { min-height: 58px; border-bottom: 1px solid var(--line); color: #526074; font-size: .78rem; }
.production-order-row:last-child { border-bottom: 0; }
.production-order-row:hover { background: #f7f9fc; }
.production-order-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-primary { display: grid; gap: 4px; }
.production-primary strong { overflow: hidden; color: #24364f; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.production-primary small { overflow: hidden; color: #7b8798; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.production-paid { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #eef1f5; color: #667085; font-size: .69rem; font-weight: 800; }
.production-paid.is-paid { background: #dcf5e9; color: #087a55; }
.production-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.production-link { padding: 6px 5px; color: var(--blue); font-size: .71rem; font-weight: 750; text-decoration: none; }
.production-link:hover { text-decoration: underline; }
.table-card { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px #24344d0a; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: -2px 0 14px; }
.order-review-warning { display: block; max-width: 210px; margin-top: 5px; color: #8a4700; font-size: .75rem; white-space: normal; }
.toolbar label { display: grid; gap: 6px; color: #6d7887; font-size: .76rem; font-weight: 750; }
.toolbar input, .toolbar select { height: 42px; min-width: 210px; border: 1px solid #d9dfe8; border-radius: 9px; background: white; color: var(--ink); padding: 0 12px; outline: none; }
.toolbar input:focus, .toolbar select:focus, .form-grid input:focus, .form-grid select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2f6fed1a; }
.search-field { flex: 1; }
.search-field input { width: min(100%, 440px); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #fafbfc; color: #6d7887; font-size: .74rem; letter-spacing: .03em; text-transform: uppercase; }
td { font-size: .86rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.is-selected td { background: #edf4ff; }
tbody tr.is-saving { opacity: .55; }
.data-edit-cell { padding: 5px 6px; }
.data-inline-control { width: 100%; min-width: 105px; height: 38px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #344054; padding: 0 8px; outline: none; font-size: .8rem; }
.data-inline-control:hover { border-color: #d8dee8; background: white; }
.data-inline-control:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px #2f6fed17; }
.data-inline-control:disabled { cursor: wait; opacity: .7; }
.client-name-control { min-width: 210px; font-weight: 750; }
.data-client-control { min-width: 220px; }
.derived-value { color: #59677a; }
.data-paid-control { display: flex; align-items: center; gap: 7px; min-width: 92px; height: 38px; padding: 0 7px; border: 1px solid transparent; border-radius: 7px; color: #667085; cursor: pointer; font-size: .76rem; }
.data-paid-control:hover { border-color: #d8dee8; background: white; }
.data-paid-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.data-money-control { position: relative; display: block; }
.data-money-control > span { position: absolute; z-index: 1; left: 9px; top: 12px; color: #8a95a5; font-size: .7rem; pointer-events: none; }
.data-money-control .data-inline-control { min-width: 125px; padding-left: 28px; }
.data-link-control { display: grid; grid-template-columns: minmax(190px, 1fr) 30px; align-items: center; gap: 2px; }
.data-link-control .data-inline-control { color: #2f6fed; }
.data-link-control a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--blue); text-decoration: none; font-size: 1rem; }
.data-link-control a:hover { background: #eaf1ff; }
.orders-grid { min-width: 2460px; }
.orders-grid th, .orders-grid td { white-space: nowrap; }
.orders-grid th:first-child, .orders-grid td.selection-cell { position: sticky; z-index: 4; left: 0; background: #fafbfc; }
.orders-grid th:nth-child(2) { position: sticky; z-index: 3; left: 42px; box-shadow: 1px 0 #e6eaf0; }
.orders-grid .sticky-order { position: sticky; z-index: 2; left: 42px; min-width: 155px; background: white; box-shadow: 1px 0 #e6eaf0; }
.orders-grid .sticky-order .data-inline-control { min-width: 135px; font-weight: 750; }
.orders-grid tr.is-selected td.selection-cell, .orders-grid tr.is-selected .sticky-order { background: #edf4ff; }
.stage-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf3ff; color: #345f9d; font-size: .74rem; font-weight: 700; }
.table-action { border: 0; border-radius: 8px; background: transparent; color: var(--blue); padding: 6px 8px; font-size: .78rem; font-weight: 750; }
.table-action:hover { background: #edf3ff; }
.client-link { max-width: 260px; overflow: hidden; border: 0; border-radius: 7px; padding: 5px 7px; background: transparent; color: #265da9; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.client-link:hover { background: #edf3ff; }
.conversation-link { color: #2f6fed; font-weight: 700; text-decoration: none; }
.conversation-link:hover { text-decoration: underline; }
.paid-status { color: #8a95a5; }
.paid-status.is-paid { display: inline-flex; border-radius: 999px; padding: 4px 8px; background: #e7f8f1; color: #087a55; font-size: .75rem; font-weight: 800; }
.situation-pill { display: inline-flex; border-radius: 999px; padding: 5px 8px; background: #e8f7f0; color: #087a55; font-size: .74rem; font-weight: 800; }
.situation-pill.is-closed { background: #eef1f5; color: #667085; }
.response-time { font-variant-numeric: tabular-nums; font-weight: 750; color: #4a586b; }
.order-links { display: flex; flex-wrap: wrap; gap: 6px; min-width: 170px; }
.order-link { border: 1px solid #dce5f5; border-radius: 7px; padding: 5px 8px; background: #f2f6fd; color: #315f9d; font-size: .74rem; font-weight: 750; }
.order-link:hover { border-color: #9bb8e5; background: #e8f0fd; }
.no-orders { color: #8a95a5; font-size: .78rem; }
.loading { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.pagination span { min-width: 120px; color: var(--muted); font-size: .82rem; text-align: center; }
.pagination button:disabled { cursor: not-allowed; opacity: .45; }

dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 30px); overflow: auto; border: 0; border-radius: 16px; padding: 0; color: var(--ink); box-shadow: 0 24px 80px #101a2a4d; }
dialog::backdrop { background: #101a2a99; backdrop-filter: blur(3px); }
dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f0f3f7; color: #5b687a; font-size: 1.5rem; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: grid; gap: 7px; color: #536174; font-size: .8rem; font-weight: 750; }
.form-grid label > span { line-height: 1.25; }
.form-grid label > small { color: #7c8797; font-size: .73rem; font-weight: 500; line-height: 1.4; }
.form-grid input, .form-grid select { width: 100%; height: 44px; border: 1px solid #d9dfe8; border-radius: 9px; padding: 0 11px; outline: none; color: var(--ink); background: white; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .checkbox-field { display: flex; align-items: center; gap: 9px; align-self: end; height: 44px; }
.form-grid .checkbox-field input { width: 18px; height: 18px; accent-color: var(--green); }
.form-error { min-height: 20px; margin: 12px 0 0; color: #b42318; font-size: .8rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border-radius: 10px; background: #162236; color: white; box-shadow: 0 12px 36px #101a2a40; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; font-size: .86rem; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.empty-table { padding: 28px; text-align: center; color: var(--muted); }

.pdf-upload-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: stretch; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px #24344d0a; }
.pdf-file-picker { min-width: 0; display: flex; align-items: center; gap: 14px; border: 1px dashed #b8c8df; border-radius: 11px; padding: 14px 16px; background: #f8fbff; color: #344054; cursor: pointer; }
.pdf-file-picker:hover, .pdf-file-picker:focus-within { border-color: var(--blue); background: #f1f6ff; }
.pdf-file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.pdf-file-picker strong, .pdf-file-picker small { display: block; }
.pdf-file-picker strong { margin-bottom: 3px; color: #24364f; }
.pdf-file-picker small { color: #7b8798; font-size: .78rem; }
.pdf-file-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px; background: #e9f1ff; color: #275eb5; font-size: .74rem; font-weight: 900; letter-spacing: .04em; }
.pdf-model-note, .pdf-final-effect, .pdf-duplicate-warning { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 13px 15px; border: 1px solid #cfe0ff; border-radius: 10px; background: #eff5ff; color: #3c587d; font-size: .84rem; line-height: 1.45; }
.pdf-model-note strong, .pdf-final-effect strong { flex: 0 0 auto; color: #234b82; }
.pdf-import-error { margin: 10px 0 0; }
.pdf-import-workspace { margin-top: 20px; }
.pdf-import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pdf-summary-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.pdf-summary-card span, .pdf-summary-card strong { display: block; }
.pdf-summary-card span { color: #778396; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pdf-summary-card strong { margin-top: 6px; color: #1f3048; font-size: 1.45rem; }
.pdf-summary-card.is-review strong { color: #a65b00; }
.pdf-summary-card.is-new strong { color: #315f9d; }
.pdf-summary-card.is-error strong { color: #b42318; }
.pdf-duplicate-warning { border-color: #f2d18b; background: #fff8e8; color: #7c4c00; }
.pdf-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0; }
.pdf-stepper button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #dbe1e9; border-radius: 10px; background: white; color: #7a8595; font-size: .82rem; font-weight: 800; }
.pdf-stepper button span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eef1f5; color: #687587; }
.pdf-stepper button.is-active { border-color: #9ebcf0; background: #eff5ff; color: #2458a4; }
.pdf-stepper button.is-active span { background: var(--blue); color: white; }
.pdf-stepper button:disabled { cursor: default; opacity: .65; }
.pdf-import-step { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px #24344d0a; }
.pdf-step-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pdf-step-heading h3 { margin: 0 0 5px; font-size: 1.05rem; }
.pdf-step-heading p { margin: 0; color: var(--muted); font-size: .84rem; }
.pdf-review-table-card { box-shadow: none; }
.pdf-review-table { min-width: 960px; }
.pdf-orders-review-table { min-width: 1220px; }
.pdf-review-table th, .pdf-review-table td { vertical-align: top; }
.pdf-review-table td { padding: 10px; }
.pdf-review-input, .pdf-review-select { width: 100%; min-width: 150px; height: 40px; border: 1px solid #d8dee8; border-radius: 8px; background: white; color: #344054; padding: 0 9px; outline: none; font-size: .8rem; }
.pdf-review-input:focus, .pdf-review-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2f6fed17; }
.pdf-client-name-input { min-width: 270px; }
.pdf-review-select { min-width: 310px; }
.pdf-order-destination { min-width: 250px; }
.pdf-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.pdf-status.is-exact { background: #e8f7f0; color: #087a55; }
.pdf-status.is-review { background: #fff4dd; color: #945400; }
.pdf-status.is-new { background: #eaf1ff; color: #2d5fa6; }
.pdf-status.is-invalid { background: #feeeee; color: #b42318; }
.pdf-match-list { display: grid; gap: 4px; margin-top: 7px; color: #7a5a23; font-size: .72rem; line-height: 1.35; }
.pdf-row-warning { display: block; max-width: 270px; margin-top: 6px; color: #8a5900; font-size: .7rem; line-height: 1.35; }
.pdf-step-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.pdf-final-effect { margin-top: 14px; border-color: #b9e8d6; background: #edfbf5; color: #24624e; }
.pdf-final-effect strong { color: #087a55; }
.pdf-import-result { padding: 22px; border: 1px solid #b9e8d6; border-radius: var(--radius); background: #edfbf5; }
.pdf-import-result h3 { margin: 0 0 6px; color: #076849; }
.pdf-import-result p { margin: 0; color: #315f51; line-height: 1.5; }
.pdf-result-actions { display: flex; gap: 9px; margin-top: 16px; }
.pdf-row-check { width: 18px; height: 18px; accent-color: var(--blue); }

@media (max-width: 1000px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(5, 240px); }
  .service-board { height: 600px; }
  .donut-layout { grid-template-columns: 1fr; }
  .chart-legend { padding: 0 24px 16px; }
}

@media (max-width: 720px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
  body.mobile-nav-open { overflow: hidden; }
  .app-shell { display: block; min-height: 100dvh; }
  .sidebar {
    position: fixed;
    z-index: 100;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 42px #07102035;
  }
  .app-shell.is-nav-open .sidebar { transform: translateX(0); }
  .sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .brand { min-width: 0; padding: 0 8px 24px; }
  .brand small { display: block; }
  .mobile-sidebar-close { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; align-self: flex-start; border: 1px solid #31415a; border-radius: 10px; background: #18263a; color: white; font-size: 1.55rem; line-height: 1; }
  .mobile-nav-backdrop { position: fixed; z-index: 90; inset: 0; width: 100%; height: 100%; display: block; border: 0; padding: 0; background: #08111f99; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .app-shell.is-nav-open .mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-footer { margin-top: auto; }
  .profile-button { width: 100%; grid-template-columns: 34px minmax(0, 1fr) 18px; padding: 10px 11px; }
  .profile-button-copy, .profile-chevron { display: block; }
  .profile-menu { right: 0; left: 0; width: auto; bottom: calc(100% + 7px); top: auto; }
  nav { display: grid; gap: 7px; }
  .nav-group { position: static; }
  .nav-group-toggle, .nav-item { min-height: 44px; white-space: normal; }
  .nav-children { position: static; width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .nav-subitem { padding-left: 45px; }
  .nav-subitem.is-active::before { display: block; }
  main { width: 100%; min-height: 100dvh; padding: 0 12px 32px; }
  .topbar { position: sticky; z-index: 30; top: 0; min-height: 76px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; margin: 0 -12px; padding: 0 12px; background: #f5f7faf2; backdrop-filter: blur(10px); }
  .mobile-menu-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #d9e0e9; border-radius: 10px; background: white; color: #24364f; font-size: 1.3rem; box-shadow: 0 2px 8px #1622360d; }
  .topbar-title { min-width: 0; }
  .topbar-title h1 { overflow: hidden; font-size: 1.28rem; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-title .eyebrow { display: none; }
  .top-actions { gap: 6px; }
  .demo-badge { display: none; }
  .primary-button, .secondary-button, .danger-button { min-height: 42px; }
  .view { padding-top: 18px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 112px; padding: 16px; }
  .metric-card strong { margin: 8px 0 4px; font-size: 1.8rem; }
  .notice { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 12px; }
  .section-heading > span, .heading-actions { width: 100%; justify-content: space-between; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar input, .toolbar select, .search-field input { width: 100%; }
  .compact-search-bar { justify-content: stretch; }
  .compact-search-field { width: 100%; }
  .compact-search-field input { height: 44px; font-size: .9rem; }
  .service-board { height: calc(100dvh - 265px); min-height: 500px; gap: 9px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .service-column { flex-basis: calc(100vw - 38px); width: calc(100vw - 38px); max-width: 360px; scroll-snap-align: start; }
  .service-column.is-collapsed { flex-basis: 54px; width: 54px; }
  .service-column-heading { min-height: 52px; }
  .service-card { padding: 14px; cursor: default; }
  .service-card-heading strong { font-size: .9rem; }
  .card-phone { font-size: .78rem; }
  .card-edit { min-width: 48px; min-height: 36px; }
  .kanban { grid-template-columns: repeat(5, min(82vw, 300px)); scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .kanban-column { scroll-snap-align: start; }
  .bulk-action-bar { align-items: flex-start; flex-wrap: wrap; padding: 11px; }
  .bulk-action-buttons { width: 100%; margin-left: 0; }
  .bulk-action-buttons button { flex: 1; }
  .grouped-orders { overflow: visible; border-radius: 11px; }
  .order-group-heading { min-height: 68px; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 9px; padding: 10px 12px; }
  .order-group-heading .stage-pill { max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-group-body, .active-order-group-body { padding: 0 8px 12px; }
  .group-order-list { overflow-x: auto; }
  .group-order-row { min-width: 820px; }
  .active-orders-table, .table-card { max-width: calc(100vw - 24px); overscroll-behavior-x: contain; }
  .active-order-row { min-height: 54px; }
  .inline-cell input, .inline-cell select, .inline-link-cell input { height: 42px; font-size: .84rem; }
  .production-date-heading { min-height: 60px; padding: 11px 13px; }
  .production-date-title strong { font-size: .86rem; }
  .production-date-badge { padding: 5px 8px; font-size: .64rem; }
  .production-table { overflow: visible; padding: 9px; background: #f7f9fc; }
  .production-table-header { display: none; }
  .production-order-row { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 13px 10px; margin-bottom: 9px; padding: 13px; border: 1px solid #e1e6ed; border-radius: 10px; background: white; box-shadow: 0 2px 7px #24344d0a; }
  .production-order-row:last-child { margin-bottom: 0; border-bottom: 1px solid #e1e6ed; }
  .production-order-row:hover { background: white; }
  .production-order-row > div { padding: 0; }
  .production-order-row > div::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #8a95a5; font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .production-order-row > div:nth-child(2), .production-order-row > div:nth-child(3), .production-row-actions { grid-column: 1 / -1; }
  .production-row-actions { min-height: 38px; justify-content: flex-end; border-top: 1px solid #edf0f4; padding-top: 9px !important; }
  .production-row-actions::before { display: none !important; }
  .production-row-actions .table-action, .production-link { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 11px; }
  .report-page-heading { align-items: stretch; }
  .report-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .report-period { align-self: flex-start; }
  .report-period-picker { width: 100%; display: grid; grid-template-columns: 76px minmax(0, 1fr); }
  .report-period-picker select { width: 100%; min-width: 0; height: 44px; }
  .report-grid.two-columns, .report-metrics.two-columns { grid-template-columns: 1fr; }
  .report-section { padding-bottom: 22px; }
  .report-section + .report-section { padding-top: 22px; }
  .report-section h3 { font-size: 1.32rem; }
  .report-metric { min-height: 88px; padding: 15px 17px; }
  .report-metric strong { font-size: 1.95rem; }
  .report-chart-title { min-height: 48px; padding: 12px 15px; }
  .report-chart { min-height: 280px; padding: 10px 8px 2px; }
  .cartesian-chart { min-width: 620px; }
  .donut-layout { min-width: 0; }
  .pagination { justify-content: space-between; gap: 7px; }
  .pagination span { min-width: 0; flex: 1; }
  dialog { width: 100%; max-width: none; max-height: calc(100dvh - 16px); margin: auto 0 0; border-radius: 18px 18px 0 0; }
  dialog form { padding: 20px 16px max(18px, env(safe-area-inset-bottom)); }
  .dialog-actions { position: sticky; bottom: 0; margin: 8px -16px -18px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
  .dialog-actions button { flex: 1; }
  .toast { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; max-width: none; }
  .pdf-upload-card { grid-template-columns: 1fr; padding: 14px; }
  .pdf-upload-card .primary-button { width: 100%; }
  .pdf-model-note, .pdf-final-effect { flex-direction: column; }
  .pdf-import-summary { grid-template-columns: 1fr 1fr; }
  .pdf-stepper { grid-template-columns: 1fr; }
  .pdf-stepper button { justify-content: flex-start; padding-left: 16px; }
  .pdf-import-step { padding: 14px; }
  .pdf-step-actions { flex-direction: column-reverse; }
  .pdf-step-actions button { width: 100%; }
}

@media (max-width: 480px) {
  .brand strong { display: block; }
  .brand-mark { width: 42px; height: 42px; }
  .metric-grid { grid-template-columns: 1fr; }
  .top-actions .primary-button { padding: 9px 11px; font-size: .78rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .dialog-heading { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .mobile-nav-backdrop { transition: none; }
}


.card-timer { display: flex; align-items: baseline; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.card-timer .card-label { display: inline; margin: 0; }
.card-timer .card-response { white-space: nowrap; }

.closing-toolbar, .closing-month-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.closing-toolbar { justify-content:space-between; margin-bottom:14px; }
.closing-month-controls label { margin:0; }
.closing-month-controls input { min-height:40px; }
.closing-calendar-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:white; }
.closing-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); min-width:850px; }
.closing-weekday { padding:13px 8px; background:#edf2f8; color:#52617b; text-align:center; font-weight:750; font-size:.78rem; }
.closing-day { height:220px; min-height:0; display:flex; flex-direction:column; overflow:hidden; padding:8px; border-top:1px solid #e2e7ee; border-right:1px solid #e2e7ee; min-width:0; }
.closing-day:nth-child(7n) { border-right:0; }
.closing-day.is-outside { background:#f6f8fb; }
.closing-day.is-today .closing-day-heading strong { background:var(--blue); color:white; border-radius:50%; padding:4px 7px; }
.closing-day-heading { display:flex; align-items:center; gap:7px; min-height:28px; margin-bottom:7px; color:#56647a; font-size:.8rem; }
.closing-day-heading small { color:var(--blue); }
.closing-day.has-alert { background:#fff5f5; box-shadow:inset 0 0 0 2px #e75a61; }
.closing-alert { display:block; color:#b4232c; background:#ffe2e4; padding:5px; border-radius:5px; font-size:.66rem; font-weight:750; margin-bottom:7px; }
.closing-order { display:flex; flex-direction:column; gap:4px; width:100%; border:1px solid #cddbf1; border-radius:7px; background:#f0f5ff; color:#26446f; text-align:left; padding:8px; margin-bottom:7px; cursor:pointer; font:inherit; font-size:.72rem; overflow-wrap:anywhere; }
.closing-order strong { font-size:.74rem; }
.closing-order small { font-size:.65rem; }
.closing-order.is-closed, .closing-order.is-overdue { background:#f1f2f4; border-color:#e4e6ea; color:#9299a4; }
.closing-order:hover { border-color:#6d91ca; }
.closing-order:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

.closing-day-heading, .closing-alert { flex-shrink:0; }
.closing-day-orders { flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; }
.closing-day-orders:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }

.report-date-filter { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:16px 0; padding:16px; background:white; border:1px solid var(--line); border-radius:12px; }
.report-date-filter label { display:flex; flex-direction:column; gap:6px; margin:0; }
.report-date-filter input { min-height:42px; }
.report-date-presets { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:700px) { .report-date-filter label { flex:1; min-width:125px; } .report-date-filter input { width:100%; } .report-date-presets { width:100%; } .report-date-presets button { flex:1; } }
/* Client map: fixed local IBGE geometry; no external map or geocoding service. */
.client-map-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}
.client-map-metrics>div,.client-map-panel {background:white;border:1px solid #dfe6f0;border-radius:16px;padding:22px}
.client-map-metrics span {display:block;color:#64748b;font-size:13px}
.client-map-metrics strong {display:block;font-size:28px;margin-top:8px;color:#15243b}
.client-map-layout {display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:20px;align-items:start}
.client-map-svg {width:100%;max-height:680px;display:block;overflow:visible}
.client-map-svg path {fill:#e9edf2;stroke:#fff;stroke-width:1.8;stroke-linejoin:round;cursor:pointer;transition:fill .18s}
.client-map-svg path:hover,.client-map-svg path:focus,.client-map-svg path.is-selected {stroke:#142c50;stroke-width:3;outline:none}
.client-map-label {font:700 12px Arial,sans-serif;text-anchor:middle;fill:#10233f;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;pointer-events:none}
.client-map-label tspan {font-size:11px;font-weight:600}
.client-map-panel small {display:block;color:#64748b;line-height:1.6;margin-top:20px}
#client-map-selection {font-weight:600;min-height:1.5em}
.client-map-legend {display:flex;align-items:center;gap:10px;font-size:12px;color:#64748b;margin:18px 0}
.client-map-legend i {height:10px;width:120px;background:linear-gradient(90deg,#cbdffd,#1a64b7);border-radius:8px}
.client-map-state-row {display:flex;width:100%;justify-content:space-between;gap:12px;background:white;border:0;border-bottom:1px solid #edf0f5;padding:13px 6px;text-align:left;color:#24364f;font:inherit;font-size:13px;cursor:pointer}
.client-map-state-row:hover,.client-map-state-row[aria-pressed=true] {background:#edf4ff}
.client-map-state-row:focus-visible {outline:2px solid #3267d6;outline-offset:1px}
@media(max-width:900px){.client-map-layout{grid-template-columns:minmax(0,1fr)}.client-map-panel{padding:16px}}
@media(max-width:520px){.client-map-metrics{gap:8px}.client-map-metrics>div{padding:12px}.client-map-metrics span{font-size:11px}.client-map-metrics strong{font-size:23px}.client-map-legend{gap:6px}.client-map-legend i{width:70px}}

#client-map-ranking {max-height:650px;overflow-y:auto;scrollbar-gutter:stable}
.client-map-filters {display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin:20px 0 14px;padding:18px;background:white;border:1px solid #dfe6f0;border-radius:16px}
.client-map-filters label {display:flex;flex-direction:column;gap:7px;font-size:13px;min-width:155px}
.client-map-filters select {min-width:210px}
.client-map-filters input,.client-map-filters select {height:42px;padding:8px 12px;border:1px solid #ccd6e4;border-radius:8px;color:#24364f;background:#fff;font:inherit}
.client-map-filters button {min-height:42px}
.client-map-stage-legend {display:flex;flex-wrap:wrap;gap:12px 16px;margin-top:20px;font-size:12px;color:#425773}
.client-map-stage-legend span {display:flex;align-items:center;gap:6px}
.client-map-stage-legend i {display:inline-block;width:13px;height:13px;border-radius:3px;border:1px solid #a5afbf;flex-shrink:0}
.client-map-state-row small {display:block;font-size:11px;line-height:1.5;color:#64748b;margin-top:5px;overflow-wrap:anywhere}
.client-map-label [data-map-stage] {font-size:10px}
.client-map-callout {stroke:#91a2b9;stroke-width:1;pointer-events:none;fill:none}
.client-map-canvas {overflow-x:auto}
@media(max-width:600px){.client-map-filters label{min-width:0;flex:1 1 130px}.client-map-filters label:nth-child(3){flex-basis:100%}.client-map-filters select{min-width:0;width:100%}.client-map-filters{padding:14px}.client-map-canvas .client-map-svg{min-width:620px}}

.client-map-pan-hint {display:none}
@media(max-width:600px){.client-map-pan-hint{display:block;font-size:12px;color:#64748b;margin:10px 0 16px}}

@media(max-width:600px){.client-map-filters label:nth-child(4){flex-basis:100%}}
.service-home-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:20px;align-items:start}
.service-home-list{background:#fff;border:1px solid #dfe6f0;border-radius:16px;padding:20px;min-width:0}
.service-home-list>.section-heading{margin:0 0 8px}
.service-home-list>.section-heading h3{margin:0}
.service-home-list>.section-heading strong{padding:5px 10px;border-radius:20px;background:#eaf1fe;color:#245bba}
.service-home-order{display:flex;flex-direction:column;gap:8px;padding:18px 0;border-top:1px solid #e8edf4;color:#52627a;font-size:13px;overflow-wrap:anywhere}
.service-home-order-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#172b47}
.service-home-order-heading button{padding:8px 12px;font-size:12px;flex-shrink:0}
.service-home-client{color:#1d304b;font-size:15px}
.service-home-stage{color:#285bbc;font-weight:600}
.service-home-wait{color:#172b47}
.service-home-order small{color:#7a8a9e}
.service-home-empty{padding:20px 0;color:#6b7c94;font-size:14px;line-height:1.6}
@media(max-width:900px){.service-home-columns{grid-template-columns:minmax(0,1fr)}}
