/* =========================================================================
   LabTasks — tema "Foco" (claro e escuro)
   Carregado depois de styles.css. Celular: barra de abas embaixo.
   721–1099 px: barra lateral + lista. ≥ 1100 px: lateral + lista + detalhes.
   ========================================================================= */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --text: #111514;
  --muted: #5f6864;
  --line: #eceeed;
  --green: #0d7f80;
  --green-dark: #095e5f;
  --green-soft: #e6f4f4;
  --blue: #3d55c7;
  --blue-soft: #eef1fb;
  --sidebar: #f6f7f6;
  --field: #f3f5f4;
  --hover: #f7f8f8;
  --check: #c9cfcc;
  --sun: #9a5b00;
  --danger: #b3261e;
  --waiting: #5b3fb8;
  --waiting-soft: #efeafc;
  --on-accent: #ffffff;
  --shadow: 0 18px 50px rgba(17,21,20,.10);
}
[data-theme="dark"] {
  --bg: #0f1211;
  --panel: #0f1211;
  --panel-solid: #0f1211;
  --text: #eef2f0;
  --muted: #9ba5a0;
  --line: #222826;
  --green: #3cc3c4;
  --green-dark: #8ee0e0;
  --green-soft: #15302f;
  --blue: #9fb0ff;
  --blue-soft: #1b2140;
  --sidebar: #0b0d0c;
  --field: #181c1b;
  --hover: #151918;
  --check: #4a5350;
  --sun: #f4b54a;
  --danger: #ff8a80;
  --waiting: #c3b1ff;
  --waiting-soft: #2a2245;
  --on-accent: #06201f;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

body.foco { background: var(--bg); color: var(--text); font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
body.foco button, body.foco input, body.foco select, body.foco textarea { font-family: inherit; }
body.foco .ambient, body.foco .hero, body.foco .gesture-hint { display: none !important; }
body.foco h1, body.foco h2, body.foco h3, body.foco .dialog-head h2, body.foco .month-title, body.foco .calendar-head h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

/* ---------------------------------------------------------------- estrutura */
.app-frame { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.sidebar, .detail-pane { display: none; }
body.foco .shell { width: auto; max-width: none; margin: 0; padding: 0 22px calc(120px + env(safe-area-inset-bottom)); }
body.foco .planner-layout { display: block; }
body.foco .workspace { background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; padding: 0; min-height: 0 !important; }

/* ---------------------------------------------------------------- cabeçalho da visão */
.view-head { padding: calc(env(safe-area-inset-top) + 34px) 2px 6px; display: flex; flex-direction: column; gap: 4px; }
.view-head-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.view-head .eyebrow { margin: 0; color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: 1.4px; }
.view-head h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -1.3px; line-height: 1.1; color: var(--text); }
.view-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.view-head-actions { display: flex; align-items: center; gap: 8px; margin-right: -8px; }
.head-icon { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.head-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body.search-open .head-icon#searchToggle { background: var(--field); }
body.foco .view-head .add-button { display: none; }
body.foco .view-head .search-box { display: none; width: 100%; height: 46px; margin-top: 10px; border: 0; border-radius: 14px; background: var(--field); }
body.foco.search-open .view-head .search-box { display: flex; }
body.foco .search-box input { font-size: 16px; color: var(--text); }

/* ---------------------------------------------------------------- listas (categorias) e filtros */
body.foco .toolbar { display: none; border: 0; padding: 12px 0 4px; margin: 0; min-height: 0; gap: 10px; flex-direction: row; align-items: center; }
body.foco[data-nav="lists"] .toolbar { display: flex; }
body.foco .tabs { flex: 1; width: auto; background: transparent; padding: 0; gap: 6px; border-radius: 0; }
body.foco .tab { height: 40px; border-radius: 12px; padding: 0 14px; background: var(--field); color: var(--muted); font-size: 15px; font-weight: 700; box-shadow: none; }
body.foco .tab.active { background: var(--text); color: var(--bg); }
body.foco .tab.active .tab-icon { background: transparent !important; color: inherit !important; }
body.foco .tab b { background: transparent; color: inherit; opacity: .75; }
body.foco .tab-icon { display: none; }
body.foco .category-button { flex: none; height: 40px; border: 0; background: transparent; color: var(--green); font-size: 14px; font-weight: 700; padding: 0 4px; }
body.foco .quick-filters { display: none; margin: 4px 0 0; padding: 2px 0; gap: 6px; }
body.foco[data-nav="lists"] .quick-filters { display: flex; }
body.foco .quick-filter { height: 34px; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 12px; }
body.foco .quick-filter.active { background: var(--green-soft); border-color: transparent; color: var(--green-dark); }
[data-theme="dark"] body.foco .quick-filter.active { color: var(--green); }
body.foco .quick-filter b { background: transparent; color: inherit; font-size: 12px; min-width: 0; margin-left: 4px; padding: 0; }

/* ---------------------------------------------------------------- adicionar rápido */
body.foco .quick-add { margin: 14px 0 4px; padding: 0 6px 0 14px; height: 50px; border: 0; border-radius: 14px; background: var(--field); box-shadow: none; gap: 10px; }
body.foco .quick-add:focus-within { box-shadow: 0 0 0 2px var(--green); }
body.foco .quick-add-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; }
body.foco .quick-add input { font-size: 16px; color: var(--text); }
body.foco .quick-add input::placeholder { color: var(--muted); }
body.foco .quick-add-submit { height: 38px; border-radius: 11px; background: var(--green); color: var(--on-accent); font-size: 14px; }
body.foco .quick-add-submit:disabled { display: none; }
body.foco .quick-add-expand { background: transparent; color: var(--muted); }
body.foco .quick-chip { background: var(--green-soft); color: var(--green-dark); font-size: 12px; }
[data-theme="dark"] body.foco .quick-chip { color: var(--green); }

/* ---------------------------------------------------------------- calendário (só em Próximos) */
body.foco .calendar-card { display: none; position: static; margin: 12px 0 6px; padding: 16px; border: 0; border-radius: 18px; background: var(--field); box-shadow: none; backdrop-filter: none; width: auto; }
body.foco[data-nav="upcoming"] .calendar-card { display: block; }
body.foco .calendar-head { margin-bottom: 10px; align-items: center; }
body.foco .calendar-head h2 { font-size: 15px; font-weight: 800; }
body.foco .calendar-legend { display: none; }
body.foco .calendar-month-tabs { background: var(--bg); }
body.foco .calendar-month-tab.active { background: var(--text); color: var(--bg); box-shadow: none; }
body.foco .month-card { border: 0; padding: 0; background: transparent; width: 100%; max-width: none; flex: none; }
body.foco .planner-layout .calendar-grid, body.foco .calendar-grid { display: block; overflow: visible; padding: 0; }
body.foco .month-title { display: none; }
body.foco .calendar-day { font-size: 15px; color: var(--text); }
body.foco .calendar-day.today { color: var(--green); border-color: var(--green); }
body.foco .calendar-day.selected { background: var(--text); color: var(--bg); }

/* ---------------------------------------------------------------- cabeçalho da lista */
body.foco .list-header { padding: 14px 2px 4px; min-height: 0; font-size: 12px; letter-spacing: 1.2px; color: var(--muted); }
body.foco:not([data-nav="lists"]):not([data-nav="client"]) .list-header #sectionTitle { visibility: hidden; }
body.foco:not([data-nav="lists"]):not([data-nav="client"]) .view-toggle { display: none; }
body.foco[data-nav="done"] #hideDoneButton, body.foco[data-nav="upcoming"] #hideDoneButton, body.foco[data-nav="waiting"] #hideDoneButton { display: none; }
body.foco:not([data-nav="lists"]):not([data-nav="client"]) .list-header { padding-top: 4px; }
body.foco .list-header button { color: var(--muted); font-size: 13px; font-weight: 600; }
body.foco .view-toggle { background: var(--field); }
body.foco .view-toggle button.active { background: var(--bg); color: var(--text); }
body.foco .client-banner { border-radius: 16px; background: var(--blue-soft); margin-top: 12px; }

/* ---------------------------------------------------------------- tarefas em linhas */
body.foco .task-list { gap: 0; }
body.foco .task-swipe-shell { border-radius: 0; }
body.foco .task {
  min-height: 68px; padding: 15px 4px; gap: 16px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: var(--panel-solid); box-shadow: none;
  grid-template-columns: auto minmax(0, 1fr) auto; align-items: flex-start;
}
body.foco .task:hover { transform: none; border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { body.foco .task:hover { background: var(--hover); } }
body.foco .task.waiting { border-left: 0; }
body.foco .check { width: 24px; height: 24px; margin-top: 1px; border: 2px solid var(--check); border-radius: 50%; background: transparent; }
body.foco .check:checked { background: var(--green); border-color: var(--green); }
body.foco .check:checked::after { color: var(--on-accent); }
body.foco .task.waiting .check { border-style: dashed; border-color: var(--waiting); }
body.foco .task-title { font-size: 17px; font-weight: 600; line-height: 1.32; color: var(--text); }
body.foco .task.done .task-title { color: var(--muted); }
body.foco .task-meta { gap: 4px 12px; margin-top: 5px; }
body.foco .task-meta > * { font-size: 14px; }
body.foco .task-date { color: var(--muted); font-size: 14px; }
body.foco .task-date svg { display: none; }
body.foco .task-date.soon { color: var(--danger); font-weight: 600; }
body.foco .task-date.overdue { color: var(--danger); font-weight: 700; }
body.foco .chip, body.foco .priority-badge, body.foco .status-badge { background: transparent !important; padding: 0; border-radius: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
body.foco .priority-badge.urgent { color: var(--danger); }
body.foco .priority-badge.important { color: var(--sun); }
body.foco .status-badge { color: var(--waiting); }
body.foco .chip-sun { color: var(--sun); }
body.foco .chip-client { color: var(--blue); }
body.foco .chip-category { font-weight: 500; }
body.foco .chip-subtasks i { background: var(--line); }
body.foco .chip-subtasks i::after { background: var(--green); }
body.foco .task-notes { font-size: 14px; color: var(--muted); margin-top: 6px; }
body.foco .task-update b { color: var(--text); }
body.foco .task-menu button { color: var(--muted); }
body.foco .swipe-actions { background: var(--field); }
body.foco .completed-section { margin-top: 10px; }
body.foco .completed-section summary { height: 44px; display: flex; align-items: center; padding: 0 2px; color: var(--muted); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; }
body.foco .completed-list { gap: 0; }

/* arraste e seleção */
body.foco .task-swipe-shell.is-lifted .task { border-radius: 16px; border-bottom-color: transparent; box-shadow: var(--shadow); }
body.foco .task-swipe-shell.is-selected .task { background: var(--green-soft); border-radius: 14px; border-bottom-color: transparent; }
body.foco .task-swipe-shell.is-pressing .task { border-radius: 14px; }

/* vazio */
body.foco .empty-state { padding: 48px 12px; }
body.foco .empty-check { background: var(--green-soft); color: var(--green); }
body.foco .empty-state h2 { color: var(--text); font-size: 20px; font-weight: 800; }
body.foco .empty-state p { color: var(--muted); max-width: 320px; margin-inline: auto; line-height: 1.5; }

/* quadro */
body.foco .board-col { background: var(--field); }
body.foco .board-card { background: var(--bg); }
body.foco .board-card.is-selected { box-shadow: 0 0 0 2px var(--green); }

/* ---------------------------------------------------------------- barra de abas (celular) */
.tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(70px + env(safe-area-inset-bottom)); padding: 6px 10px env(safe-area-inset-bottom); box-sizing: border-box; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { height: 54px; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tabbar button.active { color: var(--green); font-weight: 800; }
.tabbar .tab-add { justify-self: center; width: 56px; height: 56px; border-radius: 18px; background: var(--green); color: var(--on-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--green) 35%, transparent); }
.tabbar .tab-add svg { width: 26px; height: 26px; stroke-width: 2.3; }
body.foco .mobile-fab { display: none; }
body.foco .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
body.foco .focus-bar { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.foco.has-focus-bar .toast { bottom: calc(160px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- diálogos */
body.foco dialog { background: var(--bg); color: var(--text); }
body.foco .field input, body.foco .field select, body.foco .field textarea { background: var(--field); border-color: transparent; color: var(--text); }
body.foco .field input:focus, body.foco .field select:focus, body.foco .field textarea:focus { border-color: var(--green); box-shadow: none; }
body.foco .primary-button { background: var(--green); color: var(--on-accent); }
body.foco .dialog-close { background: var(--field); }
body.foco .tools-grid button { background: var(--bg); }
body.foco .tool-panel, body.foco .subtask, body.foco .toggle-field, body.foco .summary-stats div, body.foco .summary-rows div { background: var(--field); }
body.foco .history-add textarea { background: var(--field); border-color: transparent; }
body.foco .eyebrow { color: var(--green); }
.tool-phone { display: grid; }

/* ---------------------------------------------------------------- iPad em pé e computador: lateral + lista */
@media (min-width: 721px) {
  .app-frame { grid-template-columns: 250px minmax(0, 1fr); }
  .tabbar { display: none; }
  .tool-phone { display: none !important; }
  body.foco .shell { padding: 0 32px 60px; }
  body.foco .toast { bottom: 24px; }
  body.foco .focus-bar { bottom: 18px; }
  body.foco.has-focus-bar .toast { bottom: 96px; }
  .view-head { padding-top: 34px; }
  .view-head h1 { font-size: 34px; }
  body.foco .view-head .add-button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--green); color: var(--on-accent); font-size: 14px; font-weight: 700; box-shadow: none; }
  body.foco .view-head .add-button span:first-child { font-size: 18px; color: inherit; }
  body.foco .task-title { font-size: 16px; }
  body.foco .task-meta > *, body.foco .task-date, body.foco .chip, body.foco .priority-badge, body.foco .status-badge, body.foco .task-notes { font-size: 13.5px; }

  .sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; box-sizing: border-box; padding: calc(env(safe-area-inset-top) + 26px) 14px 18px; background: var(--sidebar); border-right: 1px solid var(--line); }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--text); text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
  .sidebar .brand-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none; }
  .sidebar .brand-logo img { width: 100%; height: 100%; object-fit: cover; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-link { width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
  .side-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
  .side-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-link b { color: var(--muted); font-weight: 600; font-size: 14px; }
  .side-link:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
  .side-link.active { background: var(--bg); box-shadow: 0 1px 3px rgba(17,21,20,.08); font-weight: 800; }
  [data-theme="dark"] .side-link.active { background: #1c2120; box-shadow: none; }
  .side-link.active svg { stroke: var(--green); stroke-width: 2; }
  .side-cat i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .side-shared { color: var(--muted); font-size: 11px; font-weight: 600; }
  .side-section { display: flex; flex-direction: column; gap: 2px; }
  .side-title { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
  .side-title button { border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; min-height: 32px; }
  .side-empty { margin: 0; padding: 0 12px; color: var(--muted); font-size: 13px; }
  /* rodapé: conta + menu */
  .side-footer { margin-top: auto; position: relative; padding-top: 10px; border-top: 1px solid var(--line); }
  .account-button { width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
  .account-button:hover, .account-button.open { background: color-mix(in srgb, var(--text) 6%, transparent); }
  .account-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 15px; font-weight: 800; }
  .account-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .account-text strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar .sync-state { font-size: 12px; font-weight: 500; color: var(--muted); gap: 6px; }
  .sidebar .sync-state span { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar .sync-state i { width: 6px; height: 6px; flex: none; box-shadow: none; }
  .sidebar .sync-state[data-state="error"] i, .sidebar .sync-state[data-state="offline"] i { background: #e5484d; }
  .account-chevron { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
  .account-button.open .account-chevron { transform: rotate(180deg); }
  .account-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; padding: 6px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 2px; }
  [data-theme="dark"] .account-menu { background: #1a1f1e; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
  .account-menu[hidden] { display: none; }
  .account-menu .menu-item { width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; box-shadow: none; }
  .account-menu .menu-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
  .account-menu .menu-item svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .account-menu .menu-item span { display: inline; }
  .account-menu .logout-button { color: #d6453d; }
  .account-menu .logout-button svg { stroke: currentColor; }
  .account-menu .menu-item[hidden] { display: none; }

  /* listas já ficam na barra lateral: sem abas repetidas no topo */
  body.foco[data-nav="lists"] .toolbar { display: none; }
  .view-head .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .view-head-top { gap: 12px; }

  /* quadro: colunas com largura mínima e rolagem lateral */
  body.foco .board { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x proximity; }
  body.foco .board-col { scroll-snap-align: start; }
  body.foco .board-col header { white-space: nowrap; gap: 8px; }
  body.foco .board-col header span { overflow: hidden; text-overflow: ellipsis; }
  body.foco .board-title { overflow-wrap: break-word; word-break: normal; hyphens: manual; font-size: 15px; }
}

/* ---------------------------------------------------------------- iPad deitado e computador largo: + detalhes */
@media (min-width: 1100px) {
  .app-frame { grid-template-columns: 250px minmax(0, 1fr); }
  body.pane-open .app-frame { grid-template-columns: 250px minmax(380px, 1fr) minmax(420px, 1.15fr); }
  body.foco .shell { padding: 0 36px 60px; }
  body.foco.pane-open .shell { padding: 0 28px 60px; border-right: 1px solid var(--line); }
  .detail-pane { display: none; }
  body.pane-open .detail-pane { animation: pane-in .22s ease-out; }
  body.pane-open .detail-pane { display: block; position: sticky; top: 0; height: 100vh; overflow-y: auto; box-sizing: border-box; padding: calc(env(safe-area-inset-top) + 30px) 40px 40px; background: var(--bg); }
  .detail-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; }
  .detail-empty svg { width: 44px; height: 44px; padding: 14px; border-radius: 50%; background: var(--field); fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }
  .detail-empty p { max-width: 260px; margin: 0; line-height: 1.5; font-size: 15px; }
  .detail-pane #taskForm { padding: 0; }
  .detail-pane .dialog-head { margin-bottom: 18px; }
  .detail-pane .dialog-head h2 { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
  .detail-pane .dialog-head .eyebrow { display: none; }
  .detail-pane #taskTitle { height: auto; font-weight: 800; letter-spacing: -0.5px; background: transparent; border-color: transparent; }
  .detail-pane #taskTitle:focus { background: var(--field); }
  .detail-pane .field > span { color: var(--muted); }
  .detail-pane .dialog-actions { position: sticky; bottom: -40px; margin: 10px -40px -40px; padding: 14px 40px calc(env(safe-area-inset-bottom) + 18px); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
}
@keyframes pane-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.pane-open .detail-pane { animation: none; } }
@media (min-width: 1500px) {
  .app-frame { grid-template-columns: 270px minmax(0, 1fr); }
  body.pane-open .app-frame { grid-template-columns: 270px minmax(420px, 1fr) minmax(480px, 1fr); }
}

/* telas de toque grandes: letras um pouco maiores */
@media (min-width: 721px) and (hover: none) and (pointer: coarse) {
  body.foco .task-title { font-size: 17px; }
  body.foco .task-meta > *, body.foco .task-date, body.foco .chip, body.foco .priority-badge, body.foco .status-badge, body.foco .task-notes { font-size: 14px; }
  .side-link { min-height: 46px; font-size: 16px; }
}

/* título da tarefa em várias linhas */
body.foco .field textarea#taskTitle { min-height: 48px; resize: none; overflow: hidden; padding-top: 12px; padding-bottom: 10px; line-height: 1.35; }
.detail-pane .field textarea#taskTitle { min-height: 56px; padding: 8px 12px; font-size: 24px; line-height: 1.25; }

/* Próximos no celular: lista primeiro, calendário depois */
body.foco .workspace { display: flex; flex-direction: column; }
@media (max-width: 720px) {
  body.foco .calendar-card { order: 20; margin-top: 18px; }
  body.foco .calendar-day { min-height: 40px; }
}

/* filtros que não cabem: esmaece a borda para indicar que dá para rolar */
.quick-filters.fade-end, #categoryTabs.fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.quick-filters.fade-start, #categoryTabs.fade-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px); mask-image: linear-gradient(to right, transparent, #000 48px); }
.quick-filters.fade-start.fade-end, #categoryTabs.fade-start.fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

/* clientes: seção some até existir o primeiro cliente */
.side-section.is-empty { display: none !important; }

/* aviso de internet (modo offline) */
.net-banner { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translateX(-50%); max-width: calc(100vw - 32px); box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #2a2f2e; color: #f3f5f4; font-size: 13.5px; font-weight: 600; line-height: 1.3; box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; animation: net-in .2s ease-out; }
.net-banner[hidden] { display: none; }
.net-banner strong { font-weight: 800; }
.net-banner i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #f2b33d; }
.net-banner[data-state="syncing"] i { background: #3cc3c4; animation: net-pulse 1s ease-in-out infinite alternate; }
[data-theme="dark"] .net-banner { background: #e9eeed; color: #111514; }
@keyframes net-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes net-pulse { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .net-banner, .net-banner i { animation: none !important; } }
@media (min-width: 721px) { .net-banner { left: calc(50% + 125px); } }
@media (min-width: 1500px) { .net-banner { left: calc(50% + 135px); } }
