/* ===== temas ===== */
:root, [data-theme="cyber"] { --bg:#0b0f14; --panel:#0f151c; --panel2:#151e28; --line:#202c39; --text:#d7e2ee; --muted:#7f90a3; --accent:#19e3b1; --accent-ink:#04201a; --danger:#ff4d6d; --p1:#ff4d6d; --p2:#ffa94d; --p3:#4dabff; --p4:#6b7b8c; --over:#ff6b81; --today:#19e3b1; --tomorrow:#ffb066; --week:#b57bff; --shadow:0 12px 40px rgba(0,0,0,.5); --scrim:rgba(0,0,0,.55); }
[data-theme="dark"] { --bg:#1b1b1d; --panel:#242427; --panel2:#2d2d31; --line:#3a3a3f; --text:#ececee; --muted:#9a9aa3; --accent:#e5533d; --accent-ink:#fff; --p1:#ff6a55; --p2:#ffa94d; --p3:#5aa9ff; --p4:#808089; --over:#ff6a55; --today:#3fb871; --tomorrow:#e0913c; --week:#a78bfa; }
[data-theme="light"] { --bg:#ffffff; --panel:#f7f5f2; --panel2:#efece8; --line:#e2ddd6; --text:#202020; --muted:#6b6b6b; --accent:#db4c3f; --accent-ink:#fff; --p1:#d1453b; --p2:#eb8909; --p3:#246fe0; --p4:#808080; --over:#d1453b; --today:#058527; --tomorrow:#ad6200; --week:#692fc2; --shadow:0 12px 40px rgba(0,0,0,.18); --scrim:rgba(0,0,0,.35); }
[data-theme="purple"] { --bg:#16101f; --panel:#1d1529; --panel2:#271c38; --line:#352649; --text:#ece4f7; --muted:#9d8cb5; --accent:#b57bff; --accent-ink:#1a0b30; --p1:#ff5c8a; --p2:#ffb347; --p3:#6cb6ff; --p4:#7d6f93; --over:#ff5c8a; --today:#7be0b0; --tomorrow:#ffb347; --week:#d0a8ff; }
[data-theme="sunset"] { --bg:#1a1210; --panel:#221815; --panel2:#2c201c; --line:#3d2c26; --text:#f3e6df; --muted:#a58f84; --accent:#ff9248; --accent-ink:#2a1100; --p1:#ff5b5b; --p2:#ffb84d; --p3:#58b0ff; --p4:#85746b; --over:#ff6b5b; --today:#7fd18b; --tomorrow:#ffc266; --week:#c79bff; }
[data-theme="contrast"] { --bg:#000; --panel:#0a0a0a; --panel2:#161616; --line:#6a6a6a; --text:#fff; --muted:#c8c8c8; --accent:#ffe600; --accent-ink:#000; --p1:#ff5555; --p2:#ffaa00; --p3:#55aaff; --p4:#bbb; --over:#ff6666; --today:#55ff88; --tomorrow:#ffcc55; --week:#d6a8ff; }

:root { color-scheme: dark; } [data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
kbd { font: 11px/1 ui-monospace, Consolas, monospace; background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--muted); }
.muted { color: var(--muted); } .sm { font-size: 12.5px; } .grow { flex: 1; min-width: 0; } .block { display: block; } .mono { font-family: ui-monospace, Consolas, monospace; }
.row { display: flex; align-items: center; } .row.gap { gap: 8px; } .row.end { justify-content: flex-end; margin-top: 14px; } .row.wrap { flex-wrap: wrap; } .pad { padding: 8px 10px; }
.ico { flex: none; }
.hashdot { font-style: normal; font-weight: 700; margin-right: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 56px 0; } .empty.err { color: var(--danger); }
.linklike { background: none; border: 0; color: var(--accent); padding: 0; text-align: left; } .linklike:hover { text-decoration: underline; }

/* ===== layout ===== */
.app { display: flex; height: 100vh; position: relative; }
.sidebar { width: 288px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.app.sb-collapsed .sidebar { display: none; }
.app > .sb-reopen { position: absolute; left: calc(max(24px, (100% - 860px) / 2) + 18px); top: 26px; width: 36px; height: 36px; z-index: 3; }
.app.sb-collapsed .page-head { padding-left: 44px; }
.app.sb-collapsed .sb-reopen svg { width: 22px; height: 22px; }
.app:not(.sb-collapsed) .sb-reopen { display: none; }
.app.sb-collapsed .sb-reopen { display: inline-flex; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobilebar { display: none; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.view { flex: 1; overflow-y: auto; padding: 28px 24px 120px; }
.page { max-width: 860px; margin: 0 auto; }
.app.sb-collapsed .page { padding-left: 24px; }
.sb-scrim { display: none; }

.sb-top { display: flex; align-items: center; gap: 2px; padding: 0 4px 6px; }
.user { display: flex; align-items: center; gap: 8px; background: none; border: 0; border-radius: 8px; padding: 4px 6px; font-weight: 600; }
.user:hover, .icon-btn:hover { background: var(--panel2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.icon-btn { background: none; border: 0; border-radius: 6px; padding: 5px 7px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.icon-btn:hover { color: var(--text); } .icon-btn[disabled] { opacity: .35; cursor: default; } .icon-btn.on { color: var(--accent); }
.bell-dot { position: absolute; top: 3px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.add-task-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--accent); font-weight: 600; padding: 8px; border-radius: 8px; text-align: left; }
.add-task-btn:hover { background: var(--panel2); }
.plus { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; line-height: 1; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: none; border: 0; text-align: left; color: var(--text); width: 100%; }
.nav-item:hover { background: var(--panel2); } .nav-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.todayico { width: 18px; height: 18px; border: 1.8px solid currentColor; border-radius: 4px; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.count { margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.sb-section { margin-top: 10px; }
.sb-title { display: flex; align-items: center; padding: 2px 4px 2px 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.sb-fold { background: none; border: 0; color: inherit; display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; font-weight: 600; }
.sb-fold[aria-expanded="false"] .ico { transform: rotate(-90deg); } .sb-fold:hover { color: var(--text); }
.proj-row { display: flex; align-items: center; border-radius: 8px; position: relative; }
.proj-row:hover { background: var(--panel2); } .proj-row.active { background: color-mix(in srgb, var(--accent) 16%, transparent); } .proj-row.archived { opacity: .55; }
.proj-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 4px; }
.proj-link .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-more { opacity: 0; } .proj-row:hover .proj-more { opacity: 1; }
.fold-sp { width: 22px; flex: none; }
.t-fold { background: none; border: 0; color: var(--muted); padding: 2px; border-radius: 4px; display: inline-flex; flex: none; } .t-fold:hover { color: var(--text); }
.t-fold .ico { transition: transform .15s; } .t-fold.closed .ico { transform: rotate(-90deg); }
.sb-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 2px; } .sb-foot .nav-item { flex: 1; min-width: 0; }
.sb-top { gap: 8px; } .mode-sw { display: flex; gap: 2px; background: var(--panel2); border-radius: 8px; padding: 2px; } .mode-btn { background: none; border: 0; border-radius: 6px; padding: 5px 9px; font-weight: 600; font-size: 13px; color: var(--muted); } .mode-btn:hover { color: var(--text); } .mode-btn.on { background: var(--bg); color: var(--accent); box-shadow: 0 0 0 1px var(--line); }
.search-btn kbd { margin-left: auto; }

/* ===== cabeçalho de página ===== */
.page-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.2; } h1 { font-size: 26px; margin: 0 0 14px; }
.view-meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 6px; }
.mod-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff9248; margin-left: 4px; }

/* ===== grupos e seções ===== */
.section { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 6px; padding: 6px 0 6px; border-bottom: 1px solid var(--line); font-weight: 700; flex-wrap: wrap; }
.group-head.big { margin-top: 22px; font-size: 16px; }
.group-head.overdue .gh-title { color: var(--over); } .group-head.todayhead .gh-title { color: var(--accent); }
.gh-count { color: var(--muted); font-weight: 400; font-size: 12.5px; } .gh-desc { width: 100%; color: var(--muted); font-weight: 400; font-size: 12.5px; padding-left: 28px; }
.sec-drag, .t-drag { color: var(--muted); cursor: grab; opacity: 0; display: inline-flex; } .group-head:hover .sec-drag, .task:hover .t-drag { opacity: .8; }
.section.closed .group-head { border-bottom-color: transparent; }
.add-sec { height: 22px; position: relative; margin: 2px 0; }
.add-sec-btn { width: 100%; background: none; border: 0; display: flex; align-items: center; gap: 8px; color: var(--accent); opacity: 0; font-weight: 600; font-size: 12.5px; height: 22px; }
.add-sec:hover .add-sec-btn, .add-sec-btn:focus-visible { opacity: 1; } .add-sec-btn .line { flex: 1; height: 1px; background: var(--accent); }
.add-inline { display: flex; align-items: center; gap: 8px; color: var(--muted); background: none; border: 0; padding: 9px 4px; width: 100%; text-align: left; }
.add-inline:hover { color: var(--accent); }

/* ===== tarefas ===== */
.task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px 9px 2px; border-bottom: 1px solid var(--line); position: relative; border-radius: 4px; }
.task:hover { background: color-mix(in srgb, var(--panel2) 55%, transparent); }
.task.selected { background: color-mix(in srgb, var(--accent) 14%, transparent); } .task.focused { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -2px; }
.task.dragging { opacity: .4; } .task.compact { padding: 6px 2px; } .task.card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin-bottom: 8px; padding: 9px 8px; }
.task.drop-before { box-shadow: 0 -2px 0 var(--accent); } .task.drop-after { box-shadow: 0 2px 0 var(--accent); } .task.drop-child { box-shadow: inset 28px 0 0 color-mix(in srgb, var(--accent) 22%, transparent); }
.check { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--p4); background: transparent; display: grid; place-items: center; padding: 0; position: relative; transition: transform .12s; }
.check.p1 { border-color: var(--p1); } .check.p2 { border-color: var(--p2); } .check.p3 { border-color: var(--p3); }
.check:hover::after { content: "\2713"; color: var(--muted); font-size: 12px; font-weight: 700; }
.check.pop-anim { transform: scale(1.25); background: var(--accent); border-color: var(--accent); } .check.pop-anim::after { content: "\2713"; color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.task.done .check { background: var(--muted); border-color: var(--muted); } .task.done .check::after { content: "\2713"; color: var(--bg); font-size: 12px; font-weight: 700; }
.check.nocheck { border-style: dotted; opacity: .6; } .check.big { width: 24px; height: 24px; margin-top: 6px; } .check.sm { width: 14px; height: 14px; border-width: 1.5px; margin: 0; }
.t-body { flex: 1; min-width: 0; } .t-titleline { display: flex; align-items: center; gap: 4px; }
.t-title { word-break: break-word; cursor: pointer; } .task.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-title code, .md code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.t-title a, .md a { color: var(--accent); text-decoration: underline; }
.t-desc { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; background: none; border: 0; padding: 0; white-space: nowrap; }
.chip.big { background: var(--panel2); border-radius: 999px; padding: 4px 10px; }
.chip.due-over { color: var(--over); } .chip.due-today { color: var(--today); } .chip.due-tomorrow { color: var(--tomorrow); } .chip.due-week { color: var(--week); }
.chip.deadline { color: var(--p2); } .chip.deadline.over { color: var(--over); } .chip.lbl { color: var(--p3); } .chip.new { color: var(--accent); }
.chip-x { background: none; border: 0; color: var(--muted); padding: 0 2px; font-size: 14px; line-height: 1; } .chip-x:hover { color: var(--danger); }
.t-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.t-acts { display: flex; opacity: 0; } .task:hover .t-acts, .task:focus-within .t-acts, .task.focused .t-acts { opacity: 1; }
.t-proj { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .t-proj:hover { color: var(--text); }
.card .t-right { display: none; } .compact .t-acts { display: none; }
.tlist { min-height: 6px; }
.drop-over { outline: 2px dashed var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.group-head.drop-before { box-shadow: 0 -2px 0 var(--accent); }

/* ===== formulário de tarefa ===== */
.tform { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 8px; background: var(--panel); margin: 6px 0 10px; }
.tf-title { width: 100%; background: none; border: 0; outline: none; font-size: 16px; font-weight: 600; padding: 4px 0; }
.tf-desc { width: 100%; background: none; border: 0; outline: none; resize: none; color: var(--muted); font-size: 13px; padding: 2px 0 6px; min-height: 22px; overflow: hidden; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; min-height: 0; margin-bottom: 4px; } .tf-chips:empty { display: none; }
.tf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.tf-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--muted); font-size: 12.5px; }
.tf-btn:hover { color: var(--text); background: var(--panel2); } .tf-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tf-btn.due-over { color: var(--over); } .tf-btn.due-today { color: var(--today); } .tf-btn.due-tomorrow { color: var(--tomorrow); } .tf-btn.due-week { color: var(--week); }
.tf-btn.prio1 { color: var(--p1); } .tf-btn.prio2 { color: var(--p2); } .tf-btn.prio3 { color: var(--p3); } .tf-btn.proj { border: 0; }
.tf-err { color: var(--danger); font-size: 12.5px; min-height: 0; } .tf-err:empty { display: none; }
.flag-1 { color: var(--p1); } .flag-2 { color: var(--p2); } .flag-3 { color: var(--p3); } .flag-4 { color: var(--p4); }
.qa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .qa-keep { font-size: 12.5px; color: var(--muted); }

/* ===== botões e campos ===== */
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--muted); } .btn.sm { padding: 3px 9px; font-size: 12.5px; } .btn[disabled] { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; } .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.field { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; outline: none; } .field:focus { border-color: var(--accent); }
.field.sm { width: auto; padding: 4px 8px; font-size: 13px; } textarea.field { resize: vertical; }
.lbl { display: block; margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; } label.lbl.row { display: flex; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .seg-b { background: none; border: 0; padding: 5px 12px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); } .seg-b.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; } .swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; } .swatch.on { border-color: var(--text); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel2); } .badge.great { background: color-mix(in srgb, #3fb871 25%, transparent); color: #3fb871; } .badge.ok { background: color-mix(in srgb, var(--p3) 22%, transparent); color: var(--p3); } .badge.warn { background: color-mix(in srgb, var(--p2) 22%, transparent); color: var(--p2); } .badge.bad { background: color-mix(in srgb, var(--p1) 22%, transparent); color: var(--p1); }

/* ===== popovers e menus ===== */
.pop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 190px; max-width: min(94vw, 360px); max-height: 80vh; overflow: auto; }
.menu { padding: 5px; } .menu-item { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; border-radius: 6px; padding: 6px 9px; text-align: left; } .menu-item:hover, .menu-item:focus { background: var(--panel2); outline: none; }
.menu-item.danger { color: var(--danger); } .menu-item[disabled] { opacity: .4; } .ico-sp { width: 16px; flex: none; } .hint { color: var(--muted); font-size: 12px; } .menu-sep { height: 1px; background: var(--line); margin: 4px 0; } .menu-head { padding: 6px 9px 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.menu-item.checked { color: var(--accent); }
.menu-rowbox { padding: 4px 9px 6px; } .menu-rowhead { font-size: 12.5px; font-weight: 600; margin: 4px 0 6px; } .menu-row { display: flex; gap: 6px; }
.menu-ico { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 8px; padding: 0; color: var(--muted); } .menu-ico:hover, .menu-ico:focus-visible { background: var(--panel2); outline: none; } .menu-ico.on { border-color: var(--line); background: var(--panel2); }
.menu-ico-n { position: absolute; left: 0; right: 0; top: 17px; text-align: center; font-size: 9px; font-weight: 700; line-height: 1; pointer-events: none; }
.picker { padding: 8px; width: 280px; } .picker-pop.wide .picker { width: 340px; } .picker .field { margin-bottom: 6px; }
.picker-list { max-height: 260px; overflow: auto; } .picker-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-radius: 6px; padding: 6px 8px; text-align: left; } .picker-row:hover { background: var(--panel2); } .picker-row.sel { color: var(--accent); } .picker-row.create { color: var(--accent); }
.datepick { padding: 10px; width: 300px; } .dp-feedback { min-height: 18px; color: var(--accent); font-size: 12.5px; padding: 2px 2px 4px; }
.dp-opt { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; padding: 6px 6px; border-radius: 6px; text-align: left; } .dp-opt:hover { background: var(--panel2); }
.dp-head { display: flex; align-items: center; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; } .dot-today { width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; display: block; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .dp-dow { text-align: center; color: var(--muted); font-size: 11px; padding: 3px 0; }
.dp-day { aspect-ratio: 1; background: none; border: 0; border-radius: 50%; position: relative; font-size: 12.5px; } .dp-day:hover { background: var(--panel2); } .dp-day.out { color: var(--muted); opacity: .55; } .dp-day.past { opacity: .5; }
.dp-day.today { color: var(--accent); font-weight: 700; } .dp-day.sel { background: var(--accent); color: var(--accent-ink); } .dp-dot { position: absolute; bottom: 3px; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); margin-left: -1.5px; }
.dp-toggle { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); margin-top: 8px; padding: 8px 0 2px; color: var(--muted); text-align: left; } .dp-toggle:hover { color: var(--text); }
.dp-adv { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; } .dp-row { display: flex; align-items: center; gap: 8px; } .dp-row.sub { padding-left: 24px; font-size: 12.5px; color: var(--muted); }
.dp-hint { font-size: 12px; min-height: 16px; color: var(--muted); } .dp-hint.ok { color: var(--accent); } .dp-hint.bad { color: var(--danger); }
.showmenu { padding: 10px 12px; width: 320px; } .sm-sec { padding: 6px 0 8px; border-bottom: 1px solid var(--line); } .sm-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; } .sm-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 2px; }
.sm-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; } .sm-row.big { padding: 10px 0; border-bottom: 1px solid var(--line); } .sm-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; } .chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.sm-foot { padding-top: 8px; display: flex; justify-content: flex-end; }

/* ===== modais ===== */
.modal-back { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: start center; padding: 8vh 12px 12px; z-index: 40; overflow: auto; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); width: min(620px, 100%); }
.modal-box.small { width: min(440px, 100%); } .modal-box.mid { width: min(640px, 100%); } .modal-box h3 { margin: 0 0 6px; }
.modal-box.qa-modal { width: min(620px, 100%); padding: 14px; } .confirm-msg { margin: 0 0 6px; }
.tv-modal { width: min(920px, 100%); padding: 0; } .tv { max-height: 84vh; overflow: auto; }
.tv-head { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; border-radius: 14px 14px 0 0; }
.tv-crumbs { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; } .tv-crumbs a:hover { color: var(--text); }
.tv-cols { display: grid; grid-template-columns: 1fr 210px; } .tv-main { padding: 14px 18px 24px; min-width: 0; } .tv-side { padding: 12px 10px; background: var(--panel2); border-radius: 0 0 14px 0; display: flex; flex-direction: column; gap: 4px; }
.tv-titlerow { display: flex; gap: 10px; align-items: flex-start; } .tv-title { flex: 1; background: none; border: 0; outline: none; font-size: 20px; font-weight: 700; resize: none; overflow: hidden; padding: 2px 0; }
.tv-desc-wrap { margin: 4px 0 14px 34px; } .tv-desc { cursor: text; } .tv-desc-edit { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; outline: none; resize: vertical; }
.rich { outline: none; text-align: left; min-height: 24px; word-break: break-word; cursor: text; } .rich.empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.tv-desc.rich { background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin-left: -8px; min-height: 48px; } .tv-desc.rich:hover { background: var(--panel2); } .tv-desc.rich:focus { background: var(--panel2); border-color: var(--line); }
.tf-desc.rich { color: var(--muted); font-size: 13px; padding: 2px 0 6px; min-height: 22px; } .rich s { opacity: .8; } .rich strong { color: var(--text); }
.md p { margin: 0 0 4px; } .md ul, .md ol { margin: 2px 0 4px; padding-left: 22px; } .md blockquote { margin: 2px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); } .md h3, .md h4 { margin: 6px 0 2px; }
.tv-sec { margin-top: 16px; } .tv-sec h4, .tv-sec summary { margin: 0 0 6px; font-size: 14px; cursor: default; } details.tv-sec summary { cursor: pointer; }
.tv-field { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: left; width: 100%; border-radius: 4px; } .tv-field:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }
.tv-flabel { font-size: 12px; color: var(--muted); font-weight: 600; } .tv-fval { display: flex; align-items: center; gap: 6px; } .tv-rec { font-size: 12px; padding: 0 4px; }
.comment { border-top: 1px solid var(--line); padding: 8px 0; } .cm-head { display: flex; justify-content: space-between; font-size: 12px; } .cm-img { max-width: 100%; max-height: 260px; border-radius: 8px; margin-top: 6px; display: block; } .cm-file { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); margin-top: 6px; }
.cm-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-top: 8px; } .cm-input { width: 100%; background: none; border: 0; outline: none; min-height: 44px; max-height: 240px; overflow-y: auto; padding: 4px 2px; } .cm-files { display: flex; gap: 6px; flex-wrap: wrap; } .icon-btn.rec { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } } .act { font-size: 12.5px; padding: 2px 0; }
.search-modal { width: min(620px, 100%); padding: 10px; } .search-in { font-size: 16px; padding: 10px 12px; } .search-list { max-height: 55vh; overflow: auto; margin-top: 8px; }
.search-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 8px 10px; border-radius: 8px; text-align: left; } .search-item.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.settings { display: grid; grid-template-columns: 170px 1fr; gap: 18px; min-height: 380px; } .set-modal { width: min(820px, 100%); }
.set-nav { display: flex; flex-direction: column; gap: 2px; } .set-tab { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 8px; color: var(--muted); } .set-tab.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); } .set-main h3 { margin-top: 0; } .set-main h4 { margin: 18px 0 6px; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .theme-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 10px; align-items: flex-start; } .theme-card.on { border-color: var(--accent); }
.tswatch { width: 100%; height: 34px; border-radius: 6px; } .t-cyber { background: linear-gradient(90deg, #0b0f14 70%, #19e3b1 70%); } .t-dark { background: linear-gradient(90deg, #1b1b1d 70%, #e5533d 70%); } .t-light { background: linear-gradient(90deg, #fff 70%, #db4c3f 70%); border: 1px solid #ddd; } .t-purple { background: linear-gradient(90deg, #16101f 70%, #b57bff 70%); } .t-sunset { background: linear-gradient(90deg, #1a1210 70%, #ff9248 70%); } .t-contrast { background: linear-gradient(90deg, #000 70%, #ffe600 70%); border: 1px solid #888; }
.shortcuts table { width: 100%; border-collapse: collapse; margin-bottom: 10px; } .shortcuts td { padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 13px; } .shortcuts td:first-child { white-space: nowrap; width: 46%; } .kbds { margin-right: 10px; } .kbds kbd { margin-right: 3px; } .shortcuts h4 { margin: 12px 0 4px; }
.fhelp { margin: 8px 0; } .fhelp table { width: 100%; border-collapse: collapse; margin-top: 6px; } .fhelp td { padding: 3px 6px; border-bottom: 1px solid var(--line); font-size: 12.5px; } .fhelp code { color: var(--accent); }
.tplgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; } .tplcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel2); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .tplcard p { margin: 0; flex: 1; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 90; width: min(94vw, 460px); }
.toast { display: flex; align-items: center; gap: 12px; background: #222a33; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); } .toast-btn { background: none; border: 0; color: #19e3b1; font-weight: 600; } .toast-x { background: none; border: 0; color: #aab; font-size: 18px; line-height: 1; }
.batchbar { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); z-index: 50; max-width: 96vw; }

/* ===== Em breve ===== */
.weekstrip { display: flex; align-items: center; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; } .wd { flex: 1; background: none; border: 0; border-radius: 8px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); position: relative; } .wd:hover:not([disabled]) { background: var(--panel2); } .wd[disabled] { opacity: .35; cursor: default; }
.wd-n { font-size: 10.5px; } .wd-d { font-size: 17px; font-weight: 600; color: var(--text); } .wd.today .wd-d { color: var(--accent); } .wd.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); } .wd-dot { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.more-days { margin: 10px auto; display: flex; }

/* ===== painel ===== */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 20px; margin: 0 -8px; padding-left: 8px; } .bcol { flex: none; width: 290px; background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 6px; max-height: 76vh; overflow-y: auto; } .bcol.add { background: none; border-style: dashed; }
.bcards { padding-top: 8px; min-height: 8px; } .view:has(.board) .page, .page:has(.board) { max-width: none; }

/* ===== calendário ===== */
.page:has(.cal-wrap) { max-width: none; } .cal-wrap { display: flex; gap: 14px; align-items: flex-start; } .cal-main { flex: 1; min-width: 0; } .cal-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; } .cal-bar strong { font-size: 16px; }
.cal-main { overflow-x: auto; } .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 790px; } .cal-dow { padding: 6px; text-align: center; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-transform: uppercase; }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; min-height: 104px; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .cal-grid.week .cal-cell { min-height: 360px; } .cal-cell.out { opacity: .5; } .cal-cell.today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cal-day { text-align: right; font-size: 12.5px; color: var(--muted); } .cal-cell.today .cal-day button { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; }
.cal-chip { display: flex; align-items: center; gap: 5px; border-left: 3px solid var(--p4); background: var(--panel2); border-radius: 4px; padding: 3px 6px; font-size: 12px; cursor: pointer; min-width: 0; } .cal-chip.done { opacity: .5; text-decoration: line-through; } .cal-chip.ghost { opacity: .55; border-style: dashed; cursor: default; } .cal-chip.focused { outline: 2px solid var(--accent); }
.cc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .cal-side { width: 230px; flex: none; display: flex; flex-direction: column; gap: 4px; }

/* ===== cartões, gráficos ===== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; } .card h3 { margin: 0 0 8px; font-size: 15px; }
.progress { height: 8px; background: var(--panel2); border-radius: 999px; overflow: hidden; margin: 8px 0; } .progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; } .progress.sm { width: 140px; margin: 0; flex: none; }
.karma .streak { display: inline-flex; align-items: center; gap: 4px; color: var(--p2); font-weight: 700; } .chart { width: 100%; max-width: 420px; } .chart .bar { fill: var(--accent); } .chart text { fill: var(--muted); font-size: 10px; } .chart .val { fill: var(--text); }
.ring { width: 84px; height: 84px; } .ring .rbg { fill: none; stroke: var(--panel2); stroke-width: 8; } .ring .rfg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; } .ring text { fill: var(--text); font-size: 14px; font-weight: 700; } .ringbox { text-align: center; }
.plist { display: flex; flex-direction: column; } .prow { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); } .prow-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 4px; min-width: 0; } .prow-main:hover { background: var(--panel2); } a.prow-main.card { margin-bottom: 8px; }
ul.plain { margin: 0; padding-left: 18px; }

/* ===== responsivo ===== */
@media (max-width: 800px) {
  .mobilebar { display: flex; } .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-102%); transition: transform .2s; width: min(86vw, 320px); box-shadow: var(--shadow); }
  .app.sb-open .sidebar { transform: none; } .app.sb-open .sb-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 25; } .app.sb-collapsed .sidebar { display: flex; } .app.sb-collapsed .sb-reopen { display: none; }
  .view { padding: 16px 14px 120px; } .tv-cols { grid-template-columns: 1fr; } .tv-side { border-radius: 0 0 14px 14px; } .settings { grid-template-columns: 1fr; } .set-nav { flex-direction: row; flex-wrap: wrap; }
  .cal-wrap { flex-direction: column; } .cal-side { width: 100%; } .t-acts { opacity: 1; } .t-right .t-proj { display: none; } .cal-grid.week .cal-cell { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== impressão ===== */
@media print {
  .sidebar, .mobilebar, .sb-reopen, .page-actions, .add-inline, .add-sec, .t-acts, .toasts, .batchbar, .t-drag, .sec-drag { display: none !important; }
  body, .app { height: auto; background: #fff; color: #000; display: block; } .view { overflow: visible; padding: 0; } .task { break-inside: avoid; border-color: #ccc; }
  :root, [data-theme] { --bg: #fff; --panel: #fff; --panel2: #f2f2f2; --line: #ccc; --text: #000; --muted: #555; }
}

/* ===== PROTÓTIPO: notas ===== */
.proto-tag { position: fixed; right: 10px; bottom: 10px; z-index: 30; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; pointer-events: none; }
.plus.note { display: inline-grid; place-items: center; color: var(--muted); }
.note-ico { flex: none; width: 20px; display: grid; place-items: center; color: var(--muted); margin-top: 1px; } .note-ico.big { width: 24px; margin-top: 6px; }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 10px; }
.ptab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 12px; color: var(--muted); } .ptab:hover { color: var(--text); } .ptab.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.notes-page .view-body .add-inline, .notes-page .add-sec { display: none; }
.modal-back.tv-full { padding: 0; } .tv-full .tv-modal { width: 100%; border-radius: 0; border: 0; } .tv-full .tv { max-height: 100vh; height: 100vh; } .tv-full .tv-cols { min-height: calc(100vh - 52px); } .tv-full .tv-head, .tv-full .tv-side { border-radius: 0; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .note-head h4 { margin: 0; }
.note-saved { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; } .note-saved i { width: 7px; height: 7px; border-radius: 50%; background: var(--today); } .note-saved.busy i { background: var(--tomorrow); }
.note-ed { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.note-bar { display: flex; align-items: center; gap: 1px; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; position: sticky; top: 49px; background: var(--bg); border-radius: 10px 10px 0 0; z-index: 1; }
.note-btn { background: none; border: 0; border-radius: 6px; padding: 5px 7px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; font-size: 13px; flex: none; } .note-btn:hover, .note-btn.on { background: var(--panel2); color: var(--text); } .note-btn.ins { color: var(--accent); font-weight: 600; }
.note-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; flex: none; } .note-color { display: inline-block; width: 10px; height: 3px; background: var(--p1); margin-left: 2px; }
.note-doc { padding: 14px 16px 18px; min-height: 220px; outline: none; line-height: 1.55; word-break: break-word; } .note-doc:empty::before { content: "Escreva a nota… digite / para inserir"; color: var(--muted); }
.note-doc.ro { min-height: 0; padding: 4px 0; } .note-doc h2 { font-size: 18px; margin: 4px 0 6px; } .note-doc h3 { font-size: 15px; margin: 12px 0 4px; } .note-doc p { margin: 0 0 8px; } .note-doc hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; } .note-doc a { color: var(--accent); text-decoration: underline; }
.note-doc table { border-collapse: collapse; width: 100%; margin: 8px 0; } .note-doc td, .note-doc th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; } .note-doc th { background: var(--panel2); }
.note-doc ul.chk { display: block; list-style: none; padding-left: 2px; font-size: inherit; } .note-doc ul.chk li { display: flex; gap: 8px; align-items: baseline; }
.nb { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: var(--panel); display: flex; align-items: center; gap: 10px; user-select: none; color: var(--muted); font-size: 13px; }
.nb.draw { flex-direction: column; align-items: stretch; cursor: pointer; } .nb.draw svg { width: 100%; height: 120px; background: var(--bg); border-radius: 6px; color: var(--text); }
.nb.img { justify-content: center; height: 120px; background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 10px, var(--panel2) 10px, var(--panel2) 20px); }
.nb-wave { flex: 1; height: 22px; background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 5px); opacity: .5; border-radius: 3px; }
.note-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 10px; border-top: 1px solid var(--line); color: var(--muted); }
.note-tag { background: var(--panel2); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; color: var(--text); display: inline-flex; align-items: center; gap: 2px; } .note-tagin { background: none; border: 0; outline: none; flex: 1; min-width: 120px; font-size: 13px; }
.note-menu { position: fixed; z-index: 90; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; width: 256px; max-height: 340px; overflow: auto; }
.note-menu-head { margin: 6px 8px 2px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .note-menu button { display: block; width: 100%; background: none; border: 0; border-radius: 6px; padding: 6px 8px; text-align: left; } .note-menu button:hover, .note-menu button.on { background: var(--panel2); } .note-menu button.on { box-shadow: inset 2px 0 0 var(--accent); }
.att { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); } .occ { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; } .note-hint { padding: 8px 4px; }
.note-btn.md.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.note-doc h4 { font-size: 14px; margin: 10px 0 4px; } .note-doc blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); } .note-doc code { font: 13px ui-monospace, Consolas, monospace; background: var(--panel2); border-radius: 4px; padding: 1px 5px; } .note-doc ul, .note-doc ol { margin: 4px 0 8px; padding-left: 24px; }
.note-max-btn { font-size: 12.5px; gap: 5px; } .note-title { display: none; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.note-sec.note-max { position: fixed; inset: 0; z-index: 70; margin: 0; background: var(--panel); padding: 12px 18px 16px; display: flex; flex-direction: column; }
.note-max .note-head { flex: none; } .note-max .note-title { display: block; }
.note-max .note-ed { flex: 1; min-height: 0; display: flex; flex-direction: column; } .note-max .note-bar { position: static; flex: none; flex-wrap: wrap; } .note-max .note-tags { flex: none; }
.note-max .note-doc { flex: 1; overflow: auto; font-size: 16px; padding: 22px max(20px, calc((100% - 860px) / 2)) 40px; }
/* ===== nota: interface do editor (protótipo) ===== */
.tv-cols.is-note { grid-template-columns: 1fr 200px; } .is-note .tv-main { padding: 18px 28px 28px; }
.is-note .tv-title { font-size: 28px; line-height: 1.25; } .is-note .tv-titlerow { margin-bottom: 4px; }
.is-note .note-sec { margin-top: 8px; } .is-note .note-head { justify-content: flex-end; margin-bottom: 8px; }
.is-note .note-ed { border: 1px solid var(--line); background: var(--bg); } .is-note .note-ed:focus-within { border-color: var(--accent); }
.is-note .note-bar { top: 52px; }
.is-note .note-doc { min-height: 320px; font-size: 15.5px; }

.is-note .tv-files { margin-top: 10px; } .is-note .tv-files .add-inline { padding-left: 0; }
.is-note details.tv-sec { margin-top: 18px; color: var(--muted); } .is-note details.tv-sec summary { font-size: 13px; }
.note-conv { padding: 12px 4px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } .note-conv p { margin: 0; }
@media (max-width: 800px) { .tv-cols.is-note { grid-template-columns: 1fr; } .is-note .tv-main { padding: 14px 16px 20px; } }
.is-note .tv-files { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; margin-top: 12px; }
.is-note .tv-files .att:last-of-type { border-bottom: 0; }
.is-note details.tv-sec { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; margin-top: 12px; }

/* imagens coladas na nota: nunca passam da largura do campo */
.note-doc { min-width: 0; overflow-wrap: anywhere; } .note-doc img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.tv-cols.is-note { grid-template-columns: minmax(0, 1fr) 200px; } .tv-cols { grid-template-columns: minmax(0, 1fr) 210px; } .tv-main, .note-ed, .note-sec { min-width: 0; max-width: 100%; }
@media (max-width: 800px) { .tv-cols, .tv-cols.is-note { grid-template-columns: minmax(0, 1fr); } }

/* ===== filtro de projetos ===== */
.proj-btn.on { color: var(--accent); border-color: var(--accent); }
.projpick { min-width: 260px; max-width: 340px; padding: 6px; } .projpick-head { display: flex; align-items: center; padding: 4px 8px 8px; }
.projpick-list { max-height: 340px; overflow: auto; display: flex; flex-direction: column; }
.projpick-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; } .projpick-row:hover { background: var(--panel2); }
.projpick-row .only { opacity: 0; } .projpick-row:hover .only, .projpick-row .only:focus-visible { opacity: 1; }
.page > .projpick { max-width: none; padding: 0; margin-bottom: 18px; border-top: 1px solid var(--line); } .page > .projpick .projpick-list { max-height: none; }

/* ===== lixeira ===== */
.trash-row { gap: 12px; align-items: center; } .trash-main { min-width: 0; } .trash-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-link { position: relative; display: inline-grid; place-items: center; }
.sb-foot .nav-item { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sb-foot .icon-btn { flex: none; }

/* ===== anexos, miniaturas e favoritas ===== */
.att-thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted); } .att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-name { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); } .att-name:hover { color: var(--accent); }
.tv-files.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.note-thumb { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex: none; margin-left: 10px; background: var(--panel2); border: 1px solid var(--line); } .note-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-mark { color: var(--p2); margin-left: 6px; display: inline-flex; vertical-align: -2px; } .fav-mark svg { fill: currentColor; }
.fav-btn.on { color: var(--p2); } .fav-btn.on svg { fill: currentColor; }

/* ===== cor do texto (paleta) ===== */
.note-colors { width: auto; } .note-swatches { display: flex; gap: 4px; padding: 6px 8px 8px; }
.note-swatch { width: 26px; height: 26px; border-radius: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(128,128,128,.35); padding: 0; cursor: pointer; flex: none; } .note-swatch:hover { transform: scale(1.12); box-shadow: 0 0 0 2px var(--accent); } .note-swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.note-color { background: var(--muted); }
.note-menu.note-colors { width: max-content; max-height: none; overflow: visible; } .note-menu .note-swatch { display: block; width: 26px; height: 26px; padding: 0; border-radius: 0; }
/* cabeçalho da página: no celular os botões passam para a linha de baixo em vez de cobrir o título */
.page-head { flex-wrap: wrap; } .page-head > .grow { min-width: 0; flex: 1 1 160px; } .page-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .page-head > .grow { flex-basis: 100%; } .page-actions { justify-content: flex-start; width: 100%; } .app.sb-collapsed .page-head { padding-left: 0; } }

/* ---------- temas "Vidro" e "Vidro cinza": degradê no fundo, painéis translúcidos com desfoque ---------- */
[data-theme="glass"] { --bg:#0c1626; --panel:rgba(255,255,255,.075); --panel2:rgba(255,255,255,.12); --line:rgba(255,255,255,.18); --text:#eef4ff; --muted:#a9b9d3; --accent:#7cc4ff; --accent-ink:#04182c; --danger:#ff6b8a; --p1:#ff6b8a; --p2:#ffb86b; --p3:#7cc4ff; --p4:#9aa9c2; --over:#ff7d96; --today:#6ee7b7; --tomorrow:#ffc98a; --week:#c4a8ff; --shadow:0 12px 40px rgba(2,8,20,.55); --scrim:rgba(4,10,24,.45); }
[data-theme="glass"] body { background: radial-gradient(900px 600px at 12% 8%, rgba(86,140,255,.55), transparent 60%), radial-gradient(800px 600px at 88% 18%, rgba(190,90,255,.42), transparent 60%), radial-gradient(900px 700px at 70% 95%, rgba(40,210,190,.38), transparent 60%), linear-gradient(160deg, #0b1424, #101b33 55%, #0a1a2b) fixed; }
:is([data-theme="glass"], [data-theme="glassgray"]) .sidebar, :is([data-theme="glass"], [data-theme="glassgray"]) .modal-box, :is([data-theme="glass"], [data-theme="glassgray"]) .pop, :is([data-theme="glass"], [data-theme="glassgray"]) .card, :is([data-theme="glass"], [data-theme="glassgray"]) .task.card { -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
:is([data-theme="glass"], [data-theme="glassgray"]) .modal-box, :is([data-theme="glass"], [data-theme="glassgray"]) .pop { background: rgba(24,36,62,.62); border-color: rgba(255,255,255,.22); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.18); }
:is([data-theme="glass"], [data-theme="glassgray"]) .sidebar { background: rgba(255,255,255,.06); border-right-color: rgba(255,255,255,.14); }
:is([data-theme="glass"], [data-theme="glassgray"]) .modal-back { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
:is([data-theme="glass"], [data-theme="glassgray"]) .note-ed, :is([data-theme="glass"], [data-theme="glassgray"]) .is-note .note-ed, :is([data-theme="glass"], [data-theme="glassgray"]) .is-note .tv-files, :is([data-theme="glass"], [data-theme="glassgray"]) .is-note details.tv-sec { background: rgba(255,255,255,.05); }
:is([data-theme="glass"], [data-theme="glassgray"]) .note-bar { background: rgba(20,32,56,.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.t-glass { background: linear-gradient(135deg, #4f7dff 0%, #b45cff 55%, #2fd3bd 100%); border: 1px solid rgba(255,255,255,.45); box-shadow: inset 0 0 0 9px rgba(255,255,255,.18); }
/* Vidro cinza: vidro fosco claro (cinza bem claro, translúcido, desfoque forte e brilho nas bordas) */
[data-theme="glassgray"] { color-scheme: light; --bg:#e4e7ec; --panel:rgba(255,255,255,.42); --panel2:rgba(255,255,255,.62); --line:rgba(70,80,96,.28); --text:#1c2128; --muted:#596270; --accent:#3a4350; --accent-ink:#ffffff; --danger:#d6405b; --p1:#d6405b; --p2:#d9822b; --p3:#2f6fd0; --p4:#7b8491; --over:#d6405b; --today:#1f9460; --tomorrow:#b86a14; --week:#6b45c4; --shadow:0 10px 40px rgba(40,52,74,.20); --scrim:rgba(225,229,236,.38); }
[data-theme="glassgray"] body { background: radial-gradient(900px 620px at 10% 6%, rgba(255,255,255,.95), transparent 62%), radial-gradient(800px 600px at 90% 16%, rgba(150,160,180,.50), transparent 62%), radial-gradient(900px 700px at 62% 98%, rgba(185,195,212,.60), transparent 62%), linear-gradient(160deg, #dde1e8, #eceff3 52%, #d5dae2) fixed; }
[data-theme="glassgray"] .sidebar { background: linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.30)); border-right: 1px solid rgba(70,80,96,.30); box-shadow: inset -1px 0 0 rgba(255,255,255,.75); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
[data-theme="glassgray"] .modal-box, [data-theme="glassgray"] .pop { background: linear-gradient(135deg, rgba(255,255,255,.70), rgba(255,255,255,.44)); border: 1px solid rgba(70,80,96,.32); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.75), inset 0 1px 0 rgba(255,255,255,.95); -webkit-backdrop-filter: blur(32px) saturate(185%); backdrop-filter: blur(32px) saturate(185%); }
[data-theme="glassgray"] .card, [data-theme="glassgray"] .task.card { background: linear-gradient(135deg, rgba(255,255,255,.60), rgba(255,255,255,.34)); border: 1px solid rgba(70,80,96,.28); box-shadow: 0 4px 18px rgba(40,52,74,.08), inset 0 0 0 1px rgba(255,255,255,.7), inset 0 1px 0 rgba(255,255,255,.9); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); }
[data-theme="glassgray"] .modal-back { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-theme="glassgray"] .note-bar { border-bottom-color: rgba(70,80,96,.28); background: rgba(255,255,255,.55); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
[data-theme="glassgray"] .note-ed, [data-theme="glassgray"] .is-note .note-ed, [data-theme="glassgray"] .is-note .tv-files, [data-theme="glassgray"] .is-note details.tv-sec { background: rgba(255,255,255,.38); border-color: rgba(70,80,96,.28); }
.t-glassgray { background: linear-gradient(135deg, #ffffff 0%, #e3e7ed 50%, #b9c1cd 100%); border: 1px solid rgba(70,80,96,.38); box-shadow: inset 0 0 0 9px rgba(255,255,255,.45), 0 0 0 1px rgba(70,80,96,.18); }
/* Vidro cinza: bordas no estilo Windows XP (Luna prata): moldura chanfrada, botões em relevo e hover laranja */
[data-theme="glassgray"] { --xp-dark:#6e7684; --xp-mid:#a3abb7; --xp-lite:#ffffff; }
[data-theme="glassgray"] .modal-box { border: 3px solid rgba(200,206,216,.92); border-radius: 9px 9px 6px 6px; box-shadow: 0 0 0 1px var(--xp-dark), var(--shadow), inset 0 0 0 1px var(--xp-dark), inset 2px 2px 0 rgba(255,255,255,.95), inset -2px -2px 0 rgba(140,148,160,.45); }
[data-theme="glassgray"] .pop { border: 1px solid var(--xp-dark); border-radius: 4px; box-shadow: var(--shadow), inset 1px 1px 0 var(--xp-lite), inset -1px -1px 0 rgba(140,148,160,.55); }
[data-theme="glassgray"] .card, [data-theme="glassgray"] .task.card { border: 1px solid var(--xp-dark); border-radius: 6px; box-shadow: 0 3px 12px rgba(40,52,74,.10), inset 1px 1px 0 var(--xp-lite), inset -1px -1px 0 rgba(140,148,160,.5); }
[data-theme="glassgray"] .sidebar { border-right: 1px solid var(--xp-dark); box-shadow: inset -1px 0 0 var(--xp-lite), 1px 0 0 rgba(140,148,160,.45); }
[data-theme="glassgray"] .note-bar { border-bottom: 1px solid var(--xp-mid); box-shadow: 0 1px 0 var(--xp-lite); }
[data-theme="glassgray"] .note-ed, [data-theme="glassgray"] .is-note .note-ed, [data-theme="glassgray"] .is-note .tv-files, [data-theme="glassgray"] .is-note details.tv-sec { border: 1px solid var(--xp-dark); border-radius: 4px; box-shadow: inset 1px 1px 0 rgba(140,148,160,.45), 1px 1px 0 var(--xp-lite); }
[data-theme="glassgray"] .btn { background: linear-gradient(180deg, #ffffff 0%, #f1f3f6 55%, #d9dde4 100%); color: var(--text); border: 1px solid var(--xp-dark); border-radius: 3px; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 rgba(140,148,160,.55); }
[data-theme="glassgray"] .btn:hover:not(:disabled) { box-shadow: inset 0 0 0 2px #f9cf72, inset 1px 1px 0 #fff; border-color: #a6781e; }
[data-theme="glassgray"] .btn:active:not(:disabled) { background: linear-gradient(180deg, #d9dde4, #eceff3); box-shadow: inset 1px 1px 2px rgba(80,90,105,.45); }
[data-theme="glassgray"] .btn.primary { background: linear-gradient(180deg, #5b6574 0%, #3a4350 55%, #2c333e 100%); color: #fff; border-color: #1f252e; box-shadow: inset 1px 1px 0 rgba(255,255,255,.35), inset -1px -1px 0 rgba(0,0,0,.35); }
[data-theme="glassgray"] .btn.primary:hover:not(:disabled) { box-shadow: inset 0 0 0 2px #f9cf72; border-color: #a6781e; }
[data-theme="glassgray"] .field, [data-theme="glassgray"] input[type=text], [data-theme="glassgray"] select, [data-theme="glassgray"] textarea { border: 1px solid var(--xp-dark); border-radius: 3px; box-shadow: inset 1px 1px 0 rgba(140,148,160,.45); }
/* Vidro cinza: bordas grossas cinza prata em todos os lados e cantos, em tudo */
[data-theme="glassgray"] { --silver:#c4cad4; --line:#b4bcc8; --xp-mid:#b4bcc8; }
[data-theme="glassgray"] body::after { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; border: 5px solid var(--silver); box-shadow: inset 0 0 0 1px var(--xp-dark), inset 2px 2px 0 rgba(255,255,255,.95), inset -2px -2px 0 rgba(140,148,160,.5); }
[data-theme="glassgray"] .sidebar { border: 4px solid var(--silver); border-radius: 0; box-shadow: 0 0 0 1px var(--xp-dark), inset 0 0 0 1px var(--xp-dark), inset 2px 2px 0 rgba(255,255,255,.95), inset -2px -2px 0 rgba(140,148,160,.45); }
[data-theme="glassgray"] .modal-box { border-width: 5px; border-color: var(--silver); border-radius: 9px; }
[data-theme="glassgray"] .pop { border: 3px solid var(--silver); border-radius: 6px; box-shadow: 0 0 0 1px var(--xp-dark), var(--shadow), inset 0 0 0 1px var(--xp-dark), inset 1px 1px 0 var(--xp-lite); }
[data-theme="glassgray"] .card, [data-theme="glassgray"] .task.card { border: 3px solid var(--silver); border-radius: 8px; box-shadow: 0 0 0 1px var(--xp-dark), 0 3px 12px rgba(40,52,74,.12), inset 0 0 0 1px var(--xp-dark), inset 1px 1px 0 var(--xp-lite); }
[data-theme="glassgray"] .note-ed, [data-theme="glassgray"] .is-note .note-ed, [data-theme="glassgray"] .is-note .tv-files, [data-theme="glassgray"] .is-note details.tv-sec { border: 3px solid var(--silver); border-radius: 6px; box-shadow: 0 0 0 1px var(--xp-dark), inset 0 0 0 1px var(--xp-dark); }
[data-theme="glassgray"] .note-bar { border-bottom: 3px solid var(--silver); box-shadow: 0 1px 0 var(--xp-dark); }
[data-theme="glassgray"] .btn { border: 2px solid var(--silver); border-radius: 5px; box-shadow: 0 0 0 1px var(--xp-dark), inset 0 0 0 1px var(--xp-dark), inset 2px 2px 0 #fff; margin: 1px; }
[data-theme="glassgray"] .btn:hover:not(:disabled) { border-color: #f2c25a; box-shadow: 0 0 0 1px #a6781e, inset 0 0 0 1px #a6781e, inset 2px 2px 0 #fff; }
[data-theme="glassgray"] .btn.primary { border-color: var(--silver); box-shadow: 0 0 0 1px var(--xp-dark), inset 0 0 0 1px #1f252e, inset 2px 2px 0 rgba(255,255,255,.35); }
[data-theme="glassgray"] .btn.primary:hover:not(:disabled) { border-color: #f2c25a; box-shadow: 0 0 0 1px #a6781e, inset 0 0 0 1px #a6781e; }
[data-theme="glassgray"] .field, [data-theme="glassgray"] input[type=text], [data-theme="glassgray"] input[type=search], [data-theme="glassgray"] select, [data-theme="glassgray"] textarea { border: 2px solid var(--silver); border-radius: 4px; box-shadow: 0 0 0 1px var(--xp-dark), inset 0 0 0 1px var(--xp-dark), inset 2px 2px 0 rgba(140,148,160,.35); }
[data-theme="glassgray"] .tv-desc.rich, [data-theme="glassgray"] .toast, [data-theme="glassgray"] .theme-card { border: 3px solid var(--silver); border-radius: 6px; box-shadow: 0 0 0 1px var(--xp-dark); }
[data-theme="glassgray"] .theme-card.on { border-color: #f2c25a; }
/* Vidro cinza: botões com borda fina */
[data-theme="glassgray"] .btn { border: 1px solid var(--xp-dark); border-radius: 4px; margin: 0; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 rgba(140,148,160,.55); }
[data-theme="glassgray"] .btn:hover:not(:disabled) { border-color: #a6781e; box-shadow: inset 0 0 0 1px #f9cf72, inset 1px 1px 0 #fff; }
[data-theme="glassgray"] .btn:active:not(:disabled) { box-shadow: inset 1px 1px 2px rgba(80,90,105,.45); }
[data-theme="glassgray"] .btn.primary { border-color: #1f252e; box-shadow: inset 1px 1px 0 rgba(255,255,255,.35), inset -1px -1px 0 rgba(0,0,0,.35); }
[data-theme="glassgray"] .btn.primary:hover:not(:disabled) { border-color: #a6781e; box-shadow: inset 0 0 0 1px #f9cf72; }
/* Vidro cinza — refinamento: legibilidade, menos ruído nas molduras, foco claro */
[data-theme="glassgray"] { --muted:#464f5c; --line:#b4bcc8; }
[data-theme="glassgray"] .modal-box { background: linear-gradient(135deg, rgba(250,251,253,.93), rgba(232,236,242,.88)); -webkit-backdrop-filter: blur(40px) saturate(170%); backdrop-filter: blur(40px) saturate(170%); }
[data-theme="glassgray"] .modal-back { background: rgba(214,219,228,.55); }
[data-theme="glassgray"] .tv-side { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(214,220,230,.45)); border-left: 1px solid var(--xp-mid); box-shadow: inset 1px 0 0 #fff; }
/* título e descrição: sem moldura até receber foco/hover */
[data-theme="glassgray"] .tv-title, [data-theme="glassgray"] .tv-desc.rich, [data-theme="glassgray"] .tv-desc-edit { border: 1px solid transparent; border-radius: 6px; box-shadow: none; background: transparent; }
[data-theme="glassgray"] .tv-title:hover, [data-theme="glassgray"] .tv-desc.rich:hover { background: rgba(255,255,255,.55); border-color: var(--xp-mid); }
[data-theme="glassgray"] .tv-title:focus, [data-theme="glassgray"] .tv-desc.rich:focus, [data-theme="glassgray"] .tv-desc-edit:focus { background: #fff; border-color: #3a4350; box-shadow: 0 0 0 2px rgba(58,67,80,.22); }
[data-theme="glassgray"] .tv-desc.rich { color: var(--muted); }
/* etiquetas: cores com contraste sobre fundo claro */
[data-theme="glassgray"] .chip.lbl { filter: brightness(.62) saturate(1.5); font-weight: 600; }
[data-theme="glassgray"] .chip { color: var(--muted); }
/* editor de nota: papel branco, moldura fina */
[data-theme="glassgray"] .note-ed, [data-theme="glassgray"] .is-note .note-ed { background: #fff; border-width: 2px; }
[data-theme="glassgray"] .note-bar { background: linear-gradient(180deg, #ffffff, #e9edf2); }
/* cartões da lista: borda fina, destaque no hover */
[data-theme="glassgray"] .card, [data-theme="glassgray"] .task.card { border-width: 2px; }
[data-theme="glassgray"] .task.card:hover { background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.55)); border-color: #8a93a1; }
/* barra de rolagem fina prateada */
[data-theme="glassgray"] * { scrollbar-width: thin; scrollbar-color: #9aa3b0 transparent; }
[data-theme="glassgray"] *::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="glassgray"] *::-webkit-scrollbar-thumb { background: #aab2be; border: 2px solid #e6e9ee; border-radius: 6px; }
[data-theme="glassgray"] *::-webkit-scrollbar-track { background: transparent; }
/* etiqueta na linha de metadados: a regra genérica ".lbl" (rótulo de formulário) não pode afetar o chip */
.chip.lbl { display: inline-flex; margin: 0; font-weight: 400; font-size: 12.5px; }
/* adição rápida: destaque do que foi reconhecido no próprio campo (data/hora, #projeto, @etiqueta, pN) */
.tf-title-wrap { position: relative; }
.tf-hl, .tf-title-wrap .tf-title { box-sizing: border-box; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 22px; letter-spacing: normal; padding: 4px 0; margin: 0; }
.tf-hl { position: absolute; inset: 0; white-space: pre; overflow: hidden; color: transparent; pointer-events: none; }
.tf-title-wrap .tf-title { position: relative; z-index: 1; display: block; }
.tf-hl mark { color: transparent; border-radius: 4px; margin: 0 -2px; padding: 1px 2px; background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.tf-hl mark.hl-dt { background: color-mix(in srgb, var(--today) 24%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--today) 40%, transparent); }
.tf-hl mark.hl-pr { background: color-mix(in srgb, var(--p2) 26%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--p2) 40%, transparent); }

/* ===== tela de login ===== */
.lg-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.lg-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.lg-card h1 { margin: 0; font-size: 24px; } .lg-logo { display: grid; place-items: center; }
.lg-sub { margin: 0 0 6px; color: var(--muted); }
.lg-field { width: 100%; padding: 12px 14px; font-size: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); outline: none; }
.lg-field:focus { border-color: var(--accent); }
.lg-row { display: flex; gap: 10px; } .lg-row .lg-btn { flex: 1; }
.lg-btn { padding: 12px 14px; font-size: 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 600; }
.lg-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; } .lg-btn:disabled { opacity: .6; }
.lg-msg { min-height: 20px; font-size: 13.5px; color: var(--muted); } .lg-msg.err { color: var(--danger); } .lg-msg.ok { color: var(--accent); }
