/* Shared, restrained surfaces. Approved action gradients remain unchanged. */
:root {
  --ux-bg: #14191d;
  --ux-surface: #1d2429;
  --ux-soft: #252d32;
  --ux-text: #edf1f4;
  --ux-muted: #aab6be;
  --ux-border: #37434b;
  --ux-accent: #63b3ff;
  --ux-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --px-bg: var(--ux-bg); --px-bg-soft: var(--ux-bg);
  --px-surface: var(--ux-surface); --px-surface-2: var(--ux-soft);
  --px-text: var(--ux-text); --px-muted: var(--ux-muted);
  --px-border: var(--ux-border); --px-radius: 8px; --px-radius-lg: 8px;
  --bg-1: var(--ux-bg); --bg-2: var(--ux-bg); --bg: var(--ux-bg);
  --panel: var(--ux-surface); --panel-2: var(--ux-soft); --surface: var(--ux-surface);
  --surface-alt: var(--ux-soft); --raised: var(--ux-soft);
  --text: var(--ux-text); --muted: var(--ux-muted); --border: var(--ux-border);
  --radius-md: 8px; --radius-lg: 8px; --radius-xl: 8px;
}
:root[data-theme="light"] {
  --ux-bg: #f5f7f8; --ux-surface: #fff; --ux-soft: #edf1f3;
  --ux-text: #202c33; --ux-muted: #56646e; --ux-border: #cbd4d9; --ux-accent: #1767b0;
  --px-bg: var(--ux-bg); --px-bg-soft: var(--ux-bg);
  --px-surface: var(--ux-surface); --px-surface-2: var(--ux-soft);
  --px-text: var(--ux-text); --px-muted: var(--ux-muted); --px-border: var(--ux-border);
  --bg-1: var(--ux-bg); --bg-2: var(--ux-bg); --bg: var(--ux-bg);
  --panel: var(--ux-surface); --panel-2: var(--ux-soft); --surface: var(--ux-surface);
  --surface-alt: var(--ux-soft); --raised: var(--ux-soft);
  --text: var(--ux-text); --muted: var(--ux-muted); --border: var(--ux-border);
}
html[data-theme] body[data-page], html[data-theme] body[data-sigg-shell] { background: var(--ux-bg) !important; color: var(--ux-text); }
body, body * { font-family: var(--ux-font); letter-spacing: 0; }
body[data-sigg-shell] .sidebar { background: var(--ux-surface) !important; border-right-color: var(--ux-border); box-shadow: none; }
html[data-theme] body[data-sigg-shell] .shell { grid-template-columns: 224px minmax(0, 1fr); }
html[data-theme] body[data-sigg-shell] .sidebar { width: auto; padding: 24px 16px; }
html[data-theme] body[data-sigg-shell] .page { padding: 24px 32px; min-width: 0; }
html[data-theme] body[data-sigg-shell] .brand { padding: 0 0 24px; border-bottom: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] .brand-logo { max-width: 136px; max-height: 38px; }
html[data-theme] body[data-sigg-shell] .brand-tenant { font-size: 12px; font-weight: 500; color: var(--ux-muted); }
html[data-theme] body[data-sigg-shell] .sidebar-icon-action { background: transparent !important; color: var(--ux-text) !important; border: 1px solid var(--ux-border) !important; box-shadow: none !important; }
html[data-theme] body[data-sigg-shell] .nav-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px; border-radius: 6px; }
html[data-theme] body[data-sigg-shell] .nav-link:not([data-page="hub"]) { background: transparent !important; border: 1px solid transparent; box-shadow: none; }
html[data-theme] body[data-sigg-shell] .nav-link:not([data-page="hub"]):is(:hover, .active) { background: var(--ux-soft) !important; border-color: var(--ux-border); }
html[data-theme] body[data-sigg-shell] .nav-link::before { display: none; }
html[data-theme] body[data-sigg-shell] :is(.nav-link-label, .nav-group-label) { font-size: 13px; font-weight: 550; line-height: 1.45; white-space: normal; overflow: visible; text-overflow: clip; }
html[data-theme] body[data-sigg-shell] .nav-group { border: 0; background: transparent; }
html[data-theme] body[data-sigg-shell] .nav-group-title { padding: 12px 10px; background: transparent; border: 0; }
html[data-theme] body[data-sigg-shell] .nav-group-items { gap: 2px; padding: 0 0 0 8px; border-left: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] .nav-group-meta { display: none; }
body[data-sigg-shell] .page-topbar { background: transparent !important; box-shadow: none !important; border: 0; gap: 16px; }
body[data-sigg-shell] .page-title h2 { font-size: 24px; line-height: 1.25; font-weight: 650; }
body[data-sigg-shell] .page-title p { color: var(--ux-muted); }
html[data-theme] body[data-sigg-shell] :is(.module-console, .table-card, .executive-grid > .exec-card, .action-hub, .panel-card, .card-hero, .reception-intake-card, .queue-card, .page > .grid > .card) { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }
html[data-theme] body[data-sigg-shell] .panel-card:not(.agenda-modal-card):not(.task-modal-card) { padding: 16px 0; }
html[data-theme] body[data-sigg-shell] :is(.report-grid, .profile-grid) { gap: 32px; }
html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) { gap: 0; padding: 16px 0; border-block: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) > * { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 8px 20px; border-left: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) > :first-child { border-left: 0; }
html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) :is(strong, .stat-value) { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-theme] body[data-sigg-shell] .user-chip { background: transparent; border: 0; padding: 0; box-shadow: none; }
html[data-theme] body[data-sigg-shell] .module-list { min-width: 0; }
html[data-theme] body[data-sigg-shell] .mini-row { min-width: 0; overflow-wrap: anywhere; border-radius: 8px; }
html[data-theme] body[data-sigg-shell] .code-block { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.6; }
html[data-theme="light"] body[data-sigg-shell] .priority-row.danger { color: #9e2736 !important; background: #fff3f4 !important; border-color: #d77d87 !important; }
html[data-theme="light"] body[data-sigg-shell] .priority-row.warn { color: #694c17 !important; background: #fff9eb !important; border-color: #d6b16e !important; }
html[data-theme] body[data-sigg-shell] .page-topbar { padding: 0 0 20px; margin-bottom: 12px; border-bottom: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] .page-title > p:not(.sub) { display: none; }
body[data-page="hub"] .action-hub { padding: 0; }
body[data-page="hub"] .executive-grid { gap: 24px; }
body[data-page="hub"] .executive-grid > .exec-card { padding: 20px 0; border-top: 1px solid var(--ux-border) !important; }
body[data-page="hub"] .quick-link { border-radius: 8px !important; min-height: 76px; }
body[data-page="hub"] .quick-link strong { font-size: 15px; font-weight: 650; }
body[data-sigg-shell] :is(input, select, textarea) { border-radius: 6px; }
body[data-sigg-shell] :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-height: 42px; }
body[data-page] :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--ux-accent); outline-offset: 3px; }
body[data-page] :is(.section-head, .panel-head, .module-detail-title) h3 { font-size: 17px; font-weight: 650; line-height: 1.4; }
html[data-theme] body[data-sigg-shell] h3 { font-size: 17px; font-weight: 600; line-height: 1.4; }
body[data-page] :is(.form-modal, .agenda-modal-card, .task-modal-card) { border-radius: 8px; }
body[data-page="assistant"] .app-header { background: var(--ux-surface); }
body[data-page="assistant"] h2 { font-size: 24px; }
body[data-page="assistant"] .suggestions button { min-height: 46px; text-align: left; }
.ux-section { padding: 20px 0; border-top: 1px solid var(--ux-border); min-width: 0; }
.ux-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.ux-section-head h3 { font-size: 17px; margin: 0; }
.ux-muted { color: var(--ux-muted); font-size: 13px; line-height: 1.5; }
.ux-icon { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
html:not([data-theme="light"]) .ux-icon { filter: invert(1); }
.ux-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; min-width: 42px; padding: 0; border-radius: 6px; background: transparent; color: var(--ux-text); border: 1px solid var(--ux-border); cursor: pointer; }
.ux-empty { padding: 16px 0; color: var(--ux-muted); line-height: 1.5; }
.ux-daily-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ux-daily-grid section { min-width: 0; }
.ux-daily-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ux-text); text-decoration: none; font-size: 14px; }
.ux-daily-title > span { font-variant-numeric: tabular-nums; color: var(--ux-muted); }
.ux-daily-grid ul { list-style: none; margin: 8px 0; padding: 0; }
.ux-daily-grid li a { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; color: var(--ux-text); border-bottom: 1px solid var(--ux-border); text-decoration: none; overflow-wrap: anywhere; }
.ux-daily-grid li small { color: var(--ux-muted); }
.ux-mobile-nav, .ux-menu-curtain { display: none; }
.ux-toolbar { display: flex; gap: 8px; align-items: center; }
html[data-theme] body .ux-icon-button { background: var(--ux-surface) !important; border: 1px solid var(--ux-border) !important; box-shadow: none !important; }
html[data-theme] body[data-page="hub"] .quick-link { box-shadow: none !important; }
.ux-assistant-panel:not([hidden]) { display: flex; flex-direction: column; position: fixed; inset: 0 0 0 auto; width: 440px; height: 100dvh; z-index: 1800; background: var(--ux-bg); border-left: 1px solid var(--ux-border); }
.ux-assistant-panel > header { display: flex; justify-content: space-between; align-items: center; padding: 12px; gap: 8px; border-bottom: 1px solid var(--ux-border); font-size: 14px; }
.ux-assistant-panel > header > div { display: flex; gap: 2px; }
html[data-theme] body .ux-assistant-panel > header { background: var(--ux-surface) !important; }
html[data-theme] .ux-assistant-panel > header .ux-icon-button { width: 34px; min-width: 34px; height: 36px; border: 0 !important; background: transparent !important; }
@media (min-width: 1200px) { body.ux-assistant-open .shell { margin-right: 440px; } }
@media (max-width: 1199px) { .ux-assistant-panel:not([hidden]) { width: 100%; } body.ux-assistant-open { overflow: hidden; } }
.ux-assistant-panel iframe { flex: 1; min-height: 0; width: 100%; border: 0; }
.assistant-client-context { padding: 8px 0; color: var(--ux-accent); font-size: 13px; border-bottom: 1px solid var(--ux-border); overflow-wrap: anywhere; }
.assistant-embedded .app-header { display: none; }
.assistant-embedded main { padding: 12px; }
.assistant-embedded .welcome { padding: 12px 0; }
.assistant-embedded .welcome-brand { width: 40px; height: 40px; margin-bottom: 10px; }
.assistant-embedded h2 { margin-bottom: 16px; }
.assistant-embedded .suggestions { gap: 8px; }
.assistant-embedded .suggestions button { padding: 10px 12px; }
body[data-page="assistant"] #message:focus-visible { outline: none; }
.record-result-link { display: inline-flex; align-items: center; margin: 12px 0 0; padding: 8px 12px; min-height: 40px; border: 1px solid var(--ux-border); border-radius: 6px; color: var(--ux-accent); text-decoration: none; font-weight: 600; }
.record-result-link:hover { background: var(--ux-soft); }
body[data-page="assistant"] .turn { line-height: 1.65; }
body[data-page="assistant"] .turn.assistant { padding-block: 20px; }
body[data-page="assistant"] .turn.user .turn-text { border-radius: 8px; background: var(--ux-soft); }
body[data-page="assistant"] .turn-label { font-size: 11px; color: var(--ux-muted); }
body[data-page="assistant"] #composer { background: var(--ux-surface); border-radius: 8px; }
body[data-page="assistant"] .connection-row { align-items: flex-start; gap: 12px; padding-bottom: 12px; }
.assistant-embedded #usage-button { font-size: 11px; }
.assistant-embedded .welcome-brand { display: none; }
.assistant-embedded .welcome h2 { font-size: 20px; }
.assistant-embedded .welcome .suggestions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
.assistant-embedded footer { font-size: 11px; }
.ux-table-scroll { max-width: 100%; max-height: 65vh; overflow: auto; overscroll-behavior: contain; }
.ux-data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
html[data-theme] .ux-data-table thead th { position: sticky; top: 0; z-index: 3; background: var(--ux-soft) !important; color: var(--ux-text); border-bottom: 1px solid var(--ux-border); padding: 12px; text-transform: none; }
html[data-theme] .ux-data-table td { padding: 12px; border-bottom: 1px solid var(--ux-border); font-variant-numeric: tabular-nums; }
.ux-cell-value { min-width: 0; }
.ux-cell-value > * { max-width: 100%; }
html[data-theme] .ux-data-table tbody tr:hover > td { background: var(--ux-soft) !important; }
html[data-theme] .ux-data-table .ux-record-row td:first-child { position: sticky; left: 0; z-index: 1; background: var(--ux-surface); }
.ux-data-table th[aria-sort="ascending"], .ux-data-table th[aria-sort="descending"] { color: var(--ux-accent) !important; }
.ux-active-filters { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--ux-muted); font-size: 12px; padding: 8px 0; }
.ux-report-scope { margin: 12px 0; color: var(--ux-muted); line-height: 1.5; font-size: 13px; }
.ux-field-error { display: block; color: #fca5a5; font-size: 12px; line-height: 1.4; margin-top: 4px; }
.ux-draft-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; margin-bottom: 12px; border-bottom: 1px solid var(--ux-border); font-size: 12px; color: var(--ux-muted); }
.ux-draft-status[hidden] { display: none; }
.ux-draft-status button[hidden] { display: none !important; }
.ux-draft-status > span { margin-right: auto; }
html:not([data-theme="light"]) [data-rateio-total].ok { color: #83edba; }
html[data-theme="light"] [data-rateio-total].ok { color: #126343; }
html[data-theme="light"] .ux-field-error { color: #a51c30; }
.alert-row { align-items: center; border-bottom: 1px solid var(--ux-border); }
.ux-search { width: min(620px, calc(100% - 24px)); max-height: min(700px, calc(100dvh - 32px)); padding: 20px; border: 1px solid var(--ux-border); border-radius: 8px; background: var(--ux-surface); color: var(--ux-text); }
.ux-search::backdrop { background: #0009; }
.ux-search input { width: 100%; margin: 8px 0 12px; padding: 12px; border: 1px solid var(--ux-border); background: var(--ux-bg); color: var(--ux-text); }
.ux-search-result { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--ux-border); text-decoration: none; color: var(--ux-text); overflow-wrap: anywhere; }
.ux-search-result :is(small, span) { color: var(--ux-muted); font-size: 12px; }
.ux-schedule { padding: 12px 0; border-block: 1px solid var(--ux-border); margin-bottom: 16px; }
.ux-schedule summary { cursor: pointer; font-weight: 600; }
.ux-timeline { list-style: none; margin: 0; padding: 0; }
.ux-timeline li { border-bottom: 1px solid var(--ux-border); padding: 12px 0; }
.ux-timeline a { display: flex; flex-direction: column; gap: 4px; color: var(--ux-text); text-decoration: none; }
.ux-timeline small { color: var(--ux-muted); }
.ux-timeline li { padding: 16px 0; }
html[data-theme] body.client-workspace-open .page > :is(.module-section, .module-switcher) { display: none !important; }
html[data-theme] .client-workspace { position: static; width: 100%; min-width: 0; }
html[data-theme] body[data-page="clientes"] #cliente-detail { width: 100%; max-width: none; max-height: none; overflow: visible; margin: 0; padding: 12px 0; box-shadow: none; border: 0; background: transparent; }
html[data-theme] #cliente-detail > .panel-head { position: static; background: transparent; padding: 0 0 16px; border: 0; margin: 0; }
html[data-theme] #detail-title { font-size: 24px; font-weight: 650; overflow-wrap: anywhere; }
#detail-subtitle { overflow-wrap: anywhere; line-height: 1.5; margin-top: 8px; }
html[data-theme] #detail-summary { display: flex; gap: 16px 28px; flex-wrap: wrap; margin: 0; padding: 12px 0; border-block: 1px solid var(--ux-border); }
html[data-theme] #detail-summary .summary-cell { display: flex; flex-direction: column; gap: 4px; padding: 0; background: transparent; border: 0; border-radius: 0; }
html[data-theme] #detail-summary .summary-cell strong { font-size: 11px; font-weight: 500; color: var(--ux-muted); }
html[data-theme] #detail-summary .summary-cell span { font-size: 14px; font-weight: 550; }
#client-work-actions { padding: 16px 0 8px; gap: 8px; }
html[data-theme] #cliente-detail .tabs { display: flex; gap: 20px; flex-wrap: nowrap; overflow-x: auto; background: transparent; border: 0; border-bottom: 1px solid var(--ux-border); border-radius: 0; padding: 0; margin: 12px 0 24px; }
html[data-theme] #cliente-detail .tab-button { min-height: 44px; flex: 0 0 auto; background: transparent !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; padding: 10px 0; box-shadow: none !important; color: var(--ux-muted) !important; }
html[data-theme] #cliente-detail .tab-button.active { color: var(--ux-text) !important; border-bottom-color: var(--ux-accent) !important; }
html[data-theme] #cliente-detail :is(.mini-row, .form-card) { background: transparent; box-shadow: none; border-radius: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--ux-border); }
html[data-theme] #cliente-detail .mini-row > .muted { font-size: 13px; line-height: 1.5; }
html[data-theme] #cliente-detail .item-metrics { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 0; }
html[data-theme] #cliente-detail .item-metrics > span { background: transparent; border: 0; padding: 0; font-variant-numeric: tabular-nums; }
html[data-theme] #financeiro-panel[data-current-finance="contratos"] > .panel-head { display: none; }
html[data-theme] .service-list-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 8px 0 16px; }
#contrato-form[hidden] { display: none !important; }
#cliente-detail .tab-panel { min-height: 200px; }
#cliente-detail .client-upload { margin-bottom: 20px; }
html[data-theme] body[data-sigg-shell] .flow-options { background: transparent; border: 0; border-block: 1px solid var(--ux-border); border-radius: 0; padding: 12px 0; }
html[data-theme] body[data-sigg-shell] .flow-options > summary { min-height: 32px; align-content: center; color: var(--ux-text); font-size: 13px; }
html[data-theme] body[data-sigg-shell] :is(.agenda-hero, .evolution-hero) { padding: 0 0 16px; min-height: 0; justify-content: flex-end; }
html[data-theme] body[data-sigg-shell] .agenda-calendar-shell { padding-top: 0; }
.agenda-filter-disclosure { margin: 16px 0; }
.agenda-filter-disclosure .agenda-filters { margin: 12px 0; }
html[data-theme] body[data-sigg-shell] .report-workspace > .panel-card:first-child { padding-top: 0; }
html[data-theme] body[data-sigg-shell] .report-workspace > .panel-card:first-child > .panel-head { display: none; }
html[data-theme] body[data-sigg-shell] .help-card { background: transparent; border: 0; border-radius: 0; padding: 12px 0; }
html[data-theme] body[data-sigg-shell] :is(.task-column, .kanban-column) { background: transparent; border: 0; border-top: 2px solid var(--ux-border); border-radius: 0; padding: 12px 0; }
html[data-theme] body[data-sigg-shell] .kanban-column.drop-ready { background: var(--ux-soft); border-color: var(--ux-accent); }
html[data-theme] body[data-sigg-shell] :is(.card-hero, .reception-intake-card, .queue-card) { padding: 16px 0; }
html[data-theme] body[data-sigg-shell] :is(.card-hero, .reception-intake-card, .queue-card) h2 { font-size: 18px; font-weight: 650; }
html[data-theme] body[data-sigg-shell] :is(button, .button-link, .btn) { border-radius: 6px; font-weight: 550; box-shadow: none; }
html[data-theme] body[data-sigg-shell] :is(.small, .muted, label, .flow-section-title strong) { font-weight: 450; }
html[data-theme] body[data-page="recepcao"] .container > .grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; }
html[data-theme] body[data-page="recepcao"] .flow-section { border: 0; border-top: 1px solid var(--ux-border); padding: 20px 0; margin: 0; }
html[data-theme] body[data-page="recepcao"] .flow-section::before { display: none; }
html[data-theme] body[data-page="recepcao"] .flow-section-title { margin-bottom: 16px; }
html[data-theme] body[data-page="recepcao"] .flow-section-title strong { font-weight: 650; font-size: 14px; }
html[data-theme] body[data-page="recepcao"] .history-card { background: transparent !important; border: 0; border-top: 1px solid var(--ux-border); border-radius: 0; box-shadow: none !important; padding: 20px 0; }
html[data-theme] body[data-page="recepcao"] .queue-card .chip { display: none; }
html[data-theme] body[data-page="recepcao"] .aux-card { background: transparent !important; box-shadow: none !important; border-radius: 0; border: 0; border-top: 1px solid var(--ux-border); padding: 16px 0; }
html[data-theme] body[data-sigg-shell] :is(#btnCadastrar, #client-new-service, #btn-novo-evento, #btn-nova-tarefa, #btn-novo-contrato-modal) { background: linear-gradient(120deg, #1267b0, #20755c) !important; color: #fff !important; border: 1px solid #69c99d !important; box-shadow: none !important; }
html[data-theme] body[data-page="usuarios"] .container > .grid > .card { background: transparent !important; border: 0; border-radius: 0; padding: 16px 0; box-shadow: none !important; }
html[data-theme] body[data-sigg-shell] :is(.ux-modal, .agenda-modal, .task-modal) .panel-card { background: var(--ux-surface) !important; padding: 24px; border-radius: 8px !important; }
.ux-schedule ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 32px; padding-left: 24px; max-height: 220px; overflow-y: auto; }
body[data-page="clientes"] #service-flow-review { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) {
  html[data-theme] body[data-page="recepcao"] .container > .grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  html[data-theme] body[data-sigg-shell] .shell { display: block; min-width: 0; }
  html[data-theme] body[data-sigg-shell] .sidebar { display: none; }
  html[data-theme] body.ux-menu-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; width: min(310px, 85%); height: 100dvh; z-index: 1201; overflow-y: auto; }
  .ux-menu-curtain:not([hidden]) { display: block; position: fixed; inset: 0; background: #0009; border: 0; border-radius: 0; z-index: 1200; }
  body.ux-menu-open { overflow: hidden; }
  .ux-mobile-nav { display: flex; position: fixed; inset: auto 0 0; padding: 4px 12px max(4px, env(safe-area-inset-bottom)); background: var(--ux-surface); border-top: 1px solid var(--ux-border); z-index: 900; justify-content: space-around; }
  .ux-mobile-nav :is(a, button) { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px; color: var(--ux-text); background: transparent !important; border: 0; text-decoration: none; font-size: 11px; }
  body.ux-keyboard .ux-mobile-nav { display: none; }
  html[data-theme] body[data-sigg-shell] .page { padding-bottom: calc(84px + env(safe-area-inset-bottom)); min-width: 0; }
  body[data-page] :is(.form-grid, .flow-step-grid, .form-row, .filters-grid) { grid-template-columns: minmax(0, 1fr); }
  body[data-page] :is(.form-modal, .agenda-modal-card, .task-modal-card) { max-height: var(--ux-vh, 100dvh); }
}
@media (max-width: 640px) {
  html[data-theme] body.client-workspace-open .page-topbar { display: none; }
  html[data-theme] #cliente-detail > .panel-head > .actions { display: flex; flex-direction: row; justify-content: space-between; width: 100%; }
  html[data-theme] #cliente-detail > .panel-head > .actions button { width: auto; min-width: 80px; }
  html[data-theme] #client-work-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #client-work-actions > :first-child { grid-column: 1 / -1; }
  html[data-theme] #client-work-actions button { min-width: 0; font-size: 12px; padding-inline: 8px; }
  html[data-theme] #cliente-detail .row-top { gap: 12px; align-items: flex-start; }
  html[data-theme] #cliente-detail .status-pill { white-space: nowrap; flex-shrink: 0; }
  .ux-table-scroll { max-height: none; overflow: visible; }
  .ux-data-table, .ux-data-table tbody, .ux-data-table thead { display: block; min-width: 0 !important; }
  .ux-data-table thead tr { display: flex; flex-wrap: wrap; gap: 2px 8px; padding-bottom: 8px; }
  html[data-theme] .ux-data-table thead th { display: block; position: static; padding: 8px 4px; background: transparent !important; border: 0; font-size: 12px; }
  .ux-data-table .ux-record-row { display: block; border-top: 1px solid var(--ux-border); padding: 10px 0; }
  html[data-theme] .ux-data-table .ux-record-row td { display: grid; grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr); gap: 4px 12px; position: static; min-width: 0 !important; width: auto; max-width: none !important; white-space: normal !important; overflow-wrap: anywhere; border: 0; background: transparent !important; padding: 6px 0; }
  .ux-data-table .ux-record-row td::before { content: attr(data-column); color: var(--ux-muted); font-size: 12px; grid-column: 1; grid-row: 1; }
  .ux-data-table .ux-record-row td > * { grid-column: 2; min-width: 0; }
  body[data-page="clientes"] #service-flow-review { grid-template-columns: minmax(0, 1fr); }
  .ux-daily-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body[data-sigg-shell] .page-title h2 { font-size: 21px; }
  body[data-page] :is(.form-modal, .agenda-modal-card, .task-modal-card) { border-radius: 0; }
  body[data-page] :is(button, .button-link, .nav-link, summary) { min-height: 44px; }
  body[data-page] :is(input, select, textarea) { font-size: 16px; }
  html[data-theme] body[data-sigg-shell] .page { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] body[data-sigg-shell] :is(.stats-grid, .report-kpis) > * { padding: 10px; border: 0; }
  html[data-theme] #detail-title { font-size: 21px; }
  html[data-theme] #cliente-detail .tabs { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page] *, body[data-page] *::before, body[data-page] *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}

/* Workspace finish: neutral surfaces, precise hierarchy and a restrained brand accent. */
body[data-page] { line-height: 1.5; }
.ux-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-theme] body[data-sigg-shell] .ux-modal-card > .panel-head { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ux-border); }
html[data-theme] body[data-sigg-shell] .ux-modal-card > .panel-head p { display: none; }
html[data-theme] body[data-sigg-shell] .ux-modal-card > .panel-head > .actions { width: auto; flex: none; }
html[data-theme] body[data-sigg-shell] #btn-fechar-cliente-modal { width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; background: transparent; }
html[data-theme] body[data-sigg-shell] .page { max-width: 1720px; width: 100%; margin-inline: auto; }
body[data-page] :is(button, a, input, select, textarea) { transition: border-color 120ms ease; }
body[data-page] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { border-color: var(--ux-border); }
body[data-page] :is(input, select, textarea):focus { border-color: var(--ux-accent); }
html[data-theme] body[data-sigg-shell] .nav-link.active:not([data-page="hub"]) { border-left-color: var(--ux-accent); }
body[data-page] :is(button, .button-link):disabled { cursor: not-allowed; }
.ux-priorities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 8px 0 20px; }
.ux-priority { display: flex; gap: 14px; align-items: center; color: var(--ux-text); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--ux-border); min-width: 0; }
.ux-priority-count { font-size: 24px; line-height: 1; min-width: 28px; font-variant-numeric: tabular-nums; color: var(--ux-accent); }
.ux-priority > span:nth-child(2) { flex: 1; min-width: 0; }
.ux-priority strong { display: block; font-size: 14px; font-weight: 600; }
.ux-priority small { display: block; color: var(--ux-muted); margin-top: 4px; overflow-wrap: anywhere; }
.ux-priority:hover { border-bottom-color: var(--ux-accent); }
.ux-priority > img { transform: rotate(45deg); }
.ux-daily-details > summary { color: var(--ux-muted); font-size: 13px; cursor: pointer; padding: 8px 0; }
.ux-daily-details[open] > summary { margin-bottom: 12px; }
.ux-client-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 20px 0; }
.ux-client-highlights:empty { display: none; }
.ux-client-highlight { display: flex; flex-direction: column; gap: 5px; padding: 8px 0 16px; border-bottom: 1px solid var(--ux-border); text-decoration: none; color: var(--ux-text); min-width: 0; overflow-wrap: anywhere; }
.ux-client-highlight > span, .ux-client-highlight > small { font-size: 12px; color: var(--ux-muted); }
.ux-client-highlight > strong { color: var(--ux-text); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ux-record-update { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; margin: 0 0 16px; border-block: 1px solid var(--ux-border); color: var(--ux-muted); font-size: 13px; }
.ux-record-update[hidden] { display: none; }
.ux-record-update button { flex: none; }
.ux-row-expand { display: none; }
body[data-page="assistant"] { height: var(--assistant-vh, 100dvh); }
body[data-page="assistant"] .app-header { border-bottom-color: var(--ux-border); }
body[data-page="assistant"] .turn.assistant { margin-block: 16px 24px; padding-block: 16px; }
.operation-outcome h3 { margin: 0 0 18px; font-size: 20px; line-height: 1.4; font-weight: 650; }
.operation-outcome dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr); gap: 9px 20px; margin: 0; }
.operation-outcome dt { color: var(--ux-muted); font-size: 13px; }
.operation-outcome dd { margin: 0; font-variant-numeric: tabular-nums; }
.operation-outcome p { margin: 16px 0 8px; }
.operation-details { color: var(--ux-muted); font-size: 13px; margin-top: 16px; }
.operation-details > summary { padding: 6px 0; cursor: pointer; }
.operation-details .turn-text { padding-top: 10px; }
.operation-follow-up { border-left: 2px solid var(--ux-accent); padding-left: 14px; }
.report-identity { display: flex; flex-direction: column; gap: 5px; padding: 14px 0; }
.report-identity strong { font-size: 18px; line-height: 1.4; font-weight: 600; }
.report-identity :is(span, small) { color: var(--ux-muted); font-size: 13px; }
.report-section > summary, .report-source-records > summary { padding: 14px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.report-section, .report-source-records { border-top: 1px solid var(--ux-border); margin-top: 16px; }
.report-source-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--ux-border); color: var(--ux-text); text-decoration: none; font-size: 13px; }
.report-source-link > strong { font-weight: 550; color: var(--ux-accent); }
.report-source-link > span:nth-child(2) { color: var(--ux-muted); grid-row: 2; }
.report-source-link > span:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .ux-client-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ux-priorities { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ux-priority { min-height: 76px; }
  .ux-client-highlights { gap: 12px 20px; }
  .ux-client-highlight > strong { font-size: 15px; }
  .ux-row-expand { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; padding: 0; margin-left: 6px; vertical-align: middle; border: 0; background: transparent; color: var(--ux-accent); border-radius: 4px; }
  .ux-row-expand img { transform: rotate(180deg); }
  .ux-row-expand[aria-expanded="true"] img { transform: rotate(0); }
  html[data-theme] .ux-data-table .ux-record-row:not([data-mobile-expanded="true"]) td[data-mobile-secondary] { display: none; }
  .operation-outcome h3 { font-size: 18px; }
  .operation-outcome dl { grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr); gap: 10px; }
  body[data-page="assistant"] .compose-tools :is(.icon-button, .send-button) { min-width: 44px; min-height: 44px; }
  body[data-page="assistant"] #composer { padding: 10px 10px 6px; }
  body[data-page="assistant"] .compose-area { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .report-source-link { grid-template-columns: minmax(0, 1fr) auto; }
}
