:root {
  --primary: #8A151B;
  --primary-dark: #6c1015;
  --accent: #A9824B;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #231a1a;
  --muted: #7a6f6f;
  --line: #e6dfd5;
  --wa: #1f9d55;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(35, 26, 26, .06), 0 4px 14px rgba(35, 26, 26, .05);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --c-omega: #8A151B;
  --c-nexus: #2f5d8a;
  --c-tipassim: #a9824b;
  --c-faculdade: #5b4b8a;
  --c-pessoal: #4d7a5a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px 16px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700;
}
.brand-name { font-weight: 700; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nav-title { min-width: 0; }
.nav-title {
  margin: 0 0 0 10px; font-size: 1.05rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.actions { display: flex; gap: 8px; }

.tabs {
  display: inline-flex; padding: 3px; border-radius: 10px;
  background: #efe9df;
}
.tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 8px;
  cursor: pointer; font-weight: 500; color: var(--muted);
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 7px 14px; cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: #faf7f2; border-color: #d8cfc1; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible, .cell:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.tool:focus-visible, .fchip:focus-visible, .period-head .add:focus-visible, .col-add:focus-visible, .bar-row:focus-visible, .chip-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn.icon { padding: 7px 12px; font-size: 1.1rem; line-height: 1; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: #188046; border-color: #188046; }
.btn.danger { color: var(--danger); border-color: #ecc9c6; }
.btn.danger:hover { background: #fdf0ef; }

/* ---------- View ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: 20px; outline: none; }

/* Dia */
.day-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.day-head h2 { margin: 0; font-size: 1.5rem; }
.day-head .sub { color: var(--muted); font-size: .95rem; }
.progress {
  height: 6px; border-radius: 99px; background: #eadfd0; overflow: hidden; margin: 4px 0 18px;
}
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .25s; }

.period {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 14px; overflow: hidden;
}
.period-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #fbf8f3; border-bottom: 1px solid var(--line);
}
.period-head .emoji { font-size: 1.2rem; }
.period-head .name { font-weight: 700; letter-spacing: .04em; font-size: .85rem; }
.period-head .range { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.period-head .add {
  margin-left: auto; border: 0; background: transparent; color: var(--primary);
  font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.period-head .add:hover { background: #f3e9e9; }
.period-empty { padding: 14px 16px; color: var(--muted); font-size: .92rem; }

.item {
  display: grid; grid-template-columns: auto 92px 1fr auto; gap: 12px;
  align-items: start; padding: 12px 16px; border-top: 1px solid var(--line);
}
.item:first-of-type { border-top: 0; }
.item .time { font-family: var(--mono); font-size: .82rem; padding-top: 2px; color: var(--ink); }
.item .time.all { color: var(--muted); }
.item .ttl { font-weight: 600; }
.item .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.item .notes { color: var(--muted); font-size: .9rem; margin-top: 4px; white-space: pre-wrap; }
.item.done .ttl { text-decoration: line-through; color: var(--muted); }
.item .tools { display: flex; gap: 4px; }
.tool {
  border: 0; background: transparent; cursor: pointer; padding: 4px 8px; border-radius: 8px; color: var(--muted);
}
.tool:hover { background: #f3eee6; color: var(--ink); }

.check {
  width: 22px; height: 22px; margin-top: 1px; accent-color: var(--primary); cursor: pointer;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 12%, white); color: var(--c);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
[data-cat="omega"] { --c: var(--c-omega); }
[data-cat="nexus"] { --c: var(--c-nexus); }
[data-cat="tipassim"] { --c: var(--c-tipassim); }
[data-cat="faculdade"] { --c: var(--c-faculdade); }
[data-cat="pessoal"] { --c: var(--c-pessoal); }

/* Semana */
.week-hint { display: none; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.col {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-height: 320px; display: flex; flex-direction: column; overflow: hidden;
}
.col.today { border-color: var(--primary); }
.col-head {
  width: 100%; text-align: left; border: 0; background: #fbf8f3; cursor: pointer;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.col.today .col-head { background: var(--primary); color: #fff; }
.col-head .dow { font-size: .72rem; letter-spacing: .08em; font-weight: 700; opacity: .75; }
.col-head .num { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.col-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.col-empty { color: #b4a99a; font-size: .85rem; text-align: center; margin: auto; }
.col-add {
  border: 0; border-top: 1px dashed var(--line); background: transparent; padding: 8px;
  color: var(--muted); cursor: pointer;
}
.col-add:hover { color: var(--primary); background: #fbf8f3; }

.chip {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 0; border-left: 3px solid var(--c); border-radius: 6px;
  background: color-mix(in srgb, var(--c) 9%, white);
  padding: 5px 8px; font-size: .82rem; line-height: 1.3;
}
.chip .t { display: block; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.chip .n { display: block; font-weight: 600; overflow-wrap: anywhere; }
.chip.done .n { text-decoration: line-through; color: var(--muted); }

/* Mês */
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head div {
  padding: 8px 6px; text-align: center; font-size: .72rem; letter-spacing: .08em;
  font-weight: 700; color: var(--muted);
}
.month-grid {
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.cell {
  background: var(--surface); min-height: 112px; padding: 6px; text-align: left;
  border: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.cell:hover { background: #fdfbf8; }
.cell.out { background: #faf7f2; }
.cell.out .d { color: #b9ae9f; }
.cell .d { font-weight: 600; font-size: .85rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cell.today .d { background: var(--primary); color: #fff; }
.cell .mini {
  font-size: .72rem; line-height: 1.25; padding: 1px 5px; border-radius: 4px;
  border-left: 2px solid var(--c); background: color-mix(in srgb, var(--c) 9%, white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell .mini.done { text-decoration: line-through; color: var(--muted); }
.cell .more { font-size: .72rem; color: var(--muted); padding-left: 4px; }
.cell .count { display: none; }

/* ---------- Dialogs ---------- */
dialog {
  border: 0; border-radius: 16px; padding: 22px; width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); background: var(--surface); color: var(--ink);
}
@supports (height: 100dvh) { dialog { max-height: calc(100dvh - 24px); } }
dialog.wide { width: min(620px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(35, 26, 26, .45); }
dialog h2 { margin: 0 0 14px; font-size: 1.2rem; }
dialog label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
dialog input:not([type="radio"]), dialog select, dialog textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; color: var(--ink);
}
dialog textarea { resize: vertical; }
#shareText { font-family: var(--mono); font-size: .82rem; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.hint { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.form-error { margin: 0 0 8px; color: var(--danger); font-size: .88rem; min-height: 1.2em; }
.dlg-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

.seg { display: inline-flex; padding: 3px; background: #efe9df; border-radius: 10px; margin-bottom: 14px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: #231a1a; color: #fff; padding: 10px 16px; border-radius: 10px;
  max-width: calc(100vw - 24px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; font-size: .92rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .nav { grid-column: 1 / -1; order: 3; }
  .tabs { order: 2; grid-column: 1 / -1; display: flex; }
  .tab { flex: 1; }
  .actions { order: 1; }
  .brand { order: 0; }
  .week { grid-template-columns: 1fr; }
  .col { min-height: 0; flex-direction: column; }
  .col-head { display: flex; align-items: baseline; gap: 10px; }
  .col-head .num { font-size: 1.1rem; }
}
@media (max-width: 640px) {
  .view { padding: 12px; }
  .week-hint { display: block; margin: 0 0 8px; color: var(--muted); font-size: .82rem; }
  .week { display: flex; width: 100%; min-width: 0; overflow-x: auto; gap: 10px; padding: 2px 2px 12px; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
  .week .col { flex: 0 0 86%; scroll-snap-align: start; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  }
  .brand { order: 0; grid-column: 1; }
  .actions { order: 1; grid-column: 2; gap: 4px; }
  .nav { order: 2; grid-column: 1 / -1; }
  .nav-title { font-size: .95rem; }
  .btn.wa span, .brand-name, .period-head .range { display: none; }
  .btn, .btn.icon, .tool, .period-head .add, .col-head, .col-add, .fchip, .tab, .chip-btn, .bar-row {
    min-height: 44px;
  }
  .btn.icon, .tool { min-width: 44px; }
  .check { width: 24px; height: 24px; }
  .quick input, .quick select, dialog input:not([type="radio"]), dialog select { min-height: 44px; }
  .tabs {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    display: flex; order: initial; grid-column: auto;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 16px rgba(35, 26, 26, .08);
  }
  .view { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .period-head .add { white-space: nowrap; }
  .item { grid-template-columns: auto 1fr auto; }
  .item .check { grid-row: 1 / span 2; }
  .item .time { grid-column: 2; }
  .item .body { grid-column: 2; }
  .item .tools { grid-column: 3; grid-row: 1 / span 2; }
  .cell { min-height: 64px; align-items: center; }
  .cell .mini, .cell .more { display: none; }
  .cell .count {
    display: inline-grid; place-items: center; min-width: 24px; min-height: 24px;
    font-size: .7rem; font-weight: 700; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 5px;
  }
  .row { grid-template-columns: 1fr 1fr; }
  .row label:first-child { grid-column: 1 / -1; }
  .seg { display: grid; grid-template-columns: 1fr; width: 100%; }
  .seg span { min-height: 44px; padding: 8px 14px; text-align: left; }
  .file-button { display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px; }
  .file-button input { position: absolute; width: 1px !important; height: 1px; opacity: 0; }
  .backup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .topbar, .toast, .period-head .add, .item .tools, .col-add { display: none !important; }
  body { background: #fff; }
}

/* =====================================================================
   v2 — tarefas, foco, atrasadas, rotinas, filtros, painel, status
   ===================================================================== */
:root { --p-alta: #b3261e; --p-media: #c98a1b; --p-baixa: #3c8a5a; }

.btn.sync { background: #fff4e0; border-color: #ecd3a4; color: #7a5200; }
.btn.sync:hover { background: #ffecc8; }
.actions { align-items: center; }

/* Filtro por empresa */
.filters {
  display: flex; gap: 8px; padding: 10px 20px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.filters::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 5px 14px; font-size: .88rem; font-weight: 500; color: var(--muted);
}
.fchip[data-cat]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fchip:hover { background: #faf7f2; }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fchip[data-cat="omega"] { --c: var(--c-omega); } .fchip[data-cat="nexus"] { --c: var(--c-nexus); }
.fchip[data-cat="tipassim"] { --c: var(--c-tipassim); } .fchip[data-cat="faculdade"] { --c: var(--c-faculdade); }
.fchip[data-cat="pessoal"] { --c: var(--c-pessoal); }

/* Dia */
.day-head h2 small { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 99px; vertical-align: middle; margin-left: 6px; }
.day-head .btn { margin-left: auto; }
.period.late { border-color: #e6b8b4; }
.period.late .period-head { background: #fdf0ef; border-color: #f0cfcc; }
.period.late .period-head .name { color: var(--danger); }
.period.foco { border-color: #e4cfa6; }
.period.foco .period-head { background: #fbf3e2; border-color: #eddcb8; }
.period-head .range:last-child { margin-left: auto; }

/* Tarefas */
.item.task { grid-template-columns: auto 1fr auto; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.p-alta { background: var(--p-alta); } .p-media { background: var(--p-media); } .p-baixa { background: var(--p-baixa); }
.badge {
  display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; background: #efe9df; color: var(--muted);
}
.badge.task-time { color: var(--ink); font-family: var(--mono); }
.badge.late { background: #fdecea; color: var(--danger); }
.tool.star { font-size: 1.05rem; color: #b9ae9f; }
.tool.star.on { color: #d79a00; }
.tool.danger-text { color: var(--danger); }
.quick { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fffdf9; }
.quick input, .quick select {
  min-width: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}

/* Semana / mês */
.chip.tchip { border-left-style: dashed; background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.col .rot { font-size: .78rem; color: var(--muted); padding: 2px 4px; }
.cell .tk { font-size: .7rem; color: var(--muted); padding-left: 4px; }

/* Painel */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.kpi .k { font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.kpi b { font-size: 1.9rem; line-height: 1.1; }
.kpi b small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.kpi .sub { font-size: .82rem; color: var(--muted); }
.kpi.warn { border-color: #e6b8b4; background: #fffafa; }
.kpi.warn b { color: var(--danger); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bar-row {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; width: 100%;
  text-align: left; border: 0; background: transparent; padding: 6px 4px; border-radius: 8px; cursor: pointer;
}
.bar-row.static { cursor: default; }
.bar-row:not(.static):hover { background: #faf7f2; }
.bar-row .lab { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bar-row .lab.today { color: var(--primary); }
.bar-row .val { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.bar-row .val em { color: var(--muted); font-style: normal; font-family: var(--font); }
.bar { height: 10px; border-radius: 99px; background: #eadfd0; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar.alt i { background: #b9a07a; opacity: .75; }
.co { padding: 10px 0; border-top: 1px solid var(--line); }
.co:first-of-type { border-top: 0; padding-top: 0; }
.co-name { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.co .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.co[data-cat="omega"] { --c: var(--c-omega); } .co[data-cat="nexus"] { --c: var(--c-nexus); }
.co[data-cat="tipassim"] { --c: var(--c-tipassim); } .co[data-cat="faculdade"] { --c: var(--c-faculdade); }
.co[data-cat="pessoal"] { --c: var(--c-pessoal); }
.co .bar i { background: var(--c); }
.muted { color: var(--muted); }

/* Diálogos extras */
.row.two { grid-template-columns: 1fr 1fr; }
dialog h3 { margin: 16px 0 10px; font-size: 1rem; }
.check-row { display: flex !important; align-items: center; gap: 10px; color: var(--ink) !important; font-size: .95rem !important; font-weight: 500 !important; }
.check-row input { width: 18px !important; height: 18px; margin: 0 !important; accent-color: var(--primary); }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 12px; }
.fs legend { padding: 0 6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.file-button { position: relative; display: inline-flex !important; align-items: center; cursor: pointer; }
.file-button input {
  position: absolute; width: 1px !important; height: 1px; padding: 0 !important;
  margin: 0 !important; border: 0 !important; opacity: 0; overflow: hidden;
}
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.rlist { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 220px; overflow: auto; }
.rlist li { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.rlist li:first-child { border-top: 0; }
.rlist li > div { flex: 1; min-width: 0; }
.rlist li.empty { color: var(--muted); font-size: .9rem; }
.rlist .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-btn { border: 1px dashed #cdbfa9; background: #fbf8f3; border-radius: 99px; padding: 4px 12px; font-size: .82rem; cursor: pointer; color: var(--ink); }
.chip-btn:hover { background: #f3ece0; }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.days label { margin: 0; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: .85rem; color: var(--muted); }
.days input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.days input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .filters { padding: 8px 12px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick input { grid-column: 1 / -1; }
  .quick button { grid-column: 1 / -1; }
  .item.task { grid-template-columns: auto 1fr auto; }
  .item.task .tools { grid-column: 3; grid-row: 1; }
  .day-head .btn { margin-left: 0; width: 100%; justify-content: center; }
  .bar-row { grid-template-columns: 60px 1fr auto; gap: 8px; }
  .cell .tk { display: none; }
  .tab { padding: 6px 4px; }
}
@media print {
  .filters, .quick, .btn.sync { display: none !important; }
}
