/* Workspace foundations. Font asset and license: fonts/README.md. */
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* Flag emojis only (Windows draws none); provenance and license: fonts/README.md. */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("fonts/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}

:root {
  --radius: 10px;
  --accent: #19675c;
  --accent-ink: #19675c;
  --on-accent: #fff;
  font-family: "Twemoji Country Flags", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-md);
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
}

/* Shared shell and controls retain the existing light theme surfaces. */
.sidebar { padding: 24px 16px 16px; }
.brand { gap: 11px; padding: 0 4px 32px; }
.brand-mark { width: 36px; height: 38px; flex: 0 0 auto; border-radius: var(--radius-lg); font-size: var(--fs-2xl); font-weight: 600; }
.brand-copy { gap: 5px; }
.brand-copy strong { white-space: normal; overflow-wrap: anywhere; font-size: var(--fs-xs); line-height: 1.45; font-weight: 600; }
.brand-copy small { font-size: var(--fs-xs); }
.nav-label { font-size: var(--fs-xs); font-weight: 500; text-transform: none; letter-spacing: .015em; color: var(--muted); padding-bottom: 8px; }
.nav-group { gap: 4px; }
.nav-group a { min-height: 40px; padding: 10px 12px; font-size: var(--fs-sm); font-weight: 500; gap: 11px; }
.nav-group a[aria-current="page"] { font-weight: 600; }
.desktop-nav { gap: 28px; }
.logout { padding: 17px 0 0; gap: 9px; }
.account-avatar { flex: 0 0 auto; width: 31px; height: 31px; border: 1px solid var(--line); background: var(--paper); }
.account strong { font-size: var(--fs-xs); font-weight: 600; }
.account small { font-size: var(--fs-xs); margin-top: 4px; }
.link-button { font-size: var(--fs-xs); min-height: 36px; text-decoration: none; }
.content { padding-top: 38px; }
.workspace-header { margin-bottom: 30px; gap: 20px; }
.workspace-header h1, .record-header h1 { font-weight: 600; font-size: clamp(28px, 2.5vw, 34px); line-height: 1.2; letter-spacing: -.045em; margin: 0 0 8px; overflow-wrap: anywhere; }
.workspace-header .muted { font-size: var(--fs-md); }
.eyebrow { text-transform: none; letter-spacing: .01em; font-weight: 500; font-size: var(--fs-xs); margin-bottom: 8px; }
.button { min-height: 40px; padding: 9px 14px; font-size: var(--fs-xs); font-weight: 600; border-radius: var(--radius-md); transition: background-color 140ms, box-shadow 140ms; }
.button.secondary { border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover, .button.ghost:hover { background: var(--soft); filter: none; }
.button:active { transform: none; }
.panel, .card { box-shadow: 0 2px 4px color-mix(in srgb, var(--ink) 2.5%, transparent); }
.panel h2, .recent-panel h2 { font-weight: 600; font-size: var(--fs-lg); letter-spacing: -.025em; margin: 0; }
.panel-header { align-items: flex-start; }
.panel-header a { font-weight: 500; }
.control { border-color: var(--control-border); border-radius: var(--radius-md); font-size: var(--fs-sm); min-height: 40px; }
.control::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.status, .priority { font-size: var(--fs-xs); line-height: 1.6; font-weight: 500; padding: 3px 8px; }
.priority-normal, .priority-low { color: var(--muted); background: var(--canvas); }
.status-open, .status-doing { background: var(--soft); color: var(--accent-ink); }
.record-title { color: var(--ink); font-size: var(--fs-md); font-weight: 600; line-height: 1.55; text-decoration: none; overflow-wrap: anywhere; }
.record-title:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.text-action { color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 600; text-decoration: none; white-space: nowrap; padding: 4px 0; }
.text-action:hover { text-decoration: underline; }
.workspace-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; color: var(--muted); font-size: var(--fs-xs); }
.workspace-kicker time { text-transform: capitalize; }
.section-description { color: var(--muted); font-size: var(--fs-xs); margin: 6px 0 0; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 1px 7px; margin-left: 6px; background: var(--soft); border-radius: var(--radius-sm); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 600; vertical-align: middle; font-variant-numeric: tabular-nums; }

/* Meu dia: compact overview, with natural-height work and context columns. */
.day-header { margin-bottom: 28px; }
.day-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 36px; padding: 20px 0; }
.day-stat { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; padding: 0 24px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); min-width: 0; }
.day-stat:first-child { border-left: 0; padding-left: 0; }
.day-stat:last-child { padding-right: 0; }
.day-stat .stat-label { font-size: var(--fs-xs); font-weight: 600; }
.day-stat strong { grid-column: 2; grid-row: 1 / 3; font-size: var(--fs-5xl); line-height: 1; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.day-stat small { color: var(--muted); font-size: var(--fs-xs); }
.day-stat:hover .stat-label { color: var(--accent-ink); text-decoration: underline; }
.day-stat.needs-attention strong, .day-stat.needs-attention .stat-label { color: var(--danger); }
.day-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(275px, 1fr); align-items: start; gap: 32px; }
.focus-panel { padding: 22px 24px 0; overflow: hidden; }
.focus-panel .panel-header { margin-bottom: 22px; }
.focus-list { list-style: none; margin: 0; padding: 0; }
.focus-list li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 0; border-top: 1px solid var(--line); }
.sequence-number { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 4px; }
.focus-task { flex: 1; min-width: 0; }
.task-context { color: var(--muted); font-size: var(--fs-xs); margin: 5px 0 10px; overflow-wrap: anywhere; }
.task-signals { display: flex; flex-wrap: wrap; gap: 6px; }
.task-date { flex: 0 0 auto; display: grid; justify-items: end; gap: 5px; padding-top: 3px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.task-date small { color: var(--muted); font-size: var(--fs-xs); }
.is-overdue, .is-overdue small { color: var(--danger); }
.panel-footnote { margin: 0 -24px; padding: 12px 24px; background: var(--canvas); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.recent-panel { min-width: 0; padding: 2px 0; }
.recent-panel .panel-header { margin-bottom: 12px; }
.recent-cases { list-style: none; margin: 0; padding: 0; }
.recent-cases li { padding: 17px 0; border-bottom: 1px solid var(--line); }
.recent-cases li:last-child { border-bottom: 0; }
.recent-cases .record-title { font-size: var(--fs-sm); display: block; }
.recent-cases p { margin: 5px 0 0; color: var(--muted); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.case-reference { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.case-state { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; flex: 0 0 auto; }
.status-dot-open { background: var(--accent); }
.calm-empty { padding: 24px 0 30px; }
.calm-empty .empty-label { font-size: var(--fs-xs); color: var(--accent-ink); }
.calm-empty h3, .calm-empty h2 { margin: 10px 0 6px; font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -.035em; }
.calm-empty p { margin: 0 0 18px; color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; }

/* Tarefas: one surface for scope, filtering, results and pagination. */
.task-workspace { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-lg); min-width: 0; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.view-switch { display: flex; gap: 24px; }
.view-switch a { padding: 16px 2px 14px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: var(--fs-xs); font-weight: 500; }
.view-switch a[aria-current] { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.result-count { margin: 0; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.task-filters { padding: 18px 20px 12px; }
.primary-filters { display: flex; align-items: center; gap: 12px; }
.search-field { min-width: 0; flex: 1; }
.inline-filter { display: flex; align-items: center; gap: 8px; }
.inline-filter label { font-size: var(--fs-xs); color: var(--muted); }
.inline-filter select { width: 150px; }
.advanced-filters { margin-top: 8px; }
.advanced-filters summary { padding: 8px 0; width: fit-content; cursor: pointer; font-size: var(--fs-xs); color: var(--muted); }
.advanced-filters summary::marker { color: var(--accent-ink); font-size: var(--fs-xs); }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; align-items: end; padding: 14px 0 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.advanced-filter-grid label { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.advanced-filter-grid .button { justify-self: end; grid-column: -2 / -1; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 20px 16px; }
.filter-chip { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 5px 9px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--accent-ink); border-radius: var(--radius-sm); font-size: var(--fs-xs); text-decoration: none; overflow-wrap: anywhere; }
.filter-chip span { font-size: var(--fs-lg); line-height: 1; flex-shrink: 0; }
.filter-chip:hover { border-color: var(--accent); }
.clear-filters { font-size: var(--fs-xs); padding: 5px 2px; }
.task-table-wrap { border: 0; border-radius: 0 0 10px 10px; }
.task-table { table-layout: fixed; }
.task-table th { background: var(--canvas); padding: 11px 14px; border-top: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); font-weight: 500; }
.task-table th:first-child { width: 37%; padding-left: 20px; }
.task-table th:nth-child(2) { width: 20%; }
.task-table th:nth-child(3) { width: 16%; }
.task-table th:nth-child(4) { width: 12%; }
.task-table th:last-child { width: 15%; padding-right: 20px; }
.task-table td { padding: 18px 14px; font-size: var(--fs-xs); overflow-wrap: anywhere; }
.task-table td:first-child { padding-left: 20px; }
.task-table td:last-child { padding-right: 20px; }
.task-table tbody tr { transition: background-color 140ms; }
.task-table tbody tr:hover, .task-table tbody tr:focus-within { background: var(--canvas); }
.task-table .record-title { font-size: var(--fs-sm); }
.table-context { margin-top: 5px; font-size: var(--fs-xs); color: var(--muted); }
.table-context a { color: var(--muted); text-decoration: none; }
.table-context a:hover { color: var(--accent-ink); text-decoration: underline; }
.assignee { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.assignee .avatar { width: 25px; height: 25px; flex-shrink: 0; font-size: var(--fs-xs); font-weight: 500; }
.date-cell { font-variant-numeric: tabular-nums; }
.date-cell time { white-space: nowrap; font-size: var(--fs-xs); }
.date-cell small { display: block; font-size: var(--fs-xs); margin-top: 4px; }
.task-workspace .pagination { border-top: 1px solid var(--line); padding: 14px 20px; margin: 0; }
.task-workspace .pagination p { font-size: var(--fs-xs); }
.task-empty { padding: 36px 24px 42px; }

@media (max-width: 1200px) {
  .day-columns { grid-template-columns: minmax(0, 1.25fr) minmax(250px, 1fr); gap: 24px; }
  .content { padding-inline: 28px; }
  .task-table th, .task-table td { padding-inline: 10px; }
  .assignee .avatar { display: none; }
  .case-reference { flex-wrap: wrap; gap: 4px 12px; }
}

@media (max-width: 980px) {
  .day-columns { grid-template-columns: 1fr; }
  .recent-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .day-stat { padding-inline: 16px; }
  .day-stat strong { font-size: var(--fs-3xl); }
  .advanced-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-filter label { display: none; }
  .inline-filter select { width: 130px; }
  .task-table th:first-child { width: 34%; }
  .task-table th:nth-child(2) { width: 18%; }
  .task-table th:nth-child(3) { width: 18%; }
  .task-table th:nth-child(4) { width: 13%; }
  .task-table th:last-child { width: 17%; }
}

@media (max-width: 760px) {
  .sidebar { padding: 16px; }
  .brand { padding: 0 0 16px; }
  .brand-copy strong { font-size: var(--fs-sm); }
  .logout { margin-top: 8px; padding-top: 12px; }
  .content { padding: 26px 18px 38px; }
  .workspace-kicker { flex-wrap: wrap; gap: 6px; margin-bottom: 20px; font-size: var(--fs-xs); }
  .workspace-header { gap: 18px; margin-bottom: 24px; }
  .workspace-header h1 { font-size: var(--fs-4xl); }
  .workspace-header .muted { font-size: var(--fs-sm); }
  .header-actions { width: auto; }
  .header-actions .button { flex: none; }
  .day-summary { margin-bottom: 28px; padding-block: 16px; }
  .day-stat { grid-template-columns: 1fr; padding-inline: 12px; gap: 8px; }
  .day-stat strong { grid-column: 1; grid-row: 2; font-size: var(--fs-4xl); }
  .day-stat .stat-label { font-size: var(--fs-xs); }
  .day-stat small { font-size: var(--fs-xs); }
  .focus-panel { padding: 18px 16px 0; }
  .panel-footnote { margin-inline: -16px; padding-inline: 16px; }
  .focus-list li { gap: 10px; flex-wrap: wrap; }
  .focus-task { flex-basis: calc(100% - 30px); }
  .task-date { margin-left: 24px; display: flex; gap: 8px; align-items: center; }
  .task-date small { font-size: var(--fs-xs); }
  .recent-cases { grid-template-columns: 1fr; }
  .case-reference { flex-wrap: nowrap; }
  .list-heading { padding-inline: 16px; }
  .result-count span { display: none; }
  .view-switch { gap: 18px; }
  .task-filters { padding: 16px 14px 8px; }
  .primary-filters { flex-wrap: wrap; gap: 10px; }
  .search-field { flex-basis: 100%; }
  .inline-filter { flex: 1; }
  .inline-filter select { width: 100%; }
  .advanced-filter-grid { gap: 14px 10px; }
  .active-filters { padding-inline: 14px; }
  .task-table-wrap { background: transparent; padding: 0 12px 12px; }
  .task-table tr { margin: 0 0 12px; border-radius: var(--radius-md); padding: 0 0 7px; }
  .task-table tr:last-child { margin-bottom: 0; }
  .task-table td, .task-table td:first-child, .task-table td:last-child { padding: 7px 12px; font-size: var(--fs-xs); grid-template-columns: 96px minmax(0, 1fr); }
  .task-table td::before { font-size: var(--fs-xs); font-weight: 500; }
  .task-table td:first-child { display: block; padding: 14px 12px; margin-bottom: 7px; border-bottom: 1px solid var(--line); }
  .task-table td:first-child::before { display: none; }
  .task-table .record-title { font-size: var(--fs-sm); }
  .task-table .status, .task-table .priority { justify-self: start; }
  .task-table .date-cell small { grid-column: 2; }
  .task-table .assignee .avatar { display: grid; }
  .assignee { font-size: var(--fs-xs); }
}

@media (max-width: 380px) {
  .content { padding-inline: 14px; }
  .day-stat { padding-inline: 9px; }
  .day-stat small { font-size: var(--fs-xs); }
  .advanced-filter-grid { grid-template-columns: 1fr; }
  .advanced-filter-grid .button { grid-column: auto; justify-self: stretch; }
  .case-reference { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* D-012: the "Contatos" card makes the day summary four columns wide; two by two on narrow screens. */
.day-summary.with-contacts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .day-summary.with-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .day-summary.with-contacts .day-stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
/* D-012, stage 4: the case's "Parceiros" below the participants, set apart like a section of its own. */
.detail-side .side-section-title { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
/* D-012 complement (21/10/2026): the four "Tipo de cadastro" boxes side by side; the blocks that follow the types
   keep the form's own spacing (the wrapper does not create a box of its own). */
.profile-type-options { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }
[data-profile-show]:not([hidden]) { display: contents; }
/* CRM-19: selos de "parado" e etiquetas, usados nas listas de casos e contatos e no CRM. */
.stalled-badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: var(--radius-pill); padding: 2px 8px; font-size: var(--fs-xs); font-weight: 700; background: color-mix(in srgb, var(--warning) 12%, var(--paper)); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line)); }
.crm-tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; border-radius: var(--radius-md); padding: 2px 8px; font-size: var(--fs-xs); font-weight: 600; background: var(--soft); color: var(--accent-ink); border: 1px solid var(--line-soft); }
/* D-022 (CRM-08): team notes below the record, as a section of its own; the note form stays compact. */
.team-notes, .record-history { margin-top: 18px; }
.team-note-form { margin-bottom: 14px; }
.team-note-list .description { margin-top: 4px; }
/* D-022 (CRM-01): paused and cancelled situations (the areas of law are a .check-group, in forms.css). */
.status-paused { background: var(--warning-bg); color: var(--warning-ink); }
.case-pause-note { margin: 0 0 18px; padding: 11px 13px; border-left: 3px solid var(--warning); background: var(--warning-bg); font-size: var(--fs-md); }
/* CRM-04 (D-022, item 3): the closed case and the closing checks. */
.case-closed-note { border-left-color: var(--line-strong); background: var(--surface-muted); }
.case-closed-note p { margin: 0; }
.case-closed-note p + p { margin-top: 6px; }
.closing-sheet { display: grid; gap: 18px; max-width: 720px; }
.closing-checks h2 { margin: 0 0 4px; font-size: var(--fs-xl); }
.closing-checks ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: var(--fs-md); }
.closing-blocks { border-left: 3px solid var(--danger); }
.closing-warnings { border-left: 3px solid var(--warning); }
.closing-effect { font-size: var(--fs-md); }
.case-classification { margin: 0 0 18px; }
/* CRM-04 (correção de 31/10/2026, I-009): os botões da Classificação (pausar, encerrar e os pedidos ao responsável)
   descem para baixo do título quando não cabem ao lado e quebram a linha, sem passar da borda do bloco no celular. */
.case-classification .section-heading { flex-wrap: wrap; }
.case-classification .header-actions { min-width: 0; max-width: 100%; }
.case-classification .header-actions .button { max-width: 100%; white-space: normal; text-align: center; }
.case-status-requests { margin-top: 12px; }
@media (min-width: 1051px) {
  .filter-bar.case-filter-bar { grid-template-columns: minmax(200px, 1.4fr) repeat(5, minmax(110px, 1fr)) auto; }
}
/* D-022 (CRM-03): cancelled tasks and the task cycle panel above the description. */
.status-cancelled { background: var(--surface-muted); color: var(--muted); text-decoration: line-through; }
.task-cycle { margin: 0 0 18px; }
.task-cycle-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 18px; }
/* D-022 (CRM-06): claims of a proceeding below its structured data. */
.proceeding-claims { margin-top: 18px; }
.claim-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 18px; }
.claim-history { margin-top: 6px; font-size: var(--fs-md); }
.proceeding-claims .record-list li > span:first-child, .task-cycle .record-list li > span:first-child { display: grid; gap: 2px; min-width: 0; }
/* Ajustes de telas (29/10/2026): the empty state of a list (Contatos, Casos, Equipe, Solicitações...) uses the same
   title as the reference's other empty states (.calm-empty), not a title almost as large as the page's. */
.empty h2 { font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -.035em; }
/* Ajustes de telas (29/10/2026, CRM-21): the audit's five filters and the button in one row on wide screens, as the
   case list does (.case-filter-bar); narrower screens keep the reference's three columns and then one. */
@media (min-width: 1051px) {
  .filter-bar.audit-filter-bar { grid-template-columns: repeat(5, minmax(110px, 1fr)) auto; }
}
/* Ajustes de telas (29/10/2026): in the lists added by the customizations (requests, parties, links, contract items,
   option lists...), the detail line goes below the name with the size of the reference's list details (13px). */
.record-list li > span:first-child > small.muted { display: block; font-size: var(--fs-sm); }
/* Ajustes de telas (29/10/2026): two boxes in a row of the page (Financeiro do caso) keep the space the reference
   leaves between boxes (18px), instead of touching; a section title outside a box (Monitoramentos DJEN, Convites)
   takes the size of the reference's box titles (.panel h2). */
main > .panel + .panel { margin-top: 18px; }
.task-section > h2 { font-weight: 600; font-size: var(--fs-lg); letter-spacing: -.025em; margin: 0 0 12px; }
/* Filtros automáticos (29/10/2026): the bars of the lists filter by themselves (static/ui/auto-filter.js). The
   "Filtrar" button stays only for whoever uses the keyboard or a screen reader without JavaScript: it is hidden from
   view and shows up when it gets the focus; with the script it is not needed and leaves. While the list is fetched,
   it fades a little. An error slot of a filter takes no room when empty. */
.filter-submit { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.filter-submit:focus-visible { position: static; width: auto; height: auto; padding: 8px 12px; overflow: visible; clip: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-md); }
.filter-submit[hidden] { display: none; }
.auto-filter-busy { opacity: .55; transition: opacity .15s ease; }
.filter-error-slot:empty { display: none; }
/* Ficha do caso (29/10/2026): from top to bottom, with "Contexto do caso" beside "Classificação" (one below the other
   on narrow screens) and the same 18px between boxes. A folded block (<details class="fold-panel"> or "fold") shows
   its title and count with the arrow of the client record (I-006); the conflict note sits by the title, in red. */
.case-sheet { display: grid; gap: 18px; }
.case-sheet > * { margin: 0; min-width: 0; }
.case-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.case-top > .panel, .case-top .case-classification { margin: 0; min-width: 0; }
@media (max-width: 900px) { .case-top { grid-template-columns: minmax(0, 1fr); } }
.case-conflict-note { border-left-color: var(--danger); background: var(--danger-bg); }
.fold-panel > summary, .fold > summary { position: relative; list-style: none; cursor: pointer; }
.fold-panel > summary::-webkit-details-marker, .fold > summary::-webkit-details-marker { display: none; }
.fold-panel > summary { display: block; padding-right: 30px; }
.fold-panel > summary h2 { margin: 0; }
.fold-panel[open] > summary { margin-bottom: 14px; }
.fold > summary { display: inline-block; padding: 10px 24px 6px 0; color: var(--accent-ink); font-size: var(--fs-md); font-weight: 600; }
.fold-panel > summary::after, .fold > summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(45deg); transition: transform .15s ease; }
.fold > summary::after { right: 4px; margin-top: -4px; }
.fold-panel[open] > summary::after, .fold[open] > summary::after { margin-top: -2px; transform: rotate(225deg); }
.fold-panel > summary:focus-visible, .fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-md); }
.fold-count { color: var(--muted); font-size: var(--fs-md); font-weight: 400; letter-spacing: 0; }
.fold-body > .muted:first-child { margin-top: 0; }
.case-latest-interaction { margin-bottom: 4px; }
.case-finance-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 6px; }
@media (max-width: 760px) { .case-finance-totals { grid-template-columns: minmax(0, 1fr); } }
.case-sheet .participant-list .text-action { margin-left: auto; }
.case-sheet .fold-body .client-subheading, .case-parties .party-requests .client-subheading { margin-top: 22px; }
.case-sheet .fold-body > .client-subheading:first-child, .case-sheet .fold-body > p:first-child + .client-subheading { margin-top: 8px; }
/* Históricos recolhidos (29/10/2026): every history block (case, task, contract, proceeding data and success, opportunity,
   contact, merge trail, finance entry, meeting reconciliation) comes folded, with its count; the audit stays open. The
   eyebrow of a folded block sits above its title, inside the summary. A folded box right after the detail columns keeps
   the 18px between boxes. */
.fold-eyebrow { display: block; }
main > .detail-grid + .fold-panel.panel { margin-top: 18px; }
.task-section.fold-panel > summary h2 { font-weight: 600; font-size: var(--fs-lg); letter-spacing: -.025em; }
/* Filtros automáticos (29/10/2026): "Limpar filtros" stays on one line in the filter bars. */
[data-auto-filter-clear] { white-space: nowrap; }
/* UX-04 (I-009, regras 1 e 2; 30/10/2026): the proceeding page from top to bottom, like the case sheet (.case-sheet in
   .case-workspace, 1180px), and its data in a table of 3 columns, one column on narrow screens. */
.proceeding-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px; }
.proceeding-data > div { min-width: 0; overflow-wrap: anywhere; }
.proceeding-other-reference { display: block; }
@media (max-width: 760px) { .proceeding-data { grid-template-columns: minmax(0, 1fr); } }
/* UX-13 (30/10/2026): on the case sheet, each proceeding with its number, action type and opposing parties (the table
   of the proceeding page) and the whole current summary below. */
.case-proceeding-list { list-style: none; margin: 0; padding: 0; }
.case-proceeding-list > li { min-width: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.case-proceeding-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.case-proceeding-heading a { min-width: 0; color: var(--ink); font-size: var(--fs-md); font-weight: 600; overflow-wrap: anywhere; }
.case-proceeding-summary { margin: 10px 0 0; }
.case-proceeding-summary > .muted { margin: 0 0 4px; font-size: var(--fs-sm); }
.case-proceeding-summary .description p:last-child { margin-bottom: 0; }
/* UX-06 (I-009, regras 1 a 3; 30/10/2026): the other record pages (task, interaction, opportunity, finance entry,
   publication) from top to bottom like the case sheet, with their details in the same 3-column table as the proceeding
   page and the single history as the last block. */
.record-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px; }
.record-data > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .record-data { grid-template-columns: minmax(0, 1fr); } }
.case-sheet.record-sheet > * { margin: 0; }  /* blocks with a margin of their own (tags, source data) keep the 18px gap */
/* D-023 (CRM-12): provisional data fatal of a calculated deadline, the deadline block and the memory of the calculation. */
.status-provisional { background: var(--warning-bg); color: var(--warning-ink); }
.date-cell .status-provisional, .deadline-panel .status-provisional { display: inline-block; margin-left: 6px; }
.deadline-panel { margin: 0 0 18px; }
.deadline-warnings { margin: 12px 0; padding-left: 28px; }
.deadline-warnings li + li { margin-top: 4px; }
.deadline-steps { margin-top: 12px; }
.deadline-steps-table td { vertical-align: top; }
.deadline-step-skip td, .deadline-step-suspension td, .deadline-step-end_moved td { color: var(--muted); }
.deadline-step-due td, .deadline-step-publication td { font-weight: 600; }
.deadline-result { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.holiday-list li { padding: 6px 0; }
.holiday-table td small { display: block; }
.deadline-adjusted { display: block; margin-top: 2px; }
.calendar-history { margin-top: 0; }
/* D-022 (CRM-07): the task board reuses the opportunity board (crm.css); four columns fit the page width. */
.crm-board.task-board { grid-auto-columns: minmax(200px, 1fr); margin-top: 18px; }
@media (max-width: 760px) { .crm-board.task-board { grid-auto-columns: auto; } }
.task-column-fold > summary { cursor: pointer; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 700; margin: 0 0 10px; }
.task-board .crm-card-line.error { color: var(--danger); }
.batch-history { max-width: 720px; }  /* CRM-07: the earlier batches below the form, at its width */
/* CRM-20 (D-025, item 4): the export buttons of the lists and of the panel per person. */
.export-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
.export-buttons .muted { font-size: var(--fs-sm); }
.list-export { margin: 0 0 12px; }
