:root {
  --linho: #EDE6E0; --creme: #F3EBE8; --rosewood: #906B6B; --rosewood-deep: #7A5757;
  --page: #FBF8F6; --surface: #FFFFFF; --ink: #2F2427; --muted: #6E5F63; --faint: #74666A; /* 4,5:1 ou mais sobre branco, linho claro e creme */
  --accent: #906B6B; --accent-soft: #F3EBE8; --accent-tint: #E9DBD8;
  --line: #EFE6E1; --line-strong: #E3D6D0; --rail: #F8F3F1;
  --negative: #A8524B; --negative-bg: #FBEEEC; --outflow: #A88A86; --focus: #7A5757;
  --shadow-frame: 0 1px 2px rgba(47, 36, 39, .04), 0 18px 48px rgba(47, 36, 39, .07);
  --shadow-card: 0 1px 2px rgba(47, 36, 39, .04), 0 4px 14px rgba(47, 36, 39, .035);
  --radius-card: 20px; --radius-control: 10px;
  --warn-bg: #fbf3e6; --warn-line: #f0dfc3; --warn-ink: #5f3f10;
  --workspace: #F6F1EE; --nav-bg: #69494E; --nav-ink: #FFF8F6; --nav-muted: #E5D2D1;
  --nav-selected: #876368; --nav-line: #946F74;
  --op-success: #3E6A59; --op-success-bg: #EEF5F0;
  --op-info: #456886; --op-info-bg: #EDF3F8;
  --op-warning: #836127; --op-warning-bg: #FAF3E5;
  --chart-1: #906B6B; --chart-2: #568377; --chart-3: #A87843;
  --chart-4: #6787A4; --chart-5: #AD718B; --chart-6: #7D789D;
}
html { scroll-padding-top: 170px; }
body { background: var(--page); }
.recepcao-panel { min-width: 0; }
.recepcao-cabecalho { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.recepcao-cabecalho > div { min-width: 0; flex: 1 1 280px; }
.recepcao-panel h3, .recepcao-panel h4 { margin: 0 0 8px; }
.recepcao-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.recepcao-card { min-width: 0; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.recepcao-identidade { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.recepcao-texto { white-space: pre-wrap; color: var(--ink); line-height: 1.55; }
.recepcao-form, .recepcao-bancada, .recepcao-rascunho { display: grid; gap: 12px; padding: 16px; margin: 16px 0; background: var(--accent-soft); border: 1px solid var(--line-strong); border-radius: 12px; min-width: 0; }
.recepcao-panel textarea { min-height: 100px; resize: vertical; }
.recepcao-panel input, .recepcao-panel select, .recepcao-panel textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
.recepcao-historico { margin-top: 12px; color: var(--muted); font-size: 12px; }
.recepcao-historico ol { max-height: 260px; overflow-y: auto; padding-left: 20px; }
.recepcao-historico li { margin-bottom: 10px; }
@media (max-width: 1100px) { .recepcao-lista { grid-template-columns: minmax(0, 1fr); } }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 3px; }
.app-outer, .app-shell { background: var(--page) !important; }
.app-shell { box-shadow: none !important; }
.screen-header { padding: 24px 28px 18px !important; gap: 18px !important; }
.screen-header input, .screen-header select { background: #fff !important; }
.screen-header h1, .finance-heading h1 { margin: 0; font: 400 30px/1.15 'Marcellus', Georgia, serif; }
.screen-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-link, .sidebar-link-ativo { min-height: 48px; border-radius: 8px; margin: 2px 0; }
.sidebar-link:hover { background: var(--accent-soft); color: var(--ink); }
.sidebar-link-ativo { background: var(--accent-soft); color: var(--accent); }
.sidebar-caption { margin: 14px 14px 8px; font-size: 12px; color: var(--muted); }
.ui-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; min-height: 44px; padding: 10px 16px; font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1.4; }
.ui-button:hover { border-color: var(--accent); background: #fcf9f7; }
.ui-button-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.ui-button-primary:hover { background: #664343; color: #fff; }
.ui-button-danger { color: var(--negative); border-color: #dcb9b3; }
.ui-button-small { padding: 8px 12px; }
.desktop-new { display: none; }
.header-actions, .agenda-tools, .period-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agenda-tools { justify-content: space-between; }
.agenda-tools span { font-size: 12px; color: var(--muted); }
.agenda-tools .ui-button { padding: 6px 12px; min-height: 38px; }
.agenda-empty { text-align: left; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.agenda-empty h2 { font-size: 19px; font-weight: 500; margin: 0 0 8px; }
.agenda-empty p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.payment-actions { flex-wrap: wrap; }
.payment-actions button { min-height: 44px; height: auto !important; padding: 9px !important; min-width: 95px; }
.pending-list { max-height: 440px; overflow-y: auto; padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.finance-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.period-controls label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.period-controls input { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 8px 12px; min-width: 160px; }
.finance-tabs { display: flex; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.finance-tabs button { border: 0; background: transparent; padding: 12px 0; min-height: 44px; color: var(--muted); font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.finance-tabs button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.finance-dashboard { padding: 24px 28px 36px; }
.finance-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.finance-context p { margin: 0; font-size: 15px; font-weight: 600; }
.finance-context p span { color: var(--muted); font-weight: 400; margin-left: 12px; font-size: 12px; }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); background: var(--surface); }
.finance-metric { display: block; text-align: left; border: 0; background: transparent; padding: 22px 20px; color: var(--ink); cursor: pointer; border-right: 1px solid var(--line); min-width: 0; }
.finance-metric:last-child { border-right: 0; }
.finance-metric:hover, .finance-metric[aria-pressed=true] { background: #f3ebe8; }
.metric-label, .metric-value, .metric-note, .metric-link { display: block; }
.metric-label { font-size: 12px; font-weight: 500; margin-bottom: 10px; }
.metric-value { font-size: clamp(20px, 1.75vw, 29px); font-weight: 600; line-height: 1.25; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-note { font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 9px; min-height: 32px; }
.metric-link { font-size: 11px; color: var(--accent); margin-top: 12px; text-decoration: underline; text-underline-offset: 3px; }
.data-note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 8px 0; }
/* Entradas e saídas: busca, filtros, situação e paginação */
.ledger-tools { display: flex; flex-direction: column; gap: 10px; }
.ledger-tools .search-field { min-width: 0; flex: none; min-height: 44px; }
.ledger-tools .filter-buttons { margin-bottom: 0; }
.ledger-summary { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ledger-empty { background: #fff; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 18px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ledger-status { font-size: 11px; letter-spacing: .06em; border-radius: 8px; padding: 2px 7px; font-weight: 600; color: #664343; background: #f3ebe8; white-space: nowrap; }
.ledger-status[data-situacao=a-confirmar] { color: #7a4d10; background: #fbf0de; }
.ledger-status[data-situacao=a-receber] { color: #9a3b34; background: #f8e5e3; }
.ledger-status[data-situacao=cancelado], .ledger-status[data-situacao=remarcado] { color: #5c4b4c; background: #eeeae7; }
.ledger-pages { justify-content: center; font-size: 13px; color: var(--muted); padding: 6px 0; }
.ledger-tab { flex: 1; min-height: 40px; border-radius: 10px; cursor: pointer; font-size: 13px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); }
.ledger-tab[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.comparison-note { padding: 6px 0 14px; }
.finance-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; margin-bottom: 20px; }
.finance-secondary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.finance-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.panel-heading { margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.panel-heading p { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.chart-legend { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend span::before { content: ''; width: 20px; border-top: 3px solid var(--accent); }
.chart-legend .legend-out::before { border-color: var(--outflow); border-top-style: dashed; }
.cash-chart { width: 100%; height: auto; min-height: 180px; display: block; margin: 20px 0 0; }
.mobile-cash-summary { display: none; }
.mobile-cash-week { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.mobile-cash-week > strong { font-size: 11px; color: var(--muted); font-weight: 500; }
.mobile-cash-week span { display: flex; justify-content: space-between; gap: 8px; }
.mobile-cash-week b { font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-grid { stroke: #e8e1dc; stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 12px; font-family: 'Manrope', sans-serif; }
.chart-data { border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; }
summary { cursor: pointer; min-height: 32px; padding: 6px 0; color: var(--accent); }
.chart-data .table-scroll { max-height: 300px; }
.attention-panel { background: #f3ebe8; border-color: #e3d6d0; }
.attention-label { display: block; font-size: 12px; color: var(--muted); }
.attention-value { display: block; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 8px 0; letter-spacing: -.04em; overflow-wrap: anywhere; }
.attention-panel > .ui-button { margin: 12px 0 18px; width: 100%; }
.attention-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #e0d0ca; font-size: 12px; }
.attention-row strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.attention-note { border-top: 1px solid #e0d0ca; padding-top: 12px; }
.ranking { display: flex; flex-direction: column; gap: 12px; }
/* Estoque: localizar, destaques e ajustes com motivo */
.stock-find { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 10px; align-items: end; }
.stock-find .search-field { min-height: 44px; }
.stock-category { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.stock-category select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; }
.stock-filters { margin-bottom: 0; }
.stock-expiry { font-size: 12px; font-weight: 600; color: var(--muted); }
.stock-expiry[data-situacao=vence-logo] { color: #7a4d10; }
.stock-expiry[data-situacao=vencido] { color: #9a3b34; }
.stock-noyear { font-size: 11px; color: #7a4d10; background: #fbf0de; border-radius: 8px; padding: 3px 8px; align-self: flex-start; }
.stock-diff { font-size: 13px; font-weight: 600; color: var(--accent); min-height: 18px; }
@media (max-width: 767px) { .stock-find { grid-template-columns: minmax(0, 1fr); } }
.ranking-button { background: transparent; border: 0; padding: 4px 0 8px; cursor: pointer; text-align: left; color: var(--ink); width: 100%; border-radius: 4px; }
.ranking-button:hover { background: #faf6f3; }
.ranking-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 12px; }
.ranking-label { overflow-wrap: anywhere; }
.ranking-row strong { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-track { display: block; height: 5px; background: #eee7e2; border-radius: 2px; grid-column: 1 / -1; }
.ranking-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.ranking-fill.negative { background: var(--negative); }
.empty-inline { font-size: 13px; color: var(--muted); padding: 18px 0; }
.records-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.filter-buttons { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.ui-filter { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); min-height: 36px; padding: 8px 12px; font-size: 11px; cursor: pointer; }
.ui-filter[aria-pressed=true] { background: var(--accent-soft); border-color: #997676; color: var(--accent); font-weight: 600; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.finance-panel table { width: 100%; border-collapse: collapse; font-size: 12px; }
.finance-panel th { text-align: left; color: var(--muted); font-weight: 500; }
.finance-panel th, .finance-panel td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.finance-panel thead { background: #faf8f6; }
.finance-panel tbody tr:hover { background: #fdfaf8; }
.finance-table { min-width: 630px; }
.finance-table td:first-child { white-space: nowrap; }
.record-description { min-width: 160px; max-width: 340px; overflow-wrap: anywhere; }
.record-description strong { display: block; font-weight: 500; }
.record-description span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.record-value, .finance-panel td:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.record-value, .finance-table th:nth-child(4) { text-align: right; }
.status-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 1.45; padding: 3px 10px; border-radius: 999px; background: #f1e8e6; color: var(--accent); }
.status-warning { background: #fbf0de; color: #8a5a14; }
.records-footer { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 12px; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 12px; }
.finance-method { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 20px; }
.finance-method p { max-width: 90ch; }
.finance-empty { padding: 30px 0; font-size: 13px; color: var(--muted); }
.finance-empty h3 { font-size: 18px; font-weight: 500; color: var(--ink); }
.finance-settings { margin: 0 28px 28px; padding: 18px 22px; border-top: 1px solid var(--line); font-size: 13px; }
.finance-settings input { margin: 12px; width: 120px; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.save-status { padding: 10px 28px; background: #f3ebe8; font-size: 12px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.save-error { background: #fbeeed; color: var(--negative); border-bottom: 1px solid #e2bfba; }
.load-state { margin: 32px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.load-state h2 { font-size: 22px; font-weight: 500; }
.dialog-overlay { padding: 16px; }
.dialog-overlay > div { box-shadow: 0 18px 60px rgba(51,39,42,.18); }
.review-dialog { width: 100%; max-width: 460px; padding: 28px; border-radius: 14px; background: #fff; }
/* Relatórios: situação do previsto e nota de cálculo */
.kpi-note { font-size: 12px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.report-method { margin-top: 0; }
.report-method p { margin: 8px 0; }
.review-dialog h2 { margin: 0 0 16px; font-size: 21px; font-weight: 500; }
.review-dialog p { color: var(--muted); line-height: 1.6; font-size: 14px; }
.review-dialog dl { border-block: 1px solid var(--line); padding: 14px 0; margin: 16px 0; }
.review-dialog dt { font-size: 12px; color: var(--muted); margin-top: 8px; }
.review-dialog dd { margin: 4px 0 10px; font-size: 15px; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
/* Redesign Claude Design (set/2026): menu lateral, cabeçalhos, KPIs, aviso e lista da agenda */
body { font-variant-numeric: tabular-nums; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 20px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-mark img { width: 24px; height: 24px; display: block; }
.sidebar-caption { margin: 0 10px 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #73666A; }
.sidebar-link, .sidebar-link-ativo { min-height: 40px; height: 40px; padding: 0 10px; font-size: 14px; color: var(--muted); }
.sidebar-link-ativo { background: #f3eae8; color: #5e3e3e; font-weight: 700; }
.nav-icon { width: 18px; height: 18px; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid #f0eae7; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #f1e8e6; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-button:hover { background: #f6f1ef; }
.ui-button { border-color: var(--line-strong); font-weight: 600; font-size: 13.5px; min-height: 38px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ui-button:hover { border-color: var(--line-strong); background: #f8f4f2; }
.screen-header { background: var(--page) !important; border-bottom: 0 !important; }
.screen-header h1 { color: var(--ink); letter-spacing: -.01em; }
.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
.agenda-header { position: static !important; display: flex; flex-direction: column; gap: 16px; }
.agenda-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.day-stepper { display: flex; height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; overflow: hidden; }
.day-stepper button { border: 0; background: transparent; cursor: pointer; color: var(--ink); min-width: 40px; font-size: 13.5px; font-weight: 600; padding: 0 14px; }
.day-stepper button:first-child, .day-stepper button:last-child { padding: 0; font-size: 18px; color: var(--muted); }
.day-stepper button + button { border-left: 1px solid #efe8e5; }
.day-stepper button:hover { background: #f8f4f2; }
.field { height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13.5px; }
.search-field { flex: 1; min-width: 220px; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 8px; color: #73666A; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13.5px; }
.search-field:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-field input:focus-visible { outline: none !important; }
.agenda-context { font-size: 12px; color: var(--muted); }
.export-menu { position: relative; }
.export-menu summary { list-style: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-list { position: absolute; top: 44px; right: 0; z-index: 10; width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(42,32,36,.12); padding: 6px; display: flex; flex-direction: column; }
.export-list button { text-align: left; padding: 10px; border: 0; background: transparent; border-radius: 6px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.export-list button:hover { background: #f6f1ef; }
.alert-banner { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; overflow: hidden; }
.alert-toggle { width: 100%; min-height: 60px; padding: 12px 16px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; color: var(--warn-ink); }
.alert-icon { width: 32px; height: 32px; border-radius: 50%; background: #f5e2c2; color: #8a5a14; display: flex; align-items: center; justify-content: center; flex: none; }
.alert-action { flex-shrink: 0; height: 34px; padding: 0 14px; border: 1px solid #e6cfa6; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; }
.alert-banner .pending-list { background: #fff; border-top-color: var(--warn-line); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.kpi-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.appt-section { margin: 12px 18px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.appt-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #f0eae7; }
.appt-list-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.appt-list-head span { font-size: 13px; color: var(--muted); }
.appt-card { padding: 14px 20px; border-bottom: 1px solid #f4efed; display: flex; flex-direction: column; gap: 10px; }
.appt-card:hover { background: #fcfaf9; }
.appt-section .agenda-empty { border: 0; border-radius: 0; }
.mobile-only { display: inline-flex; }
.desktop-new { display: none; }
.kpi-wrap { padding: 16px 18px 0; }
.alert-wrap { padding: 16px 18px 0; }

@media (min-width: 768px) {
  .mobile-only { display: none !important; }
  .sidebar { width: 248px !important; flex-basis: 248px !important; padding: 20px 14px !important; height: 100vh; }
  .mobile-bottom-bar { left: 248px !important; }
  .screen-header { padding: 28px 36px 8px !important; }
  .appt-section { margin: 16px 36px 0; }
  .kpi-wrap, .alert-wrap { padding: 16px 36px 0; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .desktop-new { display: inline-flex; }
  .sidebar { width: 236px; flex-basis: 236px; padding: 24px 16px; }
  .desktop-new { display: inline-flex; align-items: center; }
  .mobile-bottom-bar { display: none; }
  .pad-for-mobile-nav { padding-bottom: 36px; }
  .dialog-overlay { align-items: center !important; }
  .dialog-overlay > div { border-radius: 16px !important; max-height: 90vh !important; }
  .screen-body { padding: 24px 36px !important; }
}
@media (min-width: 1600px) { .app-shell { max-width: 1480px; } }
@media (max-width: 1199px) {
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-metric:nth-child(2) { border-right: 0; }
  .finance-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .finance-secondary-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-main-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .app-shell { max-width: none; }
  .screen-header { padding: 18px 16px 14px !important; }
  .screen-header h1 { font-size: 26px; }
  .finance-dashboard { padding: 20px 16px 28px; }
  .finance-context { align-items: flex-start; }
  .finance-context p span { display: block; margin: 4px 0 0; }
  .finance-context .status-pill { max-width: 110px; }
  .finance-metric { padding: 18px 12px; }
  .metric-value { font-size: 22px; }
  .metric-note { min-height: 50px; }
  .finance-panel { padding: 18px 16px; }
  .finance-tabs { gap: 20px; }
  .finance-heading { gap: 16px; }
  .finance-header { position: static !important; }
  .period-controls { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: end; }
  .period-controls > button:last-child { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding-block: 6px; }
  .period-controls label { flex: 1; min-width: 0; }
  .period-controls input { width: 100%; min-width: 0; }
  .finance-settings { margin-inline: 16px; }
  .records-heading { flex-direction: column; margin-bottom: 16px; }
  .cash-chart { display: none; }
  .mobile-cash-summary { display: block; margin-block: 16px; }
  .records-heading .panel-heading { margin-bottom: 0; }
  .records-footer { flex-direction: column; align-items: flex-start; }
  .bottom-nav-links { padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav-links button { min-width: 0; }
  .bottom-nav-links button div { font-size: 11px !important; }
  .dialog-overlay { padding: 0; }
  .review-dialog { margin: 16px; }
  .agenda-empty { padding: 24px 18px; }
}
@media (max-width: 379px) {
  .atd-card-top { flex-wrap: wrap; }
  .atd-card-valor { max-width: none !important; flex-basis: 100% !important; align-items: flex-start !important; text-align: left !important; padding-left: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .mobile-bottom-bar, .filter-buttons, .ui-button, .finance-tabs { display: none !important; }
  .screen-header { position: static !important; }
  .finance-main-grid, .finance-secondary-grid { display: block; }
  .finance-panel { break-inside: avoid; margin-bottom: 16px; }
  .table-scroll { overflow: visible; }
}
.page-title { font: 400 30px/1.15 'Marcellus', Georgia, serif; letter-spacing: -.01em; color: var(--ink); }
@media (max-width: 767px) { .page-title { font-size: 26px; } }
@media (min-width: 768px) { .finance-dashboard { padding: 24px 36px 36px; } .finance-settings { margin-inline: 36px; } }

/* Adaptation of the supplied professional interface; keep operational actions visible. */
.app-outer { font-variant-numeric: tabular-nums; }
.appt-time { font-size: 14px; font-weight: 700; color: var(--ink); padding-top: 3px; }
.appt-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; }
.appt-identity { min-width: 0; overflow-wrap: anywhere; }
.appt-identity button { font-size: 14px !important; font-weight: 600 !important; line-height: 1.5; }
.appt-procedure { grid-column: 2 / -1; grid-row: 2; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.appt-procedure > span, .appt-procedure > small { display: block; }
.appt-procedure small { margin-top: 3px; font-size: 12px; }
.appt-row .atd-card-valor { grid-column: 3; grid-row: 1; max-width: 160px !important; min-width: 0; }
.appt-row .atd-card-valor > div:first-child { font-size: 14px !important; }
.appt-row .atd-card-valor > div:not(:first-child) { letter-spacing: 0 !important; line-height: 1.45; }
.appt-actions { display: flex; gap: 6px; }
.appt-actions button { border-radius: 7px !important; min-height: 40px; font-size: 12px !important; padding-inline: 10px; }
.appt-observation { font-size: 13px; line-height: 1.5; color: var(--muted); padding: 8px 0; overflow-wrap: anywhere; }
.appt-list-head { flex-wrap: wrap; gap: 6px 16px; }
.reports-screen .reports-grid { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 18px !important; }
.report-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; grid-column: 1 / -1; }
.report-kpis .kpi-card { min-width: 0; }
.report-kpis .kpi-value { overflow-wrap: anywhere; }
.report-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 20px; }
.report-facts > div { min-width: 0; flex-direction: column; align-items: flex-start !important; gap: 6px; }
.report-facts > div > div { overflow-wrap: anywhere; }
.report-facts > div > div:first-child { font-size: 12px !important; }
.report-facts > div > div:last-child { font-size: 17px !important; font-weight: 600 !important; }
.report-chart { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.report-chart-title { margin: 0; font: 700 14px/1.5 'Manrope', system-ui, sans-serif; color: var(--ink); }
.report-chart .data-bars { gap: 18px !important; }
.report-chart .data-bar { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px !important; }
.report-chart .data-bar > div:first-child { width: auto !important; min-width: 0; line-height: 1.5; }
.report-chart .data-bar > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; height: 5px !important; border-radius: 2px !important; }
.report-chart .data-bar > div:last-child { grid-column: 2; grid-row: 1; width: auto !important; white-space: nowrap; font-weight: 600; }
.report-exports { grid-column: 1 / -1; }
.report-exports button { border-radius: 8px !important; }
.period-tabs { display: flex; align-self: flex-start; flex-wrap: wrap; gap: 4px; background: #eee7e4; padding: 4px; border-radius: 9px; }
.period-tabs button { flex: 0 1 auto !important; min-width: 80px; padding: 0 16px; background: transparent !important; border: 1px solid transparent !important; border-radius: 6px !important; }
.period-tabs button[aria-pressed=true] { background: #fff !important; border-color: var(--line) !important; }
.finance-summary { gap: 12px; border: 0; background: transparent; }
.finance-metric, .finance-metric:last-child { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--surface); }
.finance-metric:hover, .finance-metric[aria-pressed=true] { border-color: var(--accent); background: #fdf9f7; }
.metric-label { color: var(--muted); font-size: 13px; }
.metric-value { letter-spacing: -.025em; }
.metric-link { text-decoration: none; font-weight: 600; }
.finance-panel { border-radius: 10px; }
.attention-panel { background: #fffaf1; border-color: var(--warn-line); }
.attention-value { color: var(--warn-ink); }
.attention-row, .attention-note { border-color: var(--warn-line); }
.ledger-record { border-radius: 10px !important; padding: 18px !important; }
.ledger-record > div { min-width: 0; }
.ledger-record > div:first-child > div { overflow-wrap: anywhere; }
@media (min-width: 1100px) {
  .appt-card { display: grid; grid-template-columns: minmax(0, 1fr) 182px; align-items: center; gap: 12px 20px; padding: 18px 20px; }
  .appt-row { grid-template-columns: 56px minmax(130px, 1fr) minmax(140px, 1fr) minmax(110px, .65fr); align-items: center; }
  .appt-procedure { grid-column: 3; grid-row: 1; }
  .appt-row .atd-card-valor { grid-column: 4; width: 100%; max-width: none !important; }
  .appt-actions { grid-column: 2; grid-row: 1; }
  .appt-observation { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .reports-screen .reports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger-record { display: grid !important; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 20px !important; }
}
@media (max-width: 1199px) {
  .finance-metric:nth-child(2), .finance-metric:nth-child(-n+2) { border: 1px solid var(--line); }
}
@media (max-width: 767px) {
  .report-chart { padding: 18px 16px; }
  .report-facts { padding-inline: 14px; gap: 0 14px; }
  .period-tabs { align-self: stretch; }
  .period-tabs button { flex: 1 !important; min-width: 0; padding-inline: 8px; }
  .finance-metric { padding: 16px 12px; }
  .metric-value { font-size: 21px; }
  .appt-card { padding: 16px; }
}
@media (max-width: 479px) {
  .appt-row { grid-template-columns: 48px minmax(0, 1fr); }
  .appt-row .atd-card-valor { grid-column: 2; grid-row: 3; max-width: none !important; align-items: flex-start !important; text-align: left !important; padding-left: 0; }
  .appt-procedure { grid-column: 2; }
  .appt-actions { flex-wrap: wrap; }
}
@media print {
  .appt-actions, .report-exports, .period-tabs { display: none !important; }
  .appt-card { display: block; break-inside: avoid; }
  .report-chart { break-inside: avoid; }
}

/* Redesign v2 (set/2026): login com imagem da marca, monograma, cabeçalho e navegação do celular */
.login-page { flex: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.login-hero { position: relative; min-height: 320px; background: #f3ecea url('brand/brand-bg.jpg') center / cover no-repeat; display: flex; align-items: flex-end; padding: 32px 40px; }
.login-hero-caption { font-size: 11px; letter-spacing: .28em; color: #7a5a5a; text-transform: uppercase; }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 22px; }
.login-mark { width: 64px; height: auto; align-self: flex-start; }
.login-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .22em; color: #7a5a5a; }
.login-title { margin: 0; font: 400 34px/1.15 'Marcellus', Georgia, serif; letter-spacing: -.01em; color: var(--ink); }
.login-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.login-input { height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 16px; color: var(--ink); background: #fff; outline: none; }
.login-input:focus, .login-password:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122,82,82,.12); }
.login-password { display: flex; align-items: center; padding: 0 6px 0 14px; }
.login-password input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.login-password input:focus-visible { outline: none !important; }
.login-password button { height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #6E5F63; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.login-password button:hover { background: #f6f1ef; }
.login-submit { height: 48px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-submit:hover { background: #664343; }
.login-foot { padding-top: 18px; border-top: 1px solid #f0eae7; font-size: 12px; color: #73666A; line-height: 1.5; }
.brand-mark { width: 40px; height: auto; background: none; border-radius: 0; }
.mobile-topbar { display: none; }
.week-strip { display: none; }
.fab-row { display: flex; justify-content: flex-end; padding: 0 16px 12px; pointer-events: none; }
.fab { pointer-events: auto; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(122,82,82,.35); cursor: pointer; }
.fab:hover { background: #664343; }
.tab-link { height: 54px; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #6E5F63; font-weight: 500; font-size: 11px; min-width: 0; }
.tab-pill { width: 44px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.tab-link[aria-current=page] { color: #5e3e3e; font-weight: 700; }
.tab-link[aria-current=page] .tab-pill { background: var(--accent-soft); }
@media (max-width: 767px) {
  .login-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: 300px auto; }
  .login-hero { min-height: 300px; padding: 24px; }
  .login-hero-caption { display: none; }
  .login-panel { margin-top: -28px; position: relative; background: #fff; border-radius: 24px 24px 0 0; padding: 28px 24px 32px; justify-content: flex-start; }
  .login-mark { display: none; }
  .login-title { font-size: 28px; }
  .login-input { height: 50px; border-radius: 12px; }
  .login-submit { height: 52px; border-radius: 12px; font-size: 16px; }
  .login-foot { border-top: 0; text-align: center; padding-top: 4px; }
  .agenda-header { background: #fff !important; border-bottom: 1px solid var(--line) !important; padding: 14px 18px 16px !important; gap: 14px; }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; }
  .mobile-topbar img { width: 36px; height: auto; }
  .mobile-topbar .ui-button { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .agenda-header h1 { font-size: 25px; line-height: 1.2; }
  .week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .week-strip button { height: 58px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #4a3c40; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
  .week-strip span { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; }
  .week-strip strong { font-size: 16px; font-weight: 700; }
  .week-strip button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .day-stepper { display: none; }
  .agenda-filters .field { flex: 1; width: auto !important; }
  .pad-for-mobile-nav { padding-bottom: 170px; }
  .bottom-nav-links { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) { .fab-row { display: none; } }

/* Agenda: período da busca, próximos atendimentos e estados do atendimento */
.search-scope { display: flex; gap: 8px; align-items: center; }
.search-scope button[aria-pressed] { flex: 1; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 13px; color: var(--muted); cursor: pointer; }
.search-scope button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.search-clear { width: 44px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 16px; color: var(--muted); cursor: pointer; }
.next-list { margin: 4px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.next-list h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.next-item { display: grid; grid-template-columns: minmax(150px, auto) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink); font-size: 14px; }
.next-item:hover { border-color: var(--line-strong); background: #fcfaf9; }
.next-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.next-name { font-weight: 600; overflow-wrap: anywhere; }
.next-proc { color: var(--muted); overflow-wrap: anywhere; }
.next-none { font-size: 13px; }
.appt-status { font-size: 11px; letter-spacing: .06em; border-radius: 8px; padding: 2px 7px; font-weight: 600; }
.appt-status-warn { color: #7a4d10; background: #fbf0de; }
.appt-delete { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 40px; padding: 0 12px; border: 1px solid #f0d8d8; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 500; color: #9a3b34; cursor: pointer; }
.appt-delete:hover { background: #fdf4f4; }
.appt-delete-text { display: none; }
@media (min-width: 768px) { .appt-delete-text { display: inline; } }
@media (max-width: 767px) { .next-item { grid-template-columns: minmax(0, 1fr); } }

/* Agenda clínica (cores da marca desde o visual v3): a referência visual privilegia a leitura de semana e de
   horário, mas conserva a navegação diária já validada no consultório. */
@media (min-width: 768px) {
  .app-outer:has(.agenda-header) {
    padding: 18px;
    min-height: 100vh;
    background: #EDE6E0 !important;
  }
  .app-outer:has(.agenda-header) .sidebar {
    position: sticky;
    top: 18px;
    height: calc(100vh - 36px);
    min-height: 0;
    border: 0;
    border-radius: 20px 0 0 20px;
    background: #FFFFFF;
    box-shadow: 0 14px 42px rgba(47, 36, 39, .09);
  }
  .app-outer:has(.agenda-header) .app-shell {
    min-height: calc(100vh - 36px) !important;
    border-radius: 0 20px 20px 0;
    overflow: hidden;
    background: #FFFFFF !important;
    box-shadow: 0 14px 42px rgba(47, 36, 39, .09) !important;
  }
  .agenda-header {
    padding: 26px 34px 18px !important;
    gap: 18px;
    background: #FFFFFF !important;
    border-bottom: 1px solid #EFE6E1 !important;
  }
  .agenda-header .page-eyebrow {
    color: #7A6A68;
    font-size: 12px;
  }
  .agenda-header h1 {
    color: #2F2427;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.035em;
  }
  .agenda-header .header-actions { gap: 10px; }
  .agenda-header .ui-button-primary {
    background: #906B6B;
    border-color: #906B6B;
    box-shadow: 0 5px 12px rgba(144, 107, 107, .18);
  }
  .agenda-header .ui-button-primary:hover { background: #7A5757; }
  .week-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    gap: 8px;
    padding: 8px;
    background: #F8F2F0;
    border: 1px solid #EFE6E1;
    border-radius: 14px;
  }
  .week-strip button {
    min-height: 64px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #7A6A68;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: inherit;
  }
  .week-strip button:hover { background: #fff; border-color: #EADFDA; }
  .week-strip span { font-size: 11px; font-weight: 700; letter-spacing: .06em; }
  .week-strip strong { color: #2F2427; font-size: 20px; line-height: 1; }
  .week-strip button[aria-pressed=true] {
    background: #F3EBE8;
    border-color: #E3CFCB;
    box-shadow: 0 2px 8px rgba(144, 107, 107, .08);
  }
  .week-strip button[aria-pressed=true] span,
  .week-strip button[aria-pressed=true] strong { color: #7A5757; }
  .agenda-filters {
    align-items: center;
    padding-top: 2px;
  }
  .agenda-filters .day-stepper,
  .agenda-filters .field,
  .agenda-filters .search-field {
    border-color: #EADFDA;
    background: #fff;
  }
  .agenda-context { color: #7A6A68; }
  .kpi-wrap { padding: 20px 34px 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 240px)); gap: 14px; }
  .kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
    border-color: #EADFDA;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(47, 36, 39, .04);
  }
  .kpi-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #906B6B;
  }
  .kpi-card + .kpi-card::before { background: #A87F86; }
  .kpi-label { color: #7A6A68; }
  .kpi-value { color: #2F2427; font-size: 28px; }
  .appt-section {
    margin: 20px 34px 34px;
    border-color: #EADFDA;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(47, 36, 39, .045);
  }
  .appt-list-head {
    padding: 18px 22px;
    background: #FFFFFF;
    border-bottom-color: #EFE6E1;
  }
  .appt-list-head h2 { color: #2F2427; font-size: 16px; }
  .appt-list-head span { color: #7A6A68; }
  .appt-card {
    position: relative;
    padding: 17px 22px 17px 26px;
    border-bottom-color: #EFE6E1;
  }
  .appt-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #B08A87;
  }
  .appt-card:hover { background: #FBF7F5; }
  .appt-time { color: #906B6B; font-size: 15px; }
  .appt-identity button { color: #2F2427 !important; }
  .appt-procedure { color: #7A6A68; }
  .appt-actions button { border-color: #EADFDA !important; }
  .appt-actions button:hover { background: #F8F2F0 !important; }
}

@media print {
  .app-outer:has(.agenda-header) { padding: 0; background: #fff !important; }
  .app-outer:has(.agenda-header) .app-shell { overflow: visible; border-radius: 0; box-shadow: none !important; min-height: 0 !important; background: #fff !important; }
  .week-strip, .agenda-filters, .search-scope, .export-menu { display: none !important; }
  .appt-section { margin: 12px 0; box-shadow: none; overflow: visible; }
}

/* Contatos, indicadores e acompanhamento das sessões. */
.crm-screen { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.crm-dashboard { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.crm-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.crm-board { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.crm-column { background: #f7f5f4; border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.crm-column h2 { font-size: 13px; margin: 0 0 16px; color: var(--muted); }
.crm-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; overflow-wrap: anywhere; }
.crm-card h3, .crm-session h3 { font-size: 15px; margin: 0; }
.crm-card p { margin: 0; font-size: 12px; line-height: 1.6; }
.crm-card strong { font-size: 14px; }
.crm-history { padding-left: 18px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.crm-return { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.crm-session { padding: 18px 0; border-top: 1px solid var(--line); }
.crm-session > button { margin: 4px 8px 4px 0; }
@media (max-width: 767px) {
  .crm-board { grid-template-columns: minmax(0, 1fr); }
  .crm-dashboard .finance-panel { min-width: 0; }
  .crm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-metrics .kpi-card { padding: 14px; min-width: 0; }
  .crm-metrics .kpi-value { font-size: 20px; overflow-wrap: anywhere; }
}
@media print { .crm-board { display: block; overflow: visible; } .crm-card { break-inside: avoid; } }

/* Tabela e condições */
.price-screen { display: flex; flex-direction: column; gap: 20px; }
.price-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.price-tools .price-field { flex: 1 1 180px; }
.price-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.price-field input, .price-field select, .price-field textarea { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; width: 100%; box-sizing: border-box; }
.price-field textarea { resize: vertical; }
.price-field input:focus-visible, .price-field select:focus-visible, .price-field textarea:focus-visible, .price-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.price-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 12px; }
.price-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.price-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.price-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price-group { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.price-group legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.price-table thead th { color: var(--muted); font-weight: 500; font-size: 12px; background: #faf8f6; }
.price-table tbody th { font-weight: 500; }
.price-table tbody th small { color: var(--muted); font-weight: 400; }
.price-table thead th:nth-child(4) { text-align: right; }
.price-table td:nth-child(4) { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.price-table td:last-child { text-align: right; }
.price-inline { border: 1px solid var(--line-strong); border-radius: 10px; background: #fdfaf8; padding: 18px; margin-bottom: 16px; }
.price-inline h3 { margin: 0; font-size: 15px; font-weight: 600; }
.price-error { color: #9a3b34; background: #fbeeec; border: 1px solid #f0d8d8; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.price-history ul { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.price-link { border-top: 0; padding-bottom: 0; margin-bottom: 0; }
@media (max-width: 640px) {
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .price-table th, .price-table td { border: 0; padding: 0; }
  .price-table tbody th { grid-column: 1 / -1; }
  .price-table td:nth-child(2), .price-table td:nth-child(3) { color: var(--muted); font-size: 13px; }
  .price-table td:nth-child(4) { text-align: left; }
  .price-table td:last-child { grid-column: 2; grid-row: 2 / span 3; align-self: center; }
}

/* Orçamentos */
.orc-tela { padding-bottom: 24px; }
.orc-grid { display: grid; gap: 20px; align-items: start; }
.orc-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 1024px) {
  .orc-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .orc-resumo { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .orc-barra { display: none !important; }
}
.orc-achados, .orc-itens, .orc-opcoes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.orc-achado { width: 100%; min-height: 44px; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; padding: 10px 14px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.orc-achado:hover { background: var(--accent-soft); }
.orc-achado:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.orc-achado strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.orc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.orc-item-nome { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.orc-item-nome span { font-size: 12px; color: var(--muted); }
.orc-item.presente .orc-item-nome strong::after { content: ' · presente'; font-weight: 500; color: var(--accent); }
.orc-qtd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.orc-qtd input { width: 64px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 15px; }
.orc-item-total { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 96px; text-align: right; }
.orc-mais { margin-top: 14px; font-size: 13px; }
.orc-mais summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.orc-totais { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.orc-linha { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.orc-linha dt { color: var(--muted); }
.orc-linha dd { margin: 0; font-variant-numeric: tabular-nums; }
.orc-linha.muted { font-size: 12px; }
.orc-linha.final { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; font-weight: 600; }
.orc-linha.final dt { color: var(--ink); }
.orc-sub { margin: 20px 0 0; font-size: 14px; font-weight: 600; }
.orc-opcoes li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.orc-op-topo { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.orc-op-topo span { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.orc-opcoes p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.orc-acoes { flex-wrap: wrap; }
.orc-barra { position: sticky; bottom: 76px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; font-size: 13px; box-shadow: 0 4px 16px rgba(42, 32, 36, .18); }
.orc-barra strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.orc-barra:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .orc-item { grid-template-columns: minmax(0, 1fr) auto; }
  .orc-item-nome { grid-column: 1 / -1; }
  .orc-item-total { grid-column: 1; text-align: left; }
}

/* Proposta para o paciente (tela e impressão/PDF) */
.orc-lista-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.proposta-overlay { position: fixed; inset: 0; z-index: 60; background: #efe8e4; overflow-y: auto; padding: 16px; }
.proposta-acoes { max-width: 820px; margin: 0 auto 12px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.proposta { max-width: 820px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: 12px; padding: 24px 28px; box-shadow: 0 8px 30px rgba(42, 32, 36, .08); font-size: 13px; }
.proposta + .proposta { margin-top: 12px; }
.proposta-topo { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.proposta-marca { display: flex; align-items: center; gap: 14px; }
.proposta-marca span { font: 400 20px/1.1 'Marcellus', Georgia, serif; color: var(--accent); }
.proposta-logo { width: 36px; height: auto; }
.proposta-id { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.proposta-id strong { font: 400 17px/1.2 'Marcellus', Georgia, serif; }
.proposta-id span { font-size: 12px; color: var(--muted); }
.proposta-para { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 8px; }
.proposta-para span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.proposta-para strong { font: 400 19px/1.2 'Marcellus', Georgia, serif; }
.proposta-itens { width: 100%; border-collapse: collapse; }
.proposta-itens th, .proposta-itens td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.proposta-itens thead th { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.proposta-itens tbody th { font-weight: 500; }
.proposta-itens tbody th small { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; color: var(--muted); }
.proposta-itens td:nth-child(2) { text-align: center; width: 56px; }
.proposta-itens td:last-child, .proposta-itens th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.proposta-cortesia { color: var(--accent); font-weight: 600; }
.proposta-cortesia s { color: var(--muted); font-weight: 400; margin-right: 6px; }
.proposta-totais { margin: 8px 0 0 auto; max-width: 320px; display: flex; flex-direction: column; gap: 3px; }
.proposta-totais div { display: flex; justify-content: space-between; gap: 16px; }
.proposta-totais dt { color: var(--muted); }
.proposta-totais dd { margin: 0; font-variant-numeric: tabular-nums; }
.proposta-totais .final { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-size: 16px; font-weight: 600; }
.proposta-totais .final dt { color: var(--ink); }
.proposta-pagamento h2 { margin: 12px 0 6px; font: 400 15px/1.2 'Marcellus', Georgia, serif; }
.proposta-pagamento ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 5px; }
.proposta-pagamento li { border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; break-inside: avoid; }
.proposta-pagamento li div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.proposta-pagamento li span { font-size: 11px; color: var(--muted); }
.proposta-pagamento li > strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.proposta-rodape { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 12px; }
.proposta-rodape p { margin: 0; }
.orc-sel { width: 18px; height: 18px; margin: 0 10px 0 0; vertical-align: -3px; accent-color: var(--accent); }
.orc-lote { align-items: center; }
.orc-lote .data-note { flex: 1 1 240px; margin: 0; }
/* Várias propostas juntas: versão enxuta, para caber duas ou mais por folha A4. */
@media print, (min-width: 641px) {
  .propostas-lote .proposta { font-size: 11px; padding: 14px 20px; }
  .propostas-lote .proposta-topo { padding-bottom: 5px; }
  .propostas-lote .proposta-logo { width: 24px; }
  .propostas-lote .proposta-marca span { font-size: 15px; }
  .propostas-lote .proposta-id { flex-direction: row; align-items: baseline; gap: 8px; }
  .propostas-lote .proposta-id strong { font-size: 13px; }
  .propostas-lote .proposta-id span { font-size: 10px; }
  .propostas-lote .proposta-para { flex-direction: row; align-items: baseline; gap: 8px; margin: 5px 0 3px; }
  .propostas-lote .proposta-para span { font-size: 9px; }
  .propostas-lote .proposta-para strong { font-size: 14px; }
  .propostas-lote .proposta-itens th, .propostas-lote .proposta-itens td { padding: 2px 6px; }
  .propostas-lote .proposta-itens thead th { font-size: 9px; }
  .propostas-lote .proposta-itens tbody th small { font-size: 9px; margin-top: 0; }
  .propostas-lote .proposta-totais { margin-top: 3px; gap: 0; }
  .propostas-lote .proposta-totais .final { font-size: 12px; padding-top: 2px; }
  .propostas-lote .proposta-pagamento h2 { margin: 5px 0 3px; font-size: 12px; }
  .propostas-lote .proposta-pagamento ul { grid-template-columns: repeat(4, 1fr); gap: 3px; }
  .propostas-lote .proposta-pagamento li { padding: 3px 6px; gap: 0; font-size: 10px; border-radius: 4px; flex-direction: column; justify-content: flex-start; }
  .propostas-lote .proposta-pagamento li span { font-size: 9px; }
  .propostas-lote .proposta-rodape { margin-top: 4px; padding-top: 2px; font-size: 8px; }
}
@media (max-width: 640px) {
  .proposta-overlay { padding: 8px; }
  .proposta { padding: 22px 18px; border-radius: 10px; }
  .proposta-topo { flex-direction: column; align-items: flex-start; }
  .proposta-id { align-items: flex-start; text-align: left; }
}
@media print {
  @page { size: A4; margin: 10mm; }
  body:has(.proposta-overlay) .orc-tela > :not(.proposta-overlay),
  body:has(.proposta-overlay) .screen-header,
  body:has(.proposta-overlay) .sidebar,
  body:has(.proposta-overlay) .mobile-bottom-bar,
  .proposta-acoes { display: none !important; }
  body:has(.proposta-overlay), body :has(.proposta-overlay) { background: #fff !important; box-shadow: none !important; }
  body:has(.proposta-overlay) .pad-for-mobile-nav { padding: 0 !important; }
  .proposta-overlay { position: static; background: none; padding: 0; overflow: visible; }
  .proposta { max-width: none; box-shadow: none; border-radius: 0; padding: 0; break-inside: avoid; }
  /* Várias propostas: uma abaixo da outra, separadas por linha de corte. */
  .propostas-lote .proposta { padding: 0; }
  .propostas-lote .proposta + .proposta { margin-top: 4mm; padding-top: 4mm; border-top: 1px dashed #b9aaa6; }
  .proposta-pagamento li, .proposta-cortesia { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Modelos de protocolo */
.price-screen > .orc-modelos-painel { order: 1; }
.orc-modelos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.orc-modelos li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.orc-modelo-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.orc-modelo-info span { font-size: 12px; color: var(--muted); }
.orc-usar-modelo { margin-bottom: 12px; }

/* Aprovação */
.orc-radios { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.orc-radios legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.orc-radios input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.orc-radios input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.orc-aviso { flex-basis: 100%; margin: 0; }

/* Acompanhamento comercial */
.orc-filtros { margin-bottom: 8px; }
.orc-filtros .price-tools { margin-bottom: 8px; }
.price-table td small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.orc-contato-vencido { color: #9a3b34 !important; font-weight: 600; }
.orc-conversa { margin-top: 12px; }
.orc-conversa .price-field { flex: 1 1 320px; }
.orc-conversas { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.orc-conversas li { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 12px; }
.orc-conversas span { display: block; font-size: 12px; color: var(--muted); }

/* Homônimos: escolha do cadastro do paciente */
.homonimos { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.homonimos p { margin: 0; font-size: 13px; color: #7a5252; font-weight: 600; }
.homonimo { text-align: left; justify-content: flex-start; white-space: normal; }
.homonimo[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* Uma base grande não determina a altura da página do CRM. */
.crm-column { max-height: 520px; overflow-y: auto; overscroll-behavior: contain; }
.crm-views { margin: 8px 0 16px; }
.crm-views button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.crm-base-list { margin: 0; padding: 0; list-style: none; max-height: 520px; overflow-y: auto; overscroll-behavior: contain; }
.crm-base-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.crm-base-identity { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.crm-base-identity span { color: var(--muted); font-size: 12px; }
.crm-base-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-base-actions .ui-button { padding: 8px 10px; font-size: 12px; }
.crm-base-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.crm-base-pagination span { font-size: 13px; }
@media (max-width: 1023px) { .crm-base-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media (max-width: 767px) {
  .crm-column { max-height: 360px; }
  .crm-base-list { max-height: 480px; }
  .crm-base-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .crm-base-actions .ui-button { flex: 1; }
  .crm-base-pagination { gap: 6px; }
}
@media print {
  .crm-column, .crm-base-list { max-height: none; overflow: visible; }
  .crm-views, .crm-base-actions, .crm-base-pagination { display: none; }
}
.orc-aceite { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0 12px; } .orc-aceite legend { font-size: 13px; font-weight: 600; padding: 0 6px; } .orc-estados { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Visual v3 (10/10/2026): painel de trabalho em linho e rosé, no formato da
   referência aprovada (moldura branca arredondada, menu agrupado com
   contadores, barra superior, cartões e quadro). Paleta do manual da marca:
   #EDE6E0 (linho), #F3EBE8 (creme), #906B6B (rosewood, único acento).
   ========================================================================== */

.app-outer { font-family: 'Poppins', system-ui, sans-serif !important; color: var(--ink) !important; }
body { background: var(--linho); }
::selection { background: var(--accent-tint); color: var(--ink); }
input, textarea { caret-color: var(--rosewood); }
* { scrollbar-color: #D9C8C3 transparent; scrollbar-width: thin; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 2px; }

/* Títulos: Poppins semibold, como a referência; Marcellus fica só no nome da marca. */
.screen-header h1, .finance-heading h1, .agenda-header h1, .page-title {
  font: 600 26px/1.2 'Poppins', system-ui, sans-serif !important; letter-spacing: -.02em !important; color: var(--ink) !important;
}
.screen-header p, .finance-heading p { color: var(--muted); font-size: 13.5px; line-height: 1.55; max-width: 62ch; }
.panel-heading h2, .finance-panel h2 { font-weight: 600; letter-spacing: -.01em; color: var(--ink); }

/* Moldura: menu + conteúdo como uma peça branca arredondada sobre o linho. */
@media screen and (min-width: 768px) {
  .app-outer, .app-outer:has(.agenda-header) { padding: 16px !important; min-height: 100vh; background: var(--linho) !important; }
  .app-outer .sidebar, .app-outer:has(.agenda-header) .sidebar {
    position: sticky; top: 16px; align-self: flex-start; height: calc(100vh - 32px) !important; min-height: 0;
    width: 244px !important; flex: 0 0 244px !important; padding: 20px 14px 14px !important; gap: 0;
    background: var(--rail) !important; border: 0 !important; border-right: 1px solid var(--line) !important;
    border-radius: 20px 0 0 20px; box-shadow: var(--shadow-frame); overflow-y: auto;
  }
  .app-outer .app-shell, .app-outer:has(.agenda-header) .app-shell {
    min-height: calc(100vh - 32px) !important; border-radius: 0 20px 20px 0; overflow: clip;
    background: var(--surface) !important; box-shadow: var(--shadow-frame) !important;
  }
  .mobile-bottom-bar { left: 260px !important; }
}
@media (min-width: 1600px) { .app-shell { max-width: 1440px; } }

/* Menu lateral */
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.sidebar-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 5px; object-fit: contain; }
.sidebar-brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-brand-text strong { font: 400 16px/1.15 'Marcellus', Georgia, serif; color: var(--rosewood-deep); letter-spacing: .01em; }
.sidebar-brand-text span { font-size: 11.5px; color: var(--faint); }
.nav-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 10px; }
.nav-group + .nav-group { border-top: 1px solid var(--line); padding-top: 12px; }
.sidebar .sidebar-caption { margin: 0 10px 6px; font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.sidebar .sidebar-link, .sidebar .sidebar-link-ativo {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; min-height: 38px; margin: 0; padding: 0 10px;
  border: 0; border-radius: 9px; background: transparent; color: #5C4B4C; font: 500 13.5px/1 'Poppins', system-ui, sans-serif; text-align: left; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar .sidebar-link:hover { background: #F1E8E5; color: var(--ink); }
.sidebar .sidebar-link-ativo { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(47, 36, 39, .05); }
.sidebar .sidebar-link-ativo .nav-icon { color: var(--rosewood); }
.sidebar .nav-icon { width: 18px; height: 18px; flex-shrink: 0; color: #8A7A77; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 500; color: var(--faint); background: transparent; font-variant-numeric: tabular-nums; }
.nav-count-alerta { color: #fff; background: var(--rosewood); font-weight: 600; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.sidebar-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sidebar-user-text strong { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text span { font-size: 11.5px; color: var(--faint); }
.user-avatar { background: var(--accent-soft); color: var(--rosewood-deep); }

/* Barra superior */
.topbar { display: none; }
@media (min-width: 768px) {
  .topbar { display: flex; align-items: center; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 6; }
}
.topbar-trail { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); min-width: 0; }
.topbar-trail .nav-icon { width: 14px; height: 14px; }
.topbar-trail [aria-current] { color: var(--ink); font-weight: 500; }
.topbar-search { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(320px, 34vw); height: 36px; padding: 0 12px; border-radius: var(--radius-control); background: var(--rail); border: 1px solid var(--line); color: var(--faint); }
.topbar-search:focus-within { border-color: var(--line-strong); background: var(--surface); }
.topbar-search .nav-icon { width: 16px; height: 16px; }
.topbar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.topbar-search input::placeholder { color: var(--faint); }
.topbar-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(47, 36, 39, .12); z-index: 30; }
.topbar-results button { width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; line-height: 1.4; }
.topbar-results button:hover, .topbar-results button:focus-visible { background: var(--accent-soft); }
.topbar-empty { padding: 9px 10px; font-size: 13px; color: var(--muted); }
.topbar-action .nav-icon { width: 16px; height: 16px; }

/* Cabeçalhos de tela: título grande sobre o branco, sem faixa própria. */
.screen-header { background: var(--surface) !important; border-bottom: 0 !important; position: static !important; }
@media (min-width: 768px) { .screen-header, .agenda-header { padding: 26px 32px 10px !important; } }

/* Controles */
.ui-button { min-height: 36px; padding: 7px 14px; border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 13px/1.3 'Poppins', system-ui, sans-serif; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.ui-button:hover { background: #F8F3F1; border-color: var(--line-strong); }
.ui-button-primary, .agenda-header .ui-button-primary { background: var(--rosewood); border-color: var(--rosewood); color: #fff; box-shadow: 0 6px 16px rgba(144, 107, 107, .22); }
.ui-button-primary:hover, .agenda-header .ui-button-primary:hover { background: var(--rosewood-deep); border-color: var(--rosewood-deep); color: #fff; }
.ui-button-danger { color: var(--negative); border-color: #EBCFCB; }
.ui-button-danger:hover { background: var(--negative-bg); }
.ui-button-small { min-height: 32px; padding: 5px 11px; font-size: 12.5px; }
.ui-filter, .finance-tabs button, .filter-buttons .ui-button {
  min-height: 32px; padding: 5px 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); font: 500 13px/1.3 'Poppins', system-ui, sans-serif; cursor: pointer;
}
.ui-filter:hover, .finance-tabs button:hover { color: var(--ink); background: #F6F0EE; }
.ui-filter[aria-pressed="true"], .finance-tabs button[aria-pressed="true"], .filter-buttons .ui-button[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(47, 36, 39, .05); }
.finance-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--rail); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; }
.price-field input, .price-field select, .price-field textarea, .field, .search-field, .orc-qtd input {
  border-color: var(--line-strong) !important; border-radius: var(--radius-control) !important; background: var(--surface); font-family: inherit;
}
.price-field input:focus, .price-field select:focus, .price-field textarea:focus { border-color: var(--rosewood) !important; outline: 0; box-shadow: 0 0 0 3px rgba(144, 107, 107, .14); }
.price-field span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.price-check input, .orc-radios input { accent-color: var(--rosewood); }

/* Cartões e painéis */
.finance-panel, .price-inline, .crm-column, .appt-section {
  border-radius: var(--radius-card) !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-card); background: var(--surface);
}
.finance-dashboard { gap: 20px; }
@media (min-width: 768px) { .finance-dashboard { padding: 18px 32px 36px !important; } }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; background: var(--accent-soft); color: var(--rosewood-deep); }
.status-warning { background: var(--negative-bg); color: var(--negative); }
.data-note { color: var(--muted); }
.price-error { border-radius: var(--radius-control); }

/* Tabelas */
.finance-panel table thead, .price-table thead th { background: var(--rail); }
.finance-panel th, .price-table thead th { font-size: 12px; font-weight: 500; color: var(--faint); }
.finance-panel tbody tr:hover, .price-table tbody tr:hover { background: #FCF9F8; }

/* Celular: barra inferior nas cores da marca. */
.bottom-nav-links { border-top-color: var(--line) !important; }
.tab-link { color: #7A6A68; font-family: 'Poppins', system-ui, sans-serif; }
.tab-link[aria-current=page] { color: var(--ink); }
.tab-link[aria-current=page] .tab-pill { background: var(--accent-soft); color: var(--rosewood-deep); }

@media (prefers-reduced-motion: reduce) { .sidebar .sidebar-link, .ui-button { transition: none; } }
@media print { .topbar { display: none !important; } }

/* Financeiro v3: situação do mês, dois cartões compactos e gráfico acumulado. */
.fin-overview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.5fr); gap: 16px; align-items: stretch; }
.fin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fin-card-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.finance-panel.fin-status, .finance-panel.fin-chart, .finance-panel.fin-mini { padding: 18px 20px; display: flex; flex-direction: column; }
.fin-status-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.fin-overview .finance-metric { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 3px; cursor: pointer; border-radius: 10px; padding: 6px; margin: -6px; min-width: 0; }
.fin-overview .finance-metric:hover { background: var(--rail); }
.fin-overview .finance-metric:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.fin-overview .finance-metric[aria-pressed="true"] { background: var(--accent-soft); }
.fin-overview .metric-label { order: 2; font-size: 12px; color: var(--muted); font-weight: 500; }
.fin-overview .metric-value { order: 1; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-overview .metric-note, .fin-overview .metric-link { display: none; }
.fin-status-vencido { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fin-status-vencido .metric-value { color: var(--negative); }
.fin-status-vencido .metric-note { display: block; order: 3; font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.fin-seg-bar { display: flex; gap: 3px; height: 40px; border-radius: 8px; overflow: hidden; margin-top: auto; }
.fin-seg { min-width: 6px; border-radius: 4px; }
.fin-seg-recebido { background: linear-gradient(180deg, #A37E7E, #906B6B); }
.fin-seg-areceber { background: #E3CFCB; }
.fin-seg-vencido { background: #D9958D; }
.fin-seg-vazio { background: var(--rail); }
.fin-seg-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.fin-seg-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.lg-recebido::before { background: #906B6B; } .lg-areceber::before { background: #E3CFCB; } .lg-vencido::before { background: #D9958D; }
.fin-mini-col { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-width: 0; }
.finance-panel.fin-mini { gap: 10px; justify-content: space-between; }
.fin-mini-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fin-mini-chart { width: 55%; max-width: 150px; height: 34px; }
.fin-delta { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.fin-delta-up { color: #5E7A5A; }
.fin-delta-down { color: var(--negative); }
.fin-chart .cash-chart { width: 100%; height: auto; max-height: 220px; }
.fin-chart .chart-legend { margin: 0; }
.chart-legend .legend-in::before { border-color: #906B6B !important; }
.chart-legend .legend-out::before { border-color: #B79C98 !important; }
.fin-attention { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px !important; }
.fin-attention h2 { margin: 0 0 4px; font-size: 14.5px; }
.fin-attention p { margin: 0; }
.fin-alertas { display: block; margin-bottom: 20px; }
.fin-alertas h2 { margin: 0; font-size: 17px; font-weight: 500; }
.fin-alertas-lista { margin: 0; padding: 0; list-style: none; }
.fin-alerta { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding: 14px 0; }
.fin-alerta-texto { min-width: 0; overflow-wrap: anywhere; }
.fin-alerta h3 { margin: 4px 0; font-size: 14px; font-weight: 500; }
.fin-alerta p { font-size: 12px; color: var(--muted); margin: 0; }
.fin-alerta-tipo { color: var(--op-warning); font-size: 11px; font-weight: 600; }
.fin-alerta[data-gravidade=previsto] .fin-alerta-tipo { color: var(--op-info); }
.fin-alerta[data-gravidade=conferencia] .fin-alerta-tipo { color: var(--accent); }
.fin-alerta-valor { text-align: right; font-variant-numeric: tabular-nums; }
.fin-alerta-valor strong { display: block; font-size: 18px; font-weight: 500; white-space: nowrap; }
.fin-alerta-valor small { color: var(--muted); font-size: 11px; }
.fin-alertas-mais > summary { min-height: 44px; cursor: pointer; padding-block: 10px; }
@media (max-width: 700px) {
  .fin-alerta { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .fin-alerta > button { grid-column: 1 / -1; justify-self: start; }
  .fin-alerta-valor strong { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 1279px) {
  .fin-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .finance-panel.fin-chart { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .fin-overview { grid-template-columns: minmax(0, 1fr); }
  .fin-mini-col { grid-template-rows: none; grid-template-columns: minmax(0, 1fr); }
  .fin-status-nums { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fin-overview .metric-value { font-size: 20px; }
}

/* CRM v3: visão geral do funil, barra de ferramentas e quadro com cartões. */
.crm-overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr); gap: 16px; }
.crm-funil-card, .crm-origem-card { padding: 18px 20px !important; display: flex; flex-direction: column; }
.crm-funil-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.crm-funil-nums strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-funil-nums span { font-size: 12px; color: var(--muted); font-weight: 500; }
.crm-funil-bar { height: 32px; }
.crm-funil-legend { flex-wrap: wrap; gap: 6px 14px; }
.crm-funil-legend span::before { display: none; }
.crm-funil-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.crm-mini { gap: 4px !important; justify-content: center !important; }
.crm-mini .metric-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.crm-mini .metric-value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-origens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.crm-origens li { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.crm-origens li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-origens li i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #B08A87, #906B6B); min-width: 4px; }
.crm-origens li strong { font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crm-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--faint); min-width: 200px; }
.crm-search:focus-within { border-color: var(--rosewood); box-shadow: 0 0 0 3px rgba(144, 107, 107, .14); }
.crm-search input { border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); flex: 1; min-width: 0; }
.crm-retornos { min-height: 36px; font-size: 13px; }
.crm-ic { width: 14px; height: 14px; flex-shrink: 0; }
.crm-search .crm-ic { width: 16px; height: 16px; }
.crm-aviso { margin: 0; padding: 10px 14px; border-radius: var(--radius-control); background: var(--accent-soft); color: var(--rosewood-deep); font-size: 13px; }

.crm-board { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.crm-board .crm-column { background: var(--rail) !important; box-shadow: none !important; border: 1px solid var(--line) !important; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.crm-column-head { display: flex; align-items: center; gap: 8px; margin: 2px 4px 4px !important; font-size: 13.5px !important; font-weight: 600 !important; color: var(--ink) !important; }
.crm-column-head .crm-ic { width: 16px; height: 16px; }
.crm-column-ic { display: inline-flex; }
.crm-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 11.5px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.crm-column-empty { margin: 4px; font-size: 12.5px; color: var(--faint); }
.crm-board .crm-card { margin: 0; padding: 14px; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(47, 36, 39, .04); transition: box-shadow .18s ease, transform .18s ease; }
.crm-board .crm-card:hover { box-shadow: 0 8px 22px rgba(47, 36, 39, .08); transform: translateY(-1px); }
.crm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.crm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; }
.crm-flag-atraso { color: var(--negative); }
.crm-flag-hoje { color: var(--rosewood); }
.crm-board .crm-card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.crm-card-sub { display: flex; align-items: flex-start; gap: 5px; margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.crm-card-sub .crm-ic { margin-top: 2px; color: var(--faint); }
.crm-due { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.crm-due.orc-contato-vencido { border-color: #EBCFCB; background: var(--negative-bg); }
.crm-card-foot { display: flex; align-items: center; gap: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.crm-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--rosewood-deep); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.crm-notes { display: inline-flex; align-items: center; gap: 4px; }
.crm-value { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.crm-etapa { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.crm-etapa::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--tom, var(--rosewood)); }
.crm-table td:last-child .crm-card-actions { justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .crm-board .crm-card { transition: none; } .crm-board .crm-card:hover { transform: none; } }
@media (max-width: 1279px) { .crm-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .crm-origem-card { grid-column: 1 / -1; } }
@media (max-width: 767px) {
  .crm-overview { grid-template-columns: minmax(0, 1fr); }
  .crm-board { grid-template-columns: repeat(6, minmax(240px, 82vw)); scroll-snap-type: x mandatory; }
  .crm-board .crm-column { scroll-snap-align: start; }
  .crm-toolbar-right { width: 100%; }
  .crm-search { flex: 1; min-width: 0; }
}

/* Ajustes da 1ª inspeção (v3). */
.fin-status-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
.fin-status-vencido { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.fin-status-vencido .metric-value { order: 2; font-size: 15px !important; }
.fin-status-vencido .metric-label { order: 1; }
.fin-status-vencido .metric-note { order: 3; flex-basis: 100%; }
.crm-board { grid-template-columns: repeat(6, minmax(168px, 1fr)); }
.finance-panel > h2, .finance-panel .panel-heading h2, .crm-session h3 { font-size: 15px !important; font-weight: 600 !important; letter-spacing: -.01em; }
.topbar-search input:focus-visible, .crm-search input:focus-visible { outline: none !important; }
.topbar-search:focus-within { box-shadow: 0 0 0 3px rgba(144, 107, 107, .14); border-color: var(--rosewood); }
.topbar-search input::-webkit-search-cancel-button, .crm-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.appt-card::before { display: none !important; }

/* CRM da secretária: WhatsApp, valor fechado, repetições e mensagens. */
a.ui-button.crm-wpp { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.crm-value { white-space: nowrap; }
.crm-value-fechado { color: var(--rosewood-deep); }
.crm-rep-list { max-height: none; }
.crm-mensagens > summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.crm-mensagens[open] > summary { margin-bottom: 10px; }
.crm-mensagens textarea { min-height: 72px; }
.price-repeticao .price-form { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Campanhas de promoção (envio um a um pelo WhatsApp). */
.camp-lista .fin-card-head, .camp-fila .fin-card-head { gap: 12px; flex-wrap: wrap; }
.camp-itens { max-height: none; }
.camp-fila .fin-seg-bar { margin: 12px 0 6px; height: 8px; min-height: 0; border-radius: 99px; }
.camp-fila .fin-seg-bar .fin-seg { height: 100%; min-height: 0; }
.camp-atual { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); display: flex; flex-direction: column; gap: 8px; }
.camp-atual h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.camp-previa { margin: 4px 0 8px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; font-size: 14px; line-height: 1.5; color: var(--ink); }
.camp-form textarea { min-height: 110px; }
.camp-publico { display: flex; flex-direction: column; gap: 10px; }
.camp-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.camp-etapas { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-left: 4px; }
.camp-previa-n { font-weight: 600; color: var(--rosewood-deep); }
.camp-fora { margin-top: 14px; }
.camp-fora summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.camp-fora ul { list-style: none; margin: 8px 0 0; padding: 0; }
.camp-fora li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
@media (max-width: 767px) { .camp-atual .price-tools > * { flex: 1 1 100%; } }

/* Bloqueio de promoções por número e telefone compartilhado. */
.camp-compartilhado { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--rosewood-deep); font-size: 13px; }
.crm-promo { grid-column: 1 / -1; display: grid; gap: 6px; }
.crm-promo .data-note { margin: 0; }
.bloq-item { flex-wrap: wrap; align-items: flex-start !important; }
.bloq-item > div:first-child { flex: 1 1 260px; min-width: 0; }
.bloq-hist { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); border: 0 !important; }
.bloq-hist li { display: list-item !important; padding: 2px 0 !important; border: 0 !important; }
.bloq-form, .bloq-novo { display: grid; gap: 8px; width: 100%; margin-top: 8px; }

/* Oportunidades: blocos do editor, interesse e responsável no cartão, outras negociações. */
.crm-bloco-tit { margin: 14px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.crm-board .crm-card .crm-interesse { margin: -4px 0 0; font-size: 12.5px; font-weight: 500; color: var(--rosewood-deep); }
.crm-board .crm-card .crm-resp { margin: 0; font-size: 12px; color: var(--muted); }
.crm-outras { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.crm-outras ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crm-outras li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.crm-outras > .ui-button { justify-self: start; }

/* Repetições: origem do prazo, estado do acompanhamento e ações em linha. */
.rep-origem { font-size: 12px; color: var(--muted); }
.rep-estado { align-self: flex-start; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--rosewood-deep); }
.rep-estado[data-estado="sem-contato"] { background: var(--negative-bg); color: var(--negative); }
.rep-estado[data-estado="agenda"] { background: #EEF2EA; color: #3F5A3B; }
.rep-form { display: grid; gap: 8px; min-width: min(100%, 320px); }
.crm-repeticoes .filter-buttons { margin: 4px 0 10px; }

/* Etapa 5 — celular: barra inferior com Mais, CRM com ações primeiro, alvos de toque e editor. */
.bottom-nav-links { background: #fff; border-top: 1px solid var(--line); }
.tab-link { min-height: 56px; }
.tab-link .nav-icon { width: 20px; height: 20px; }
.nav-mais-fundo { position: fixed; inset: 0; z-index: 60; background: rgba(51, 39, 42, .36); display: flex; align-items: flex-end; justify-content: center; }
.nav-mais { width: 100%; max-width: 440px; background: #fff; border-radius: 20px 20px 0 0; padding: 14px 14px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.nav-mais-tit { margin: 2px 6px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-mais-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: 500 15px 'Poppins', system-ui, sans-serif; color: var(--ink); cursor: pointer; text-align: left; }
.nav-mais-item[aria-current=page] { background: var(--accent-soft); border-color: var(--accent-tint); }
.nav-mais-item:focus-visible, .tab-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.crm-indicadores { margin: 4px 0 12px; }
.crm-indicadores > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; font-size: 14px; list-style-position: inside; }
.crm-indicadores > summary .crm-ind-resumo { font-weight: 500; font-size: 13px; color: var(--muted); }
.crm-indicadores[open] > summary { margin-bottom: 12px; }
.crm-lista-cards { display: none; }
@media (max-width: 767px) {
  .crm-lista-tabela { display: none; }
  .crm-lista-cards { display: grid; gap: 10px; }
  .crm-lista-cards .crm-card { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: grid; gap: 8px; }
  .crm-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .crm-toolbar-right { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .crm-toolbar-right .ui-button-primary { order: -1; }
  .crm-views { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .crm-views button { flex: 0 0 auto; white-space: nowrap; }
  .ui-button-small, .crm-card-actions .ui-button, .crm-card-actions .crm-wpp, .crm-base-actions .ui-button, .pag-acoes .ui-button, .filter-buttons .ui-filter { min-height: 44px; }
  .price-field input, .price-field select, .price-field textarea, .crm-search input { font-size: 16px; }
  .crm-editor-acoes { position: sticky; bottom: 0; z-index: 4; margin: 0 -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .crm-editor-acoes .ui-button { flex: 1; min-height: 48px; }
  .crm-screen .price-field input, .crm-screen .price-field textarea { scroll-margin-bottom: 96px; }
}

/* Etapa 6 — acabamento: legibilidade, foco, ação contextual, estados vazios, menos vazio. */
/* Rótulos de 10px do template (etiquetas, situações) sobem para 11,5px. */
[style*="font-size:10px"], [style*="font-size: 10px"] { font-size: 11.5px !important; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 2px; }
.topbar-salvo { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.topbar-salvo:empty { display: none; }
/* A ação local só some quando a alternativa do cabeçalho está disponível.
   Entre 768 e 1199 px o cabeçalho compacto oculta .topbar-action. */
@media (min-width: 1200px) { .acao-pagina { display: none !important; } }
.estado-vazio { display: grid; gap: 10px; justify-items: start; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }
.estado-vazio p { margin: 0; max-width: 62ch; }
.finance-secondary-grid { align-items: start; }
.finance-panel .data-note, .metric-note, .crm-base-identity span { color: var(--muted); }
.crm-funil-card .fin-card-head { flex-wrap: wrap; row-gap: 6px; }
.crm-funil-card .status-pill { white-space: nowrap; }
.crm-mini .fin-delta { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }

/* Etapa 7 — campanhas: prévia, resultados e histórico. */
.camp-quem ul, .camp-resultados ul, .camp-historico ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.camp-quem li, .camp-historico li { font-size: 13px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line); }
.camp-quem > summary, .camp-resultados > summary, .camp-historico > summary { cursor: pointer; font-weight: 600; margin-top: 12px; }
.camp-resultados li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.camp-resultados li > div:first-child { display: grid; gap: 2px; }
.camp-res-estado { font-size: 12.5px; color: var(--muted); }
.camp-res-fechou { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }

/* Etapa 8 — rotina comercial: tarefas, filtros, tempos e indicadores clicáveis. */
.crm-tarefas { margin-top: 14px; display: grid; gap: 8px; }
.crm-tarefas ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crm-tarefas li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.crm-tarefas li[data-situacao="feita"], .crm-tarefas li[data-situacao="cancelada"] { color: var(--muted); background: var(--page); }
.crm-tarefa-acoes { display: inline-flex; gap: 6px; }
.crm-tarefa-nova { padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.crm-filtros { margin: 0 0 10px; }
.crm-filtros > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.crm-filtros-campos { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding-top: 6px; }
.crm-filtro { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.crm-filtro select, .crm-filtro input { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.crm-num { display: grid; gap: 2px; padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.crm-num:hover, .crm-mini-link:hover, .crm-origem-link:hover { background: var(--accent-soft); }
.crm-mini-link { cursor: pointer; }
.crm-origem-link { padding: 0; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.crm-tempos { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 767px) { .crm-filtro { flex: 1 1 140px; } .crm-filtro select, .crm-filtro input { height: 44px; font-size: 16px; } }
.crm-tarefas > .ui-button { justify-self: start; }

/* Previsto × realizado: situação das saídas, ações de pagamento e campos do formulário. */
.pag-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.pag-acoes .ui-button { min-height: 36px; }
.ledger-status[data-situacao="vencida"] { background: var(--negative-bg); color: var(--negative); }
.ledger-status[data-situacao="anterior"] { background: #FBF0DE; color: #7A4D10; }
.ledger-status[data-situacao="cancelada"] { text-decoration: line-through; }
.fin-pagamento { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: #4A3C40; }
.fin-pagamento select, .fin-pagamento input { height: 50px; padding: 0 12px; border: 1px solid #E3DAD6; border-radius: 12px; background: #FDFAF8; font-size: 15px; color: #2A2024; }
.pag-hist { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
/* Valor já quitado: bloco inteiro dentro do formulário de desconto. */
.orc-quitado { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.orc-quitado > .price-field, .orc-quitado > fieldset { width: 100%; }
.orc-quitado .data-note { margin: 0; }
.proposta-pagamento li > strong small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); text-align: right; }
.tab-variacoes-lista { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; font-size: 12px; }
.tab-variacoes .price-tools { align-items: flex-end; }
/* Plano de tratamento: abas das opções e comparação (lado a lado no
   computador; a grade empilha os cartões no celular). */
.plano-abas { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.plano-aba { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 140px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.plano-aba span { font-size: 12px; color: var(--muted); }
.plano-aba.ativa { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #fdf8f6; }
.plano-aba:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plano-ferramentas { margin-bottom: 12px; }
.plano-comparar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plano-opcao { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plano-opcao.destaque { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plano-opcao h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plano-selo { font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; }
.plano-itens, .plano-condicoes { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.plano-condicoes { color: var(--muted); }
.orc-plano-ref { display: block; color: var(--muted); font-weight: 400; }
/* Apresentação do plano de tratamento: uma folha A4 retrato. Na tela, a folha
   tem a mesma largura útil da impressão (190 mm) para a medição bater com o
   papel; fontes em pt a partir de 9–10 pt; destaque marcado por texto e borda
   (legível em preto e branco). */
.plano-acoes { flex-direction: column; align-items: stretch; gap: 8px; }
.plano-acoes .review-actions { justify-content: flex-end; }
.plano-acoes .data-note { margin: 0; }
.plano-incluir { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; background: #fff; }
.plano-incluir legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.plano-folha { overflow-x: auto; max-width: 820px; margin: 0 auto; }
.pdoc { width: 190mm; margin: 0 auto; background: #fff; color: #1f1a1c; padding: 10mm; box-sizing: content-box; font-size: 9pt; line-height: 1.2; box-shadow: 0 8px 30px rgba(42, 32, 36, .08); }
.pdoc-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 4px; border-bottom: 1px solid #cfc4c0; }
.pdoc-topo .proposta-logo { width: 24px; }
.pdoc-topo .proposta-marca span { font-size: 14pt; }
.pdoc-id { display: flex; align-items: baseline; gap: 8px; }
.pdoc-id strong { font: 400 14pt/1.1 'Marcellus', Georgia, serif; }
.pdoc-id span { font-size: 9pt; color: #5c5256; }
.pdoc-para { margin: 3px 0 0; display: flex; gap: 8px; align-items: baseline; }
.pdoc-para span { font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; color: #5c5256; }
.pdoc-para strong { font: 400 12pt/1.2 'Marcellus', Georgia, serif; }
.pdoc-titulo { margin: 2px 0 1px; font: 400 12pt/1.2 'Marcellus', Georgia, serif; }
.pdoc-descricao, .pdoc-nota { margin: 0 0 2px; }
.pdoc-nota { font-size: 9pt; color: #5c5256; }
.pdoc-opcoes { display: grid; gap: 4mm; margin-top: 4px; align-items: start; }
.pdoc-opcao { border: 1px solid #cfc4c0; border-radius: 4px; padding: 3mm; break-inside: avoid; min-width: 0; overflow-wrap: anywhere; }
.pdoc-opcao.destaque { border: 2px solid #1f1a1c; }
.pdoc-opcao h3 { margin: 0 0 2px; font-size: 11pt; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pdoc-selo { font-size: 9pt; font-weight: 600; border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.pdoc-resumo { margin: 0 0 3px; font-size: 9pt; color: #5c5256; }
.pdoc-itens { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e3dad6; }
.pdoc-itens li { display: flex; justify-content: space-between; gap: 6px; padding: 1px 0; border-bottom: 1px solid #e3dad6; }
.pdoc-itens li span:last-child, .pdoc-totais dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdoc-itens li { font-size: 9pt; line-height: 1.2; padding: 2px 0; align-items: baseline; }
.pdoc-itens li > span:first-child { white-space: normal; }
.pdoc-item-incluso { display: block; width: fit-content; font-size: 9pt; font-weight: 600; color: #1f1a1c; background: #f3ebe8; padding: 0 4px; }
.pdoc-item-valor { font-size: 9pt; white-space: nowrap; }
.pdoc-totais { margin: 3px 0 0; }
.pdoc-totais div { display: flex; justify-content: space-between; gap: 6px; }
.pdoc-totais dt { color: #5c5256; }
.pdoc-totais dd { margin: 0; }
.pdoc-totais .pdoc-final { font-weight: 700; border-top: 1px solid #1f1a1c; margin-top: 1px; padding-top: 1px; }
.pdoc-totais .pdoc-final dt { color: inherit; }
.valor-avulso { background: var(--accent-soft); border: 1px solid var(--line-strong); padding: 5px 7px; }
.valor-avulso dt { color: var(--ink); font-weight: 600; }
.valor-avulso dd { font-weight: 700; font-size: 17px; }
.pdoc-totais .valor-avulso { display: block; margin: 4px 0; padding: 3px 5px; background: #f3ebe8; border-color: #cfc4c0; }
.pdoc-totais .valor-avulso dt { color: #1f1a1c; font-size: 9pt; }
.pdoc-totais .valor-avulso dd { font-size: 14pt; line-height: 1.15; }
.pdoc-totais .valor-protocolo { font-size: 11pt; font-weight: 700; border-top: 1px solid #cfc4c0; padding-top: 2px; }
.pdoc-totais .valor-protocolo dt { color: #1f1a1c; }
.pdoc-totais .valor-sem-presentes { font-weight: 600; border-top: 1px solid #cfc4c0; padding-top: 2px; }
.pdoc-totais .valor-fechado { font-size: 11pt; }
.pdoc-totais .valor-fechado dd { font-size: 14pt; }
.proposta-secao { font-size: 14px; margin: 8px 0 4px; }
.proposta-itens td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.proposta-itens .proposta-cortesia { display: block; white-space: normal; font-size: 11px; }
.pdoc-conds h4 { margin: 4px 0 1px; font-size: 10pt; }
.pdoc-conds ul { list-style: none; margin: 0; padding: 0; }
.pdoc-conds li { display: flex; flex-direction: column; padding: 1px 0; border-bottom: 1px dotted #cfc4c0; break-inside: avoid; }
.pdoc-conds li span { font-size: 9pt; }
.pdoc-conds .pdoc-total { font-weight: 600; font-size: 9pt; }
.pdoc-obs { margin: 3px 0 0; font-size: 9pt; font-style: italic; }
.pdoc-rodape { margin-top: 4px; padding-top: 3px; border-top: 1px solid #cfc4c0; font-size: 9pt; color: #5c5256; display: flex; justify-content: space-between; gap: 8px; }
.pdoc-rodape p { margin: 0; }
@media print {
  .plano-folha { overflow: visible; max-width: none; }
  .pdoc { width: auto; padding: 0; box-shadow: none; }
}
.pdoc-cond-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 9pt; }
.pdoc-cond-topo .pdoc-total { white-space: nowrap; }
.pdoc-conds li { padding: 0; }
@media print {
  /* Propostas e planos: os contêineres do aplicativo não entram na paginação. */
  html:has(.proposta-overlay), body:has(.proposta-overlay), body :has(.proposta-overlay) { background: #fff !important; min-height: 0 !important; height: auto !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; }
  .pdoc-rodape { display: block; }
}
.pdoc-rodape { display: block; }
.pdoc-rodape p { display: inline; }
.pdoc-rodape p + p::before { content: ' · '; }
/* Editor do plano (itens do plano → protocolos → resumo). Cabeçalho fixo no
   topo da área de rolagem; campos rolam para baixo dele ao receber foco. */
.plano-editor { gap: 12px; }
.plano-editor :is(input, select, textarea, button, summary) { scroll-margin-top: 140px; }
.plano-cab { position: sticky; top: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 14px rgba(42, 32, 36, .05); }
.plano-cab-linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plano-cab-titulo { flex: 1 1 160px; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.plano-cab-titulo h2 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plano-situacao { font-size: 12px; color: var(--muted); white-space: nowrap; }
.plano-cab-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plano-cab-paciente .price-field { margin: 0; }
.plano-voltar { color: var(--muted); }
.plano-menu { position: relative; }
.plano-menu > summary { list-style: none; cursor: pointer; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; background: #fff; }
.plano-menu > summary::-webkit-details-marker { display: none; }
.plano-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plano-menu-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 240px; box-shadow: 0 10px 28px rgba(42, 32, 36, .14); }
.plano-detalhes { margin: 0; }
.plano-secao-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.plano-secao-topo h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plano-grupos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plano-grupo > strong { display: block; font-size: 14px; margin-bottom: 2px; }
.plano-grupo > ul { list-style: none; margin: 0; padding: 0; }
.plano-item { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); }
.plano-item-nome { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.plano-item-nome small { color: var(--muted); font-size: 11px; }
.plano-protocolos { display: flex; flex-direction: column; gap: 10px; }
.plano-aba-nova { justify-content: center; align-items: center; border-style: dashed; color: var(--accent); font-weight: 600; }
.plano-comparar-btn { align-self: center; }
.plano-seletor { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 0; background: #fff; }
.plano-seletor legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.plano-seletor-lista { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.plano-vazio { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plano-vazio p { margin: 0; }
.plano-protocolo-acoes { align-items: flex-end; margin: 6px 0; }
.plano-ajustes { margin-top: 6px; }
.plano-resumo { padding: 0; overflow: hidden; }
.plano-resumo-topo { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.plano-resumo.fechado .plano-resumo-topo { border-bottom: 0; }
.plano-resumo-topo:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.plano-resumo-corpo { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.plano-aprovar { align-self: flex-start; }
.orc-grid.sem-resumo { grid-template-columns: minmax(0, 1fr) !important; }
.plano-montando ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plano-montando li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pdoc-plano h3, .pdoc-secao { margin: 3px 0 1px; font-size: 10.5pt; }
.pdoc-avulsos, .pdoc-matriz { width: 100%; border-collapse: collapse; font-size: 9pt; line-height: 1.18; }
.pdoc-avulsos th, .pdoc-avulsos td, .pdoc-matriz th, .pdoc-matriz td { text-align: left; vertical-align: top; border-bottom: 1px solid #ded4cf; padding: 2px 4px; }
.pdoc-avulsos thead th, .pdoc-matriz thead th { background: #f3ebe8; font-weight: 600; border-top: 1px solid #cfc4c0; }
.pdoc-avulsos tbody th { font-weight: 500; overflow-wrap: anywhere; }
.pdoc-avulsos td:nth-child(2) { text-align: center; }
.pdoc-avulsos th:nth-child(2) { width: 12%; text-align: center; }
.pdoc-avulsos .pdoc-avulso-valor { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdoc-avulsos th:last-child, .pdoc-avulsos td:last-child { width: 24%; text-align: right; }
.pdoc-avulsos td > span, .pdoc-avulsos small, .pdoc-matriz small { display: block; }
.pdoc-avulsos small, .pdoc-matriz small { font-size: 9pt; font-weight: 400; color: #5c5256; white-space: normal; }
.pdoc-avulsos strong, .pdoc-matriz strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdoc-avulsos tr, .pdoc-matriz tr { break-inside: avoid; }
.pdoc-matriz { table-layout: fixed; }
.pdoc-matriz th, .pdoc-matriz td { padding-block: 1px; line-height: 1.1; }
.pdoc-matriz tr > th:first-child { width: 25%; }
.pdoc-matriz tbody th { font-weight: 600; }
.pdoc-condicoes-notas { margin: 4px 0 0; font-size: 9pt; line-height: 1.2; color: #5c5256; }
.pdoc .pdoc-opcoes { gap: 2mm; margin-top: 2px; align-items: stretch; }
.pdoc .pdoc-opcao { padding: 1.5mm; display: flex; flex-direction: column; }
.pdoc .pdoc-opcao h3 { font-size: 10pt; }
.pdoc-opcao > .pdoc-totais { margin: auto 0 0; padding-top: 4px; }
.pdoc-opcao .valor-avulso { display: block; margin: 0 0 2px; }
@media (max-width: 640px) {
  .plano-cab { padding: 8px 10px; }
  .plano-cab-acoes { width: 100%; }
  .plano-cab-acoes .ui-button-primary { flex: 1; }
  .plano-item { grid-template-columns: 1fr auto; }
}
/* CRM: visualizações (seletor, chips de filtros, salvar) e lista útil. */
.crm-visoes { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.crm-visoes-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-visao-sel select { height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); max-width: 100%; }
.crm-visao-total { font-size: 13px; color: var(--muted); }
.crm-visao-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.crm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-chips li { display: inline-flex; align-items: center; gap: 2px; background: #f6efec; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.crm-chips li button:not(.ui-button) { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; min-width: 28px; min-height: 28px; border-radius: 999px; color: var(--muted); }
.crm-chips li button:not(.ui-button):focus-visible { outline: 2px solid var(--accent); }
.crm-chips li:last-child { background: none; border: 0; padding: 0; }
.crm-periodo, .crm-colunas { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 8px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.crm-periodo legend, .crm-colunas legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.crm-prazo { display: inline-block; margin-left: 6px; font-size: 12px; white-space: nowrap; color: var(--muted); }
.crm-prazo-hoje { color: var(--accent); font-weight: 600; }
.crm-prazo-atraso { color: #9a3b34; font-weight: 700; }
.crm-prazo-atraso::before { content: '⚠ '; }
.crm-linha-atraso th { box-shadow: inset 3px 0 0 #9a3b34; }
.crm-ultima small { color: var(--muted); }
.crm-ultima, .crm-proxima { font-size: 13px; }
.crm-card-lista { gap: 4px; }
.crm-card-lista h3 { margin: 0; font-size: 15px; }
.crm-card-proxima { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; font-size: 13.5px; }
.crm-card-meta { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 767px) {
  .crm-visao-sel, .crm-visao-sel select { width: 100%; }
  .crm-filtros-campos { gap: 8px; }
}
/* Ficha de relacionamento: painel lateral no computador, tela inteira no
   celular. A lista continua montada por baixo (rolagem e filtros ficam). */
.crm-nome-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.crm-nome-btn:hover { color: var(--accent); }
.crm-nome-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.crm-ficha { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 70; background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(42, 32, 36, .12); overflow-y: auto; padding: 14px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.crm-ficha-topo { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; position: sticky; top: -14px; background: #fff; padding: 4px 0 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.crm-ficha-id h2 { margin: 0; font-size: 18px; }
.crm-ficha-id p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.crm-ficha-acoes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.crm-ficha-fora { margin: 0; }
.crm-ficha-filtro { max-width: 100%; }
.crm-ficha-resumo { margin: 0; display: grid; gap: 6px; }
.crm-ficha-resumo div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 13.5px; }
.crm-ficha-resumo dt { color: var(--muted); }
.crm-ficha-resumo dd { margin: 0; }
.crm-ficha-sec h3 { margin: 4px 0 6px; font-size: 14px; }
.crm-ficha-pend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.crm-ficha-pend li { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.crm-ficha-pend li.atrasada { border-color: #e6c2be; background: #fdf5f4; }
.crm-ficha-pend small { color: var(--muted); }
.crm-tempo { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.crm-tempo li { position: relative; font-size: 13.5px; }
.crm-tempo li::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.crm-tempo li[data-tipo='tarefa']::before, .crm-tempo li[data-tipo='atendimento']::before { border-color: var(--muted); }
.crm-tempo-topo { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.crm-tempo-topo span { font-size: 12px; color: var(--muted); }
.crm-tempo p { margin: 2px 0 0; overflow-wrap: anywhere; }
.crm-tempo-op { color: var(--muted); }
@media (max-width: 767px) {
  .crm-ficha { width: 100vw; border-left: 0; padding: 10px 14px 80px; }
  .crm-ficha-resumo div { grid-template-columns: 1fr; gap: 0; }
}
/* Ficha: formulário rápido, reagendar e correção. */
.crm-ficha-form { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #fffdfc; }
.crm-ficha-form .price-form { margin: 0; }
.crm-sequencias { border-block: 1px solid var(--line); padding-block: 10px; min-width: 0; }
.crm-sequencias > summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 44px; align-content: center; }
.crm-sequencias .ui-button, .crm-sequencias input, .crm-sequencias select, .crm-sequencias summary { min-height: 44px; }
.crm-sequencia { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.crm-sequencia-estado { display: inline-block; margin-left: 8px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 20px; font-size: 12px; color: var(--accent); }
.crm-sequencia-form { margin-block: 10px; }
.crm-sequencia-form .price-form { grid-template-columns: minmax(0, 1fr); }
.crm-sequencia-passos { padding-left: 20px; margin: 0; }
.crm-sequencia-passos li { margin: 10px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.crm-sequencia-passos summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.crm-sequencia-etapa { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; align-items: end; }
.crm-sequencia-etapa > button { grid-column: 1 / -1; justify-self: start; }
.crm-sequencias .price-field, .crm-sequencias input, .crm-sequencias textarea, .crm-sequencias select { min-width: 0; max-width: 100%; width: 100%; }
.crm-sequencias .price-check input { width: auto; flex: 0 0 auto; }
.crm-sequencias summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crm-prioridade-sec { border-block: 1px solid var(--line); padding-block: 10px; min-width: 0; }
.crm-prioridade-sec > summary { min-height: 44px; align-content: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.crm-prioridade-sec summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crm-prioridade-sec .crm-ficha-form { margin-block: 10px; }
.crm-prioridade-sec input, .crm-prioridade-sec select, .crm-prioridade-sec textarea { width: 100%; min-width: 0; max-width: 100%; }
.crm-prioridade-sec .ui-button, .crm-prioridade-sec select { min-height: 44px; }
.crm-prioridade-motivos { padding-left: 20px; font-size: 13px; line-height: 1.6; }
.crm-prioridade-etiqueta { display: inline-block; width: fit-content; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--workspace); color: var(--ink); }
.crm-prioridade-etiqueta[data-nivel='alta'] { background: #fff1e0; border-color: #d7a65d; color: #77500e; }
.crm-prioridade-etiqueta[data-nivel='normal'] { background: #f4edf0; border-color: #b2929a; color: #69494e; }
.crm-prioridade-etiqueta[data-nivel='baixa'], .crm-prioridade-etiqueta[data-nivel='encerrada'] { color: var(--muted); }
.crm-ficha-sugestao { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; }
.crm-reag { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-reag input { height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 8px; font: inherit; }
.crm-ficha-pend .crm-tarefa-acoes { display: inline-flex; gap: 6px; }
.crm-tempo-correcao { font-size: 12px; color: var(--muted); }
.crm-tempo-corrigir { margin-top: 4px; }

/* Operação diária — organização da referência com a identidade da clínica. */

@media screen and (min-width: 768px) {
  .app-outer, .app-outer:has(.agenda-header) { gap: 20px; }
  .app-outer .sidebar, .app-outer:has(.agenda-header) .sidebar { width: 224px !important; flex-basis: 224px !important; border-radius: 22px; border-right: 0 !important; background: var(--nav-bg) !important; box-shadow: none; }
  .app-outer .app-shell, .app-outer:has(.agenda-header) .app-shell { border-radius: 0; background: transparent !important; box-shadow: none !important; }
  .sidebar .sidebar-link-ativo { background: var(--nav-selected); color: var(--nav-ink); box-shadow: inset 3px 0 var(--nav-ink); }
  .sidebar .sidebar-link-ativo .nav-icon { color: white; }
  .sidebar .sidebar-link-ativo .nav-count { background: rgba(255,255,255,.17); color: white; }
  .mobile-bottom-bar { left: 254px !important; }
}
.sidebar .sidebar-caption { text-transform: uppercase; font-size: 10px; letter-spacing: .12em; margin-top: 6px; }
.topbar { gap: 16px; padding: 12px 20px; min-height: 68px; background: transparent; border-bottom: 0; }
.topbar-search { width: min(470px, 40vw); min-width: 0; margin-right: auto; margin-left: 8px; height: 42px; background: var(--surface); }
.topbar-kbd { border: 1px solid var(--line); border-radius: 5px; padding: 2px 4px; font-size: 10px; white-space: nowrap; }
.topbar-results { max-height: min(60vh, 460px); overflow-y: auto; }
.topbar-results button { display: flex; flex-direction: column; gap: 2px; }
.topbar-results small { font-size: 10px; color: var(--muted); }
.topbar-results [aria-selected=true] button { background: var(--accent-soft); }
.topbar-user { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.operacao-page { padding: 20px; display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-bottom: 36px; }
.op-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.op-page-head h1 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -.035em; margin: 5px 0 8px; line-height: 1.2; }
.op-page-head p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.op-eyebrow { font-size: 10px !important; text-transform: uppercase; letter-spacing: .12em; }
.op-panel { padding: 22px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); min-width: 0; box-shadow: 0 4px 18px rgba(47,36,39,.025); }
.op-panel h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.op-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; min-width: 0; }
.op-toolbar h2 { margin-right: auto; }
.op-toolbar-end { justify-content: flex-end; }
.op-field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); min-width: 0; }
.op-field input, .op-field select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 13px/1.4 'Poppins', sans-serif; }
.op-field input::placeholder { color: var(--faint); }
.op-search { flex: 1 1 250px; max-width: 440px; }
.op-indicadores { color: var(--muted); font-size: 12px; }
.op-indicadores summary { cursor: pointer; padding: 4px 0; }
.op-inline-stats { display: flex; flex-wrap: wrap; gap: 20px; padding: 4px 0; }
.op-inline-stats strong { font-size: 13px; color: var(--ink); margin-right: 4px; }
.op-filters, .op-agenda-modes { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 16px; }
.op-filter { border: 1px solid transparent; border-radius: 20px; background: var(--rail); color: var(--muted); min-height: 38px; padding: 7px 13px; font-size: 12px; cursor: pointer; }
.op-filter[aria-pressed=true] { background: var(--rosewood-deep); color: white; }
.op-filter:hover { border-color: var(--rosewood); }
.op-table-wrap { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; }
.op-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; font-variant-numeric: tabular-nums; }
.op-table th { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 14px 10px; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.op-table td { padding: 13px 10px; vertical-align: middle; border-bottom: 1px solid var(--line); color: var(--muted); max-width: 300px; overflow-wrap: anywhere; }
.op-table tbody tr:hover { background: var(--page); }
.pacientes-page .op-table { min-width: 760px; }
.fila-page .op-table { min-width: 820px; }
.op-table .op-email { max-width: 210px; }
.op-link { background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0; text-align: left; font-size: inherit; line-height: 1.5; }
.op-link:hover { color: var(--rosewood-deep); text-decoration: underline; }
.op-person { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.op-person strong { font-size: 12px; font-weight: 500; }
.op-avatar { flex: 0 0 30px; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--creme); color: var(--rosewood-deep); font-size: 10px; }
.op-status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 7px; font-size: 10px; line-height: 1.35; font-weight: 500; color: var(--muted); background: var(--rail); white-space: nowrap; }
.op-status[data-status=fila] { background: var(--op-warning-bg); color: var(--op-warning); }
.op-status[data-status=atendimento] { background: var(--op-info-bg); color: var(--op-info); }
.op-status[data-status=concluido] { background: var(--op-success-bg); color: var(--op-success); }
.op-status[data-status=falta] { background: var(--negative-bg); color: var(--negative); }
.op-status[data-status=desmarcado] { text-decoration: line-through; }
.op-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 18px; color: var(--muted); font-size: 12px; }
.op-pagination > span:first-child { margin-right: auto; }
.op-pagination .op-field { flex-direction: row; align-items: center; }
.op-pagination .op-field select { width: 70px; min-height: 36px; }
.op-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 32px 20px; text-align: center; gap: 8px; }
.op-empty strong { font-size: 14px; font-weight: 500; }
.op-empty p { color: var(--muted); font-size: 12px; max-width: 48ch; line-height: 1.6; margin: 0; }
.op-overlay { position: fixed; inset: 0; z-index: 72; background: rgba(47,36,39,.32); display: flex; justify-content: center; align-items: center; padding: 24px; backdrop-filter: blur(2px); }
.op-dialog, .op-drawer { width: min(620px, 100%); max-height: calc(100dvh - 48px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-frame); display: flex; flex-direction: column; overflow: hidden; }
.op-drawer { position: absolute; right: 16px; top: 16px; bottom: 16px; width: min(560px, calc(100% - 32px)); max-height: none; }
.op-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.op-dialog-head h2 { margin: 0; font-size: 19px; font-weight: 500; }
.op-dialog-body { padding: 24px; overflow-y: auto; min-height: 0; }
.op-dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--page); }
.op-form, .op-stack { display: flex; flex-direction: column; gap: 16px; }
.op-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.op-facts { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; margin: 0; font-size: 12px; }
.op-facts dt { color: var(--muted); } .op-facts dd { margin: 0; overflow-wrap: anywhere; }
.op-consultas, .op-today { list-style: none; padding: 0; margin: 0; }
.op-consultas li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.op-consultas li > strong { flex-basis: 100%; font-size: 13px; font-weight: 500; }
.op-consultas small { color: var(--muted); }
.op-stack h3 { margin-bottom: 0; font-size: 14px; }
.op-tabs { border-bottom: 1px solid var(--line); padding: 0 0 12px; font-size: 13px; }
.op-tabs [aria-current] { border-bottom: 2px solid var(--rosewood); padding-bottom: 12px; }
.op-count { background: var(--accent-soft); color: var(--rosewood-deep); padding: 4px 8px; border-radius: 7px; font-size: 11px; }
.op-row-actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 160px; }
.op-row-menu summary, .op-history summary { cursor: pointer; font-size: 11px; padding: 7px 0; }
.op-row-menu button { display: block; margin: 4px 0; }
.op-history ul { margin: 5px 0; padding-left: 14px; font-size: 11px; }
.op-history small { display: block; margin: 4px 0 12px; }
.op-notice { border-left: 3px solid var(--rosewood); background: var(--accent-soft); padding: 12px; font-size: 12px; line-height: 1.7; }
.op-agenda-modes { padding: 0; }
.op-agenda-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 16px; padding: 8px 20px 28px; min-width: 0; }
.op-calendar { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); align-self: start; display: flex; flex-direction: column; gap: 14px; }
.op-calendar > .ui-button { width: 100%; }
.op-calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 11px; }
.op-calendar-month .ui-button { padding: 4px 9px; min-height: 30px; }
.op-mini-week, .op-mini-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.op-mini-week { font-size: 9px; color: var(--muted); }
.op-mini-day { border: 0; background: none; color: var(--ink); font-size: 11px; border-radius: 9px; height: 30px; cursor: pointer; padding: 0; }
.op-mini-day > span { position: relative; }
.op-mini-day i { width: 3px; height: 3px; position: absolute; bottom: -5px; left: 50%; border-radius: 50%; background: var(--rosewood); }
.op-mini-day[aria-pressed=true] { background: var(--rosewood-deep); color: white; }
.op-mini-day[aria-pressed=true] i { background: white; }
.op-mini-day.op-other-month { color: var(--faint); }
.op-grade-panel { min-width: 0; }
.op-grid-scroll { width: 100%; max-width: 100%; overflow: auto; max-height: calc(100dvh - 275px); min-height: 350px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overscroll-behavior: contain; }
.op-day-grid { display: grid; min-width: 100%; }
.op-grid-corner, .op-grid-prof { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 2px solid var(--accent-tint); padding: 12px; }
.op-grid-corner { font-size: 10px; color: var(--muted); }
.op-grid-prof { display: flex; gap: 8px; align-items: center; border-left: 1px solid var(--line); }
.op-grid-prof strong { font-size: 11px; font-weight: 500; } .op-grid-prof small { display: block; font-size: 10px; color: var(--muted); }
.op-grid-times > div { height: 44px; padding: 7px 10px; font-size: 10px; color: var(--muted); border-bottom: 1px solid var(--line); }
.op-grid-column { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.op-slot { display: block; width: 100%; height: 44px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 10px; text-align: left; padding-left: 8px; }
.op-slot:hover { background: var(--accent-soft); }
.op-slot-blocked { background: repeating-linear-gradient(135deg, var(--rail), var(--rail) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--muted); cursor: default; }
.agenda-event { position: absolute; z-index: 2; padding: 8px; border: 1px solid var(--accent-tint); border-left: 3px solid var(--rosewood); border-radius: 9px; background: var(--accent-soft); color: var(--ink); text-align: left; cursor: pointer; overflow: hidden; }
.agenda-event:hover { border-color: var(--rosewood); }
.agenda-event > span { display: flex; flex-direction: column; gap: 4px; }
.agenda-event strong { font-size: 11px; font-weight: 500; line-height: 1.3; }
.agenda-event span span, .agenda-event small { font-size: 10px; line-height: 1.3; }
.agenda-event .op-status { align-self: start; }
.agenda-event[data-status=concluido] { border-left-color: var(--op-success); background: var(--op-success-bg); }
.op-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.op-kpi { display: flex; text-align: left; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); cursor: pointer; min-height: 174px; }
.op-kpi:hover { border-color: var(--rosewood); }
.op-kpi-content { display: flex; flex-direction: column; width: 100%; gap: 8px; }
.op-kpi-label { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.op-kpi strong { font-size: 32px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; }
.op-kpi small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.op-kpi-link { font-size: 11px; margin-top: auto; padding-top: 14px; }
.op-kpi-featured { background: var(--rosewood-deep); color: white; border-color: var(--rosewood-deep); }
.op-kpi-featured .op-kpi-label, .op-kpi-featured small { color: #F3EBE8; }
.op-attention { display: flex; flex-wrap: wrap; gap: 8px; }
.op-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.op-chart-grid > :only-child { grid-column: 1 / -1; }
.op-chart-value { display: block; font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.op-line-chart { width: 100%; height: 180px; }
.op-line-chart text { fill: var(--muted); font: 10px 'Poppins', sans-serif; }
.op-chart details { font-size: 11px; cursor: pointer; }
.op-masked-chart { height: 180px; display: grid; place-items: center; background: var(--rail); border-radius: 12px; color: var(--muted); font-size: 12px; }
.op-procedures { display: flex; gap: 24px; align-items: center; min-height: 216px; flex-wrap: wrap; }
.op-donut { flex-shrink: 0; width: 160px; height: 160px; border-radius: 50%; padding: 22px; }
.op-donut > span { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--surface); }
.op-donut strong { font-size: 30px; font-weight: 500; } .op-donut small { font-size: 10px; color: var(--muted); }
.op-legend { list-style: none; padding: 0; flex: 1; min-width: 150px; font-size: 11px; max-height: 270px; overflow-y: auto; }
.op-legend li { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.op-legend i { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; } .op-legend span { flex: 1; }
.op-today li { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 16px 0; font-size: 12px; }
.op-today li > div { flex: 1; } .op-today strong { font-weight: 500; } .op-today small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
@media (max-width: 1199px) { .op-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topbar-user > span:first-child { display: none; } .op-chart-grid { grid-template-columns: minmax(0, 1fr); } .op-agenda-layout { grid-template-columns: 190px minmax(0, 1fr); padding-inline: 20px; } }
@media (max-width: 767px) {
  .topbar { display: flex; padding: 12px 16px; gap: 0; border: 0; }
  .topbar-trail, .topbar-user, .topbar-action, .topbar-kbd, .topbar-salvo { display: none; }
  .topbar-search { width: 100%; max-width: none; margin: 0; }
  .operacao-page { padding: 18px 16px 110px; gap: 18px; }
  .op-page-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .op-panel { padding: 16px; border-radius: 16px; }
  .op-toolbar { gap: 10px; } .op-toolbar > h2 { flex-basis: 100%; }
  .op-search { max-width: none; } .op-filter { min-height: 42px; }
  .op-pagination .op-field { display: none; }
  .op-overlay { padding: 0; align-items: flex-end; }
  .op-dialog, .op-drawer { position: relative; inset: auto; width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; }
  .op-dialog-body { padding: 20px; } .op-dialog-head { padding: 16px 20px; } .op-dialog-actions { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .op-field input, .op-field select { font-size: 16px; min-height: 46px; }
  .op-form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .op-form-row .op-field:first-child { grid-column: 1 / -1; }
  .op-agenda-layout { display: flex; flex-direction: column; padding: 12px 16px 100px; }
  .op-calendar { width: 100%; } .op-calendar .op-mini-week, .op-calendar .op-mini-days, .op-calendar-month, .op-calendar > .data-note { display: none; }
  .op-grid-scroll { max-height: 65dvh; } .op-grid-prof { padding: 9px; }
  .op-kpis { gap: 10px; } .op-kpi { padding: 15px; min-height: 170px; border-radius: 16px; }
  .op-kpi-label { font-size: 9px; } .op-kpi strong { font-size: 28px; }
  .op-chart-value { font-size: 26px; } .op-procedures { gap: 16px; } .op-donut { width: 135px; height: 135px; padding: 18px; }
  .op-today li { gap: 10px; flex-wrap: wrap; } .op-today li .ui-button { margin-left: auto; }
  .op-filters { gap: 6px; } .op-facts { grid-template-columns: 85px minmax(0, 1fr); }
}
@media print { .op-overlay, .op-agenda-modes, .op-calendar, .op-pagination { display: none !important; } .operacao-page { padding: 0; } .op-panel { box-shadow: none; break-inside: avoid; } }
.app-shell:has(.op-agenda-layout) .week-strip { display: none; }
.agenda-event-curto .op-status, .agenda-event-curto small { display: none; }

/* Composição da referência: contraste no menu e conteúdo sobre fundo neutro.
   Toda a cor vem dos tokens de tema no início deste arquivo. */
.app-outer:has(.sidebar) { background: var(--workspace) !important; }
.topbar-user > span:first-child { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.topbar-user strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.topbar-user small { font-size: 10px; }
.topbar-trail { font-size: 14px; font-weight: 600; min-width: 70px; }
.topbar-trail [aria-current] { font-weight: 600; }
.topbar-salvo { font-size: 10px; color: var(--muted); }
.topbar-logout, .topbar-mobile-brand { display: none; }
.op-page-head h1 { display: flex; align-items: center; gap: 10px; }
.op-page-head h1 .nav-icon { width: 25px; height: 25px; color: var(--rosewood-deep); }
.op-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.op-kpi-top .nav-icon { width: 23px; height: 23px; opacity: .8; flex-shrink: 0; }
.op-kpi-link { text-align: right; font-weight: 500; }
.op-insights-head { justify-content: space-between; margin: 0; }
.op-insights-head .op-field { flex-direction: row; align-items: center; }
.op-insights-head input { min-height: 34px; padding-block: 4px; }
.op-insights-head .data-note { margin: 0; }
.op-chart .op-toolbar { margin-bottom: 12px; }
.op-chart > .data-note { margin-block: 6px; }
.op-chart > .op-empty { min-height: 180px; }
.op-contexto-comercial { display: grid; gap: 16px; padding: 16px; background: var(--rail); border-radius: 12px; }
.op-contexto-comercial h3 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 0 0 5px; }
.op-contexto-comercial p { font-size: 13px; margin: 0 0 4px; line-height: 1.6; }
.op-contexto-comercial small { color: var(--muted); font-size: 11px; }
.op-base-panel, .op-queue-panel { min-height: 460px; }
.op-indicadores[open] { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.op-indicadores summary { min-height: 28px; list-style-position: inside; }
.op-queue-panel .op-empty { min-height: 260px; }
.pacientes-page .op-table .op-status[data-status=agendado] { background: var(--op-warning-bg); color: var(--op-warning); }
.op-status[data-status=agendado] { background: var(--op-info-bg); color: var(--op-info); }
@media screen and (min-width: 768px) {
  .app-outer:has(.sidebar) { padding: 12px !important; }
  .app-outer .sidebar, .app-outer:has(.agenda-header) .sidebar { top: 12px; height: calc(100dvh - 24px) !important; padding: 22px 12px 14px !important; }
  .app-outer:has(.sidebar) .app-shell { overflow: visible; max-width: none; min-height: calc(100dvh - 24px) !important; }
  .sidebar .sidebar-brand { gap: 10px; padding-bottom: 28px; }
  .sidebar-brand-text strong { color: var(--nav-ink); font-size: 16px; }
  .sidebar-brand-text span { color: var(--nav-muted); font-size: 10px; }
  .sidebar .sidebar-caption { color: var(--nav-muted); font-size: 9px; margin: 8px 10px 10px; }
  .sidebar .sidebar-link, .sidebar .sidebar-link-ativo { min-height: 42px; color: var(--nav-ink); font-size: 12.5px; }
  .sidebar .sidebar-link:hover { background: var(--nav-selected); color: var(--nav-ink); }
  .sidebar .nav-icon { color: var(--nav-muted); }
  .sidebar .nav-count { color: var(--nav-ink); background: transparent; }
  .sidebar .nav-count-alerta { background: var(--nav-selected); }
  .sidebar .nav-group { padding-bottom: 20px; }
  .sidebar .nav-group + .nav-group { border: 0; padding-top: 0; }
  .sidebar-user { border-color: var(--nav-line); }
  .sidebar-user-text strong, .sidebar-user-text span { color: var(--nav-ink); }
  .sidebar-user .icon-button { background: var(--nav-selected); color: var(--nav-ink); border-color: var(--nav-line); }
  .sidebar button:focus-visible { outline-color: var(--nav-ink) !important; }
  .sidebar-user .user-avatar { background: var(--nav-selected); color: var(--nav-ink); }
  .agenda-header { background: transparent !important; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px !important; padding: 16px 20px 8px !important; }
  .agenda-header .page-title-row { grid-column: 1 / -1; }
  .agenda-header .page-eyebrow { display: none; }
  .agenda-header h1 { font-size: 23px !important; }
  .agenda-header .agenda-filters { grid-column: 1; grid-row: 2; margin: 0; min-width: 0; }
  .agenda-header .week-strip { grid-column: 1 / -1; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .agenda-header .op-agenda-modes { grid-column: 2; grid-row: 2; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
  .agenda-header .op-agenda-modes .op-filter { border-radius: 8px; min-height: 32px; padding-block: 5px; }
  .agenda-header .agenda-context, .agenda-header .search-scope { grid-column: 1 / -1; }
  .agenda-header .agenda-context { display: none; }
  .app-shell:has(.op-agenda-layout) .pad-for-mobile-nav { padding-bottom: 0; }
  .op-agenda-layout + * { min-width: 0; }
  .op-calendar { padding: 16px 14px; gap: 16px; }
  .op-grade-panel > .data-note { margin: 0 0 12px; }
  .op-queue-date h2 { margin-right: 0; }
  .op-queue-date .op-count { margin-right: auto; }
  .op-queue-date .op-field { flex-direction: row; align-items: center; }
}
@media (min-width: 1200px) {
  .op-page-head { min-height: 76px; }
  .op-page-head h1 { font-size: 30px; }
  .fila-page .op-page-head > div { display: flex; align-items: center; gap: 16px; }
  .fila-page .op-page-head p { max-width: 48ch; }
  .op-chart-grid { gap: 16px; }
  .op-chart { min-height: 310px; }
  .op-queue-panel { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 16px; row-gap: 14px; align-content: start; }
  .op-queue-panel > .op-toolbar-end, .op-queue-panel > .op-table-wrap, .op-queue-panel > .op-empty { grid-column: 1 / -1; }
  .op-queue-panel > .op-filters { padding: 0; margin: 0; justify-content: flex-end; align-content: center; gap: 3px; }
  .op-queue-panel > .op-filters .op-filter { padding: 6px 9px; font-size: 10px; min-height: 34px; }
  .op-queue-date { gap: 6px; margin: 0; }
  .op-queue-date h2 { font-size: 13px; }
  .op-queue-date .ui-button { padding-inline: 9px; }
  .op-queue-date .op-field { position: relative; }
  .op-queue-date .op-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .op-queue-date input { width: 136px; padding-inline: 6px; font-size: 11px; min-height: 36px; }
  .op-queue-panel .op-toolbar-end { margin: 0; }
}
@media (max-width: 1199px) and (min-width: 768px) {
  .topbar-salvo, .topbar-user > span:first-child { display: none; }
  .topbar-action { display: none; }
  .topbar-search { width: auto; flex: 1; }
  .op-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-procedures { justify-content: center; }
}
@media (max-width: 767px) {
  .app-shell:has(.operacao-page), .app-shell:has(.agenda-header) { background: var(--workspace) !important; }
  .topbar { padding-top: 16px; }
  .topbar-search { flex: 1; width: auto; }
  .topbar-mobile-brand { display: block; width: 30px; height: 36px; object-fit: contain; margin-right: 10px; }
  .topbar-logout { display: inline-flex; min-width: 42px; min-height: 42px; margin-left: 10px; }
  .topbar-trail, .topbar-user { display: none; }
  .op-page-head h1 { font-size: 26px; }
  .op-page-head h1 .nav-icon { width: 22px; height: 22px; }
  .op-kpi { min-height: 170px; padding: 16px; }
  .op-kpi-top { gap: 6px; align-items: flex-start; }
  .op-kpi-top .nav-icon { width: 18px; height: 18px; }
  .op-kpi-link { text-align: left; font-size: 10px; }
  .op-insights-head .data-note { display: none; }
  .op-insights-head .op-field { justify-content: space-between; width: 100%; }
  .op-insights-head input { width: 170px; font-size: 14px; }
  .op-queue-date { display: grid; grid-template-columns: 32px 48px minmax(0, 1fr) 32px; gap: 6px; }
  .op-queue-date h2 { grid-column: 1 / 3; grid-row: 1; margin: 0 0 8px; }
  .op-queue-date .op-count { grid-column: 3 / -1; grid-row: 1; justify-self: end; margin-bottom: 8px; }
  .op-queue-date > button:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .op-queue-date > button:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .op-queue-date > button:nth-of-type(3) { grid-column: 4; grid-row: 2; }
  .op-queue-date > .ui-button { padding-inline: 4px; min-height: 44px; }
  .op-queue-date .op-field { grid-column: 3; grid-row: 2; position: relative; }
  .op-queue-date .op-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .op-queue-date input { padding-inline: 5px; font-size: 14px; }
  .fila-page .op-table { min-width: 0; }
  .fila-page .op-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fila-page .op-table tbody, .fila-page .op-table tr { display: block; width: 100%; }
  .fila-page .op-table tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 5px 8px; padding: 16px 0; border-top: 1px solid var(--line); }
  .fila-page .op-table td { padding: 0; border: 0; max-width: none; font-size: 11px; }
  .fila-page .op-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .fila-page .op-table td:nth-child(2) { grid-column: 2; grid-row: 1; color: var(--ink); font-weight: 500; }
  .fila-page .op-table td:nth-child(3) { grid-column: 2 / -1; grid-row: 2; }
  .fila-page .op-table td:nth-child(4) { grid-column: 2 / -1; grid-row: 3; font-size: 10px; }
  .fila-page .op-table td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .fila-page .op-table td:nth-child(6) { grid-column: 2 / -1; grid-row: 4; margin-top: 8px; }
  .fila-page .op-row-actions { min-width: 0; }
  .fila-page .op-row-actions .ui-button { min-height: 44px; font-size: 11px; }
  .op-indicadores[open] { gap: 8px; }
  .op-inline-stats { gap: 12px; }
  .op-grid-scroll { max-height: 65dvh; min-height: 300px; }
  .op-calendar > .ui-button-primary { min-height: 44px; }
  .op-agenda-layout { padding-bottom: 20px; }
  .op-panel .ui-button { min-height: 40px; }
}
@media (min-width: 768px) and (max-width: 999px) {
  .fin-overview { grid-template-columns: minmax(0, 1fr); }
}

/* Revisão de UI/UX (out/2026) ------------------------------------------- */
/* Relatórios, Entradas e saídas e Estoque: cabeçalho no mesmo fundo das outras telas. */
.reports-screen > .screen-header, .ledger-screen > .screen-header, .stock-screen > .screen-header {
  background: var(--workspace) !important; border-bottom-color: var(--line) !important; }
.reports-screen h1.page-title, .ledger-screen h1.page-title, .stock-screen h1.page-title { margin: 0; }
.ledger-mes { max-width: 280px; width: 100%; }
/* Texto de tela com no mínimo 11px (a folha A4 da proposta mantém a escala de impressão). */
.sidebar .sidebar-caption, .op-eyebrow, .op-table th, .op-status, .op-avatar, .op-kpi-label, .op-mini-week,
.op-grid-corner, .op-grid-prof small, .op-grid-times > div, .op-slot, .agenda-event span span, .agenda-event small,
.op-donut small, .topbar-user small, .topbar-results small, .topbar-kbd, .topbar-salvo, .sidebar-brand-text span,
.op-kpi-link, .op-queue-panel > .op-filters .op-filter { font-size: 11px !important; }
/* Toque: dias do minicalendário com alvo maior em telas de toque. */
@media (pointer: coarse) { .op-mini-day { height: 40px; } }

/* Agenda assistida: controles recolhidos para preservar a rotina rápida. */
.agenda-assistida-acoes { margin-top: 12px; }
.camp-controles { margin-block: 16px; }
.camp-config { padding: 12px 0; border-block-start: 1px solid var(--line); }
.camp-config > summary { min-height: 44px; cursor: pointer; font-weight: 500; }
.camp-controle-campos { display: grid; gap: 12px; min-width: 0; border: 0; margin: 0; padding: 0; }
.camp-controle-form { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.camp-salvar-publico { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-block: 12px; }
.camp-salvar-publico .price-field { flex: 1 1 210px; }
.camp-preferencias-lista { list-style: none; margin: 12px 0; padding: 0; }
.camp-preferencias-lista > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 12px; border-block-start: 1px solid var(--line); overflow-wrap: anywhere; }
.camp-preferencias-lista > li > div { flex: 1 1 220px; min-width: 0; }
.camp-preferencias-lista small { display: block; color: var(--muted); margin-top: 4px; }
.agenda-bloqueios { margin: 0 0 18px; padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; background: var(--surface); }
.agenda-bloqueios h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.agenda-bloqueios ul { list-style: none; margin: 0; padding: 0; }
.agenda-bloqueios li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.agenda-bloqueios li + li { border-top: 1px solid var(--line); }
.agenda-bloqueios li > div { min-width: 0; overflow-wrap: anywhere; }
.agenda-bloqueios li span, .agenda-bloqueios li small { display: block; margin-top: 4px; }
.agenda-bloqueios li span { font-size: 12px; color: var(--muted); }
.agenda-bloqueio-alerta { color: var(--op-warning); }
.agenda-bloqueio-campos { display: grid; gap: 16px; min-width: 0; border: 0; margin: 0; padding: 0; }
@media (max-width: 600px) {
  .agenda-bloqueios { padding: 14px; }
  .agenda-bloqueios li { flex-wrap: wrap; }
  .agenda-bloqueios li > div { flex-basis: 100%; }
  .agenda-assistida-acoes .ui-button { min-height: 44px; }
}
.agenda-lembretes { margin: 0 24px 16px; padding: 16px; min-width: 0; }
.agenda-lembretes > summary, .agenda-vagas > summary { cursor: pointer; min-height: 44px; align-content: center; }
.agenda-lembretes > summary .op-count { margin-left: 12px; }
.agenda-lembretes[open] > summary { margin-bottom: 10px; }
.agenda-lembretes-list, .agenda-expedientes-list { list-style: none; margin: 0; padding: 0; }
.agenda-lembretes-list > li, .agenda-expedientes-list > li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.agenda-lembretes-list > li > div:first-child { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.agenda-lembrete-texto { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.agenda-lembretes .op-row-actions { flex-wrap: wrap; }
.agenda-expedientes-list small { display: block; margin-top: 4px; }
.agenda-aceite { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; cursor: pointer; }
.agenda-aceite input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }
.agenda-vagas { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.agenda-vagas-list { display: flex; flex-wrap: wrap; gap: 8px; }
.agenda-vagas-list .ui-button { min-width: 66px; min-height: 44px; }
.agenda-vagas-list [aria-pressed="true"] { background: var(--accent); color: white; }
@media (max-width: 900px) {
  .agenda-lembretes-list > li { flex-direction: column; gap: 8px; }
  .agenda-lembretes { margin-inline: 16px; }
}
@media print { .agenda-lembretes, .agenda-assistida-acoes { display: none !important; } }
/* Resposta ao clique/toque: leve redução de escala; sem movimento para quem prefere menos animação. */
.ui-button { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform 120ms cubic-bezier(.23, 1, .32, 1); }
.tab-link, .op-mini-day, .ledger-tab { transition: transform 120ms cubic-bezier(.23, 1, .32, 1); }
.ui-button:active:not(:disabled), .tab-link:active, .op-mini-day:active, .ledger-tab:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .ui-button, .tab-link, .op-mini-day, .ledger-tab { transition: none; }
  .ui-button:active, .tab-link:active, .op-mini-day:active, .ledger-tab:active { transform: none; }
}
