/* 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;
}

:root {
  --ink: #202a29;
  --line: #e0e7e3;
  --radius: 10px;
  --accent: #19675c;
  --accent-ink: #19675c;
  --on-accent: #fff;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  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: 10px; font-size: 19px; font-weight: 650; }
.brand-copy { gap: 5px; }
.brand-copy strong { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; font-weight: 600; }
.brand-copy small { font-size: 12px; }
.nav-label { font-size: 12px; 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: 13px; 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: #fff; }
.account strong { font-size: 12px; font-weight: 600; }
.account small { font-size: 12px; margin-top: 4px; }
.link-button { font-size: 12px; 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: 14px; }
.eyebrow { text-transform: none; letter-spacing: .01em; font-weight: 500; font-size: 12px; margin-bottom: 8px; }
.button { min-height: 40px; padding: 9px 14px; font-size: 12px; font-weight: 600; border-radius: 7px; transition: background-color 140ms, box-shadow 140ms; }
.button.secondary { border-color: #bcc9c2; 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 rgb(23 43 41 / .025); }
.panel h2, .recent-panel h2 { font-weight: 600; font-size: 16px; letter-spacing: -.025em; margin: 0; }
.panel-header { align-items: flex-start; }
.panel-header a { font-weight: 500; }
.control { border-color: #a9b8b0; border-radius: 7px; font-size: 13px; min-height: 40px; }
.control::placeholder { color: #667670; opacity: 1; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.status, .priority { font-size: 12px; line-height: 1.6; font-weight: 500; padding: 3px 8px; }
.priority-normal, .priority-low { color: var(--muted); background: #f6f8f7; }
.status-open, .status-doing { background: #edf4ef; color: #116244; }
.record-title { color: var(--ink); font-size: 14px; font-weight: 550; 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: 12px; font-weight: 550; 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: 12px; }
.workspace-kicker time { text-transform: capitalize; }
.section-description { color: var(--muted); font-size: 12px; 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: 5px; color: var(--accent-ink); font-size: 12px; font-weight: 550; 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: 12px; font-weight: 550; }
.day-stat strong { grid-column: 2; grid-row: 1 / 3; font-size: 32px; line-height: 1; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.day-stat small { color: var(--muted); font-size: 12px; }
.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: 12px; 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: 12px; 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: 12px; font-variant-numeric: tabular-nums; }
.task-date small { color: var(--muted); font-size: 11px; }
.is-overdue, .is-overdue small { color: var(--danger); }
.panel-footnote { margin: 0 -24px; padding: 12px 24px; background: #f6f8f7; border-top: 1px solid var(--line); font-size: 11px; 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: 13px; display: block; }
.recent-cases p { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.case-reference { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 11px; 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: 12px; color: var(--accent-ink); }
.calm-empty h3, .calm-empty h2 { margin: 10px 0 6px; font-weight: 550; font-size: 20px; letter-spacing: -.035em; }
.calm-empty p { margin: 0 0 18px; color: var(--muted); font-size: 13px; max-width: 46ch; }

/* Tarefas: one surface for scope, filtering, results and pagination. */
.task-workspace { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; 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: 12px; 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: 12px; 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: 12px; 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: 12px; color: var(--muted); }
.advanced-filters summary::marker { color: var(--accent-ink); font-size: 9px; }
.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: 12px; 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 #b9c9c0; background: var(--soft); color: var(--accent-ink); border-radius: 5px; font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.filter-chip span { font-size: 16px; line-height: 1; flex-shrink: 0; }
.filter-chip:hover { border-color: var(--accent); }
.clear-filters { font-size: 12px; padding: 5px 2px; }
.task-table-wrap { border: 0; border-radius: 0 0 10px 10px; }
.task-table { table-layout: fixed; }
.task-table th { background: #f6f8f7; padding: 11px 14px; border-top: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: 11px; 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: 12px; 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: #f6f8f7; }
.task-table .record-title { font-size: 13px; }
.table-context { margin-top: 5px; font-size: 12px; 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: 12px; }
.assignee .avatar { width: 25px; height: 25px; flex-shrink: 0; font-size: 11px; font-weight: 500; }
.date-cell { font-variant-numeric: tabular-nums; }
.date-cell time { white-space: nowrap; font-size: 12px; }
.date-cell small { display: block; font-size: 11px; margin-top: 4px; }
.task-workspace .pagination { border-top: 1px solid var(--line); padding: 14px 20px; margin: 0; }
.task-workspace .pagination p { font-size: 12px; }
.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: 26px; }
  .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: 13px; }
  .logout { margin-top: 8px; padding-top: 12px; }
  .content { padding: 26px 18px 38px; }
  .workspace-kicker { flex-wrap: wrap; gap: 6px; margin-bottom: 20px; font-size: 11px; }
  .workspace-header { gap: 18px; margin-bottom: 24px; }
  .workspace-header h1 { font-size: 29px; }
  .workspace-header .muted { font-size: 13px; }
  .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: 27px; }
  .day-stat .stat-label { font-size: 12px; }
  .day-stat small { font-size: 11px; }
  .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: 12px; }
  .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: 7px; 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: 12px; grid-template-columns: 96px minmax(0, 1fr); }
  .task-table td::before { font-size: 12px; 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: 13px; }
  .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: 12px; }
}

@media (max-width: 380px) {
  .content { padding-inline: 14px; }
  .day-stat { padding-inline: 9px; }
  .day-stat small { font-size: 11px; }
  .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; }
}
