/* ════════════════════════════════════════════════════════════════
   Lume Step · Estilos
   Assinatura visual: o app inteiro muda de cor com o perfil —
   Trabalho = índigo, Pessoal = verde.
   ════════════════════════════════════════════════════════════════ */

:root {
    /* Paleta tirada do próprio Lume: corpo azul-marinho quase preto,
       abdômen dourado, e o creme do halo que ele espalha em volta. */
    --bg:      #F7F1E3;   /* creme do brilho — precisa se distinguir do branco */
    --surface: #FFFFFF;
    --ink:     #1B1F30;   /* corpo do vaga-lume */
    --muted:   #6B7285;
    --line:    #E9E3D5;
    --danger:  #B3352E;
    --warn:    #A6660D;   /* âmbar legível: 4.6:1 em branco */
    --luz:     #FFD66B;   /* a luz: dourado */
    --luz-forte: #F08C1E; /* o halo laranja da conquista */
    --luz-escura: #6B4E10;
    --radius:  12px;
    --shadow:  0 8px 30px rgba(27, 31, 48, .10);
    --font-display: "Bricolage Grotesque", system-ui, sans-serif;
    --font-body:    "Instrument Sans", system-ui, sans-serif;
}
body[data-profile="trabalho"] { --accent:#34518F; --accent-ink:#274074; --accent-soft:#E8EDF8; }
body[data-profile="pessoal"]  { --accent:#2E7D5B; --accent-ink:#236648; --accent-soft:#E4F1EA; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 var(--font-body);
    transition: background-color .35s ease;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
input, select, textarea, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Topo ─────────────────────────────────────────────────────── */
/* A barra do topo é o corpo do vaga-lume: azul-marinho quase preto.
   É a primeira coisa que se vê, e antes era branca — daí a sensação de
   que a identidade não tinha chegado à plataforma. */
.topbar {
    display: flex; align-items: center; gap: 20px;
    padding: 14px 24px;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
    position: sticky; top: 0; z-index: 30;
    color: #EEEAE0;
}
.topbar .logo { color: #FFFFFF; }
.topbar .logo span { color: var(--luz); }        /* no escuro o dourado brilha */
.topbar .linklike { color: #C9C4B8; }
.topbar .linklike:hover, .topbar a { color: #FFFFFF; }
.topbar .who { color: #C9C4B8; }
/* O painel do sininho MORA dentro da .topbar, então herdava o texto claro
   do fundo escuro e ficava ilegível no branco. Aqui a herança é cortada:
   todo painel que abre a partir do topo volta ao esquema claro. */
.topbar .bell-panel,
.topbar .bell-panel * { color: var(--ink); }
.topbar .bell-panel .linklike { color: var(--accent-ink, var(--ink)); }
.topbar .bell-panel small,
.topbar .bell-panel .muted,
.topbar .bell-panel .bell-item small { color: var(--muted); }
.topbar .bell-panel input,
.topbar .bell-panel select {
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line);
}
.topbar .bell-panel input::placeholder { color: var(--muted); }
.topbar .bell-panel .btn-primary { color: #fff; }
.topbar .bell-panel .bell-convite { color: var(--ink); }

/* a cápsula das abas some num fundo escuro: ganha vidro fosco */
.topbar .profile-switch {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .14);
}
.topbar .pswitch { color: rgba(255, 255, 255, .68); }
.topbar .pswitch:hover { color: #FFFFFF; }
.topbar .pswitch.on { color: #FFFFFF; }
.topbar .pswitch-add { color: rgba(255, 255, 255, .6); }
.topbar .pswitch .por-quem { color: rgba(255, 255, 255, .5); }
.topbar .iconbtn { color: #EEEAE0; }
.topbar .iconbtn:hover { color: var(--luz); }

/* os campos do topo precisam de fundo próprio para não desaparecer no escuro */
.topbar input, .topbar .search {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #FFFFFF;
}
.topbar input::placeholder { color: rgba(255, 255, 255, .5); }
.topbar #ajudaBtn { border-color: rgba(255, 255, 255, .3); color: #EEEAE0; }
.topbar #ajudaBtn:hover { border-color: var(--luz); color: var(--luz); }
/* A marca é a marca, não a cor do setor. Antes o "Step" pegava --accent e
   ficava azul no Trabalho, verde no Pessoal — o nome mudava de cor conforme
   a aba, o que é o contrário do que um logo deve fazer. */
.logo {
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--ink);
}
.logo span { color: #A6660D; font-weight: 500; }   /* 4,6:1 em branco */
/* a luz do vaga-lume, pulsando devagar ao lado do nome */
.logo::before {
    content: ''; width: 9px; height: 9px; border-radius: 50%;
    background: var(--luz); flex: none;
    box-shadow: 0 0 0 3px rgba(255, 214, 107, .28), 0 0 9px 3px rgba(240, 140, 30, .45);
    animation: logoPisca 3.4s ease-in-out infinite;
}
@keyframes logoPisca {
    0%, 100% { opacity: .55; transform: scale(.9); }
    50%      { opacity: 1;   transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) { .logo::before { animation: none; opacity: 1; } }

.topbar-right {
    margin-left: auto;
    display: flex; align-items: center; gap: 14px;
}
.user-name { color: var(--muted); font-size: 14px; }

/* Interruptor de perfil — a assinatura do app */
.profile-switch {
    position: relative;
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
}
.pswitch {
    position: relative; z-index: 1;
    border: 0; background: none; cursor: pointer;
    padding: 6px 18px;
    border-radius: 999px;
    font-weight: 600; font-size: 14px;
    color: var(--muted);
    transition: color .25s;
}
.pswitch[aria-selected="true"] { color: #fff; }
.pswitch-thumb {
    position: absolute; top: 3px; bottom: 3px; left: 3px;
    width: calc(50% - 3px);
    background: var(--accent);
    border-radius: 999px;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), background-color .35s;
}
body[data-profile="pessoal"] .pswitch-thumb { transform: translateX(100%); }

.search {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
}

/* ── Container ────────────────────────────────────────────────── */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* ── Adição rápida ────────────────────────────────────────────── */
.quickadd {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto auto;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
}
.quickadd input, .quickadd select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    background: var(--surface);
    min-width: 0;
}
.quickadd input:focus, .quickadd select:focus { border-color: var(--accent); }

/* ── Botões ───────────────────────────────────────────────────── */
.btn {
    border: 0; cursor: pointer;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 600;
    transition: background-color .2s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: var(--accent-soft); color: var(--accent-ink); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.linklike {
    background: none; border: 0; cursor: pointer;
    color: var(--accent-ink); font-weight: 600; font-size: 14px;
    padding: 4px;
}
.linklike:hover { text-decoration: underline; }
.iconbtn {
    background: none; border: 0; cursor: pointer;
    font-size: 16px; color: var(--muted);
    padding: 6px; border-radius: 8px;
}
.iconbtn:hover { background: var(--bg); color: var(--ink); }

/* ── Chips de tipo ────────────────────────────────────────────── */
.toolbar {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 0 12px;
}
.toolbar-spacer { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    color: var(--muted);
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--muted)); }
.chip.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}

/* ── Seções ───────────────────────────────────────────────────── */
.section { margin-top: 26px; }
.section-title {
    display: flex; align-items: baseline; gap: 8px;
    font-family: var(--font-display);
    font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 8px;
}
.section-title .count {
    font-family: var(--font-body);
    font-weight: 500; font-size: 13px;
}
.section--atrasadas .section-title { color: var(--danger); }
.section--hoje .section-title      { color: var(--accent-ink); }

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
    font-size: 15px;
}
.empty-state strong { font-family: var(--font-display); font-size: 20px; display: block; margin-bottom: 6px; color: var(--ink); }

/* ── Linha de tarefa ──────────────────────────────────────────── */
.tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.task {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 14px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.task:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(30,32,40,.06); }
.task.prio-alta { border-left: 4px solid var(--danger); }
.task.done { opacity: .55; }
.task.done .task-title { text-decoration: line-through; }

.task-check {
    flex: none;
    width: 22px; height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: none; cursor: pointer;
    display: grid; place-items: center;
    color: transparent; font-size: 12px;
    transition: border-color .15s, background-color .15s;
}
.task-check:hover { border-color: var(--accent); }
.task.done .task-check { background: var(--accent); border-color: var(--accent); color: #fff; }

.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 12.5px; color: var(--muted);
    margin-top: 2px; align-items: center;
}
.type-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--tcolor, var(--muted)); }
.type-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tcolor, var(--muted)); }
.due-tag.overdue { color: var(--danger); font-weight: 700; }
.due-tag.today   { color: var(--warn);   font-weight: 700; }
.sub-count { color: var(--muted); }
.rec-tag::before { content: "↻ "; }

/* ── Drawer (detalhes) ────────────────────────────────────────── */
.drawer-backdrop, .modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(25, 27, 34, .35);
    z-index: 40;
}
/* Janela flutuante, não gaveta lateral. Em 440px de largura o título de uma
   subtarefa quebrava em cinco linhas verticais e a linha inteira estourava em
   rolagem horizontal. Aqui ela tem espaço para caber. */
.drawer {
    position: fixed; z-index: 50;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 40px));
    max-height: min(88vh, 900px);
    background: var(--surface);
    border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 70px rgba(20, 22, 30, .32);
    animation: janelaEntra .2s ease-out;
}
@keyframes janelaEntra {
    from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0; }
    to   { transform: translate(-50%, -50%);              opacity: 1; }
}
@media (max-width: 640px) {
    .drawer {
        top: 0; left: 0; transform: none;
        width: 100%; max-height: 100%; height: 100%; border-radius: 0;
    }
    @keyframes janelaEntra { from { opacity: 0; } to { opacity: 1; } }
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head, .modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 10px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.drawer-foot {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
}
.drawer-sub { font-size: 14px; margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }

.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    background: var(--surface);
    width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
/* Com a janela em 760px cabem quatro campos por linha em vez de dois.
   Abaixo de 640px ela vira tela cheia e volta a duas colunas. */
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
@media (min-width: 641px) { .field-grid { grid-template-columns: repeat(4, 1fr); } }
.field-grid .field-severo { grid-column: 1 / -1; }

/* Subtarefas */
.sublist { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
/* A linha da subtarefa é o ponto mais apertado do painel: texto + delegado +
   hora + data + excluir. Com largura maior ela cabe; quando não couber, os
   controles descem em bloco em vez de esmagar o título. */
.subitem {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 4px; border-radius: 8px; flex-wrap: wrap;
}
.subitem:hover { background: var(--bg); }
.subitem .task-check { width: 18px; height: 18px; font-size: 10px; }
.subitem.done .sub-title { text-decoration: line-through; color: var(--muted); }
.subitem.done .task-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.sub-title { flex: 1 1 260px; min-width: 180px; line-height: 1.4; }
.sub-deleg { flex: 0 1 150px; min-width: 110px; }
.sub-when { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.sub-when input { min-width: 0; }
.sub-del { visibility: hidden; }
.subitem:hover .sub-del { visibility: visible; }
/* Sem wrap, os 4 campos (texto + data + hora + botão) estouravam a largura
   do painel e criavam rolagem horizontal — visível no celular e no desktop. */
.subadd { display: flex; gap: 8px; flex-wrap: wrap; }
.subadd input { flex: 1 1 130px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }

/* ── Modal de tipos ───────────────────────────────────────────── */
.modal-backdrop { display: grid; place-items: center; padding: 20px; }
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    width: min(460px, 100%);
    max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow);
    padding-bottom: 18px;
    animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-hint { color: var(--muted); font-size: 13.5px; margin: 0 20px 12px; }
.types-list { list-style: none; margin: 0 0 12px; padding: 0 20px; }
.type-row { flex-wrap: wrap;
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}
/* ── Campo de cor: bolinha, não quadradinho ──────────────────── */
input[type="color"] {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
    box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.12);
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
input[type="color"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.type-row input[type="color"] { width: 26px; height: 26px; flex: 0 0 26px; }

/* memória de cores */
.cfield { position: relative; display: inline-flex; align-items: center; gap: 3px; }
.cfield-more {
    border: 0; background: none; cursor: pointer; color: var(--muted);
    font-size: 10px; line-height: 1; padding: 2px;
}
.cfield-more:hover { color: var(--ink); }
.colorpop {
    position: absolute; z-index: 60; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; padding: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.16); width: 168px;
}
.colorpop h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); margin: 0 0 7px; font-weight: 700; }
.colorpop-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.colorpop-sw {
    width: 22px; height: 22px; border-radius: 50%; cursor: pointer; padding: 0;
    border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.14);
}
.colorpop-sw:hover, .colorpop-sw:focus-visible { transform: scale(1.14); outline: none;
    box-shadow: 0 0 0 2px var(--accent); }
.colorpop-vazio { font-size: 11.5px; color: var(--muted); }
.type-row input[type="text"] {
    flex: 1; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; background: none;
}
.type-row input[type="text"]:focus { border-color: var(--line); background: var(--surface); }
.types-add { flex-wrap: wrap; display: flex; gap: 8px; padding: 0 20px; }
.types-add input[type="color"] { width: 32px; height: 32px; flex: 0 0 32px; align-self: center; }
.types-add input[type="text"] { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }

/* ── Toasts ───────────────────────────────────────────────────── */
.toasts {
    position: fixed; right: 18px; bottom: 18px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 90; max-width: min(360px, calc(100vw - 36px));
}
.toast {
    background: var(--ink); color: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: pop .2s ease;
}
.toast.alert { border-left: 4px solid var(--warn); }
.toast.alert.overdue { border-left-color: var(--danger); }
.toast small { display: block; opacity: .75; margin-top: 2px; }

/* ── Login ────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 20px;
}
.login-card {
    width: min(380px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 34px 30px;
}
.login-logo {
    font-size: 34px; font-weight: 800; letter-spacing: -.02em;
    display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
}
.login-logo span { color: #A6660D; font-weight: 500; }
.login-logo::before {
    content: ''; width: 13px; height: 13px; border-radius: 50%;
    background: #FFD66B; flex: none;
    box-shadow: 0 0 0 4px rgba(255, 214, 107, .28), 0 0 13px 4px rgba(240, 140, 30, .45);
    animation: logoPisca 3.4s ease-in-out infinite;
}
.login-sub { color: var(--muted); margin: 6px 0 24px; }
.login-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.login-switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .topbar { gap: 12px; padding: 12px 14px; }
    .topbar-right { width: 100%; order: 3; }
    .search { flex: 1; width: auto; }
    .quickadd { grid-template-columns: 1fr 1fr; }
    .quickadd #qaTitle { grid-column: 1 / -1; }
    .quickadd > .btn { grid-column: 1 / -1; }
    .quickadd .tagpick-btn { width: 100%; }
    .field-grid { grid-template-columns: 1fr; }
    .drawer { width: 100%; }
    .task-title { white-space: normal; }
}

/* ════════════════════════════════════════════════════════════════
   v1.1 — Tags com grupos
   ════════════════════════════════════════════════════════════════ */

/* Seletor de tags na adição rápida */
.tagpick { position: relative; }
.tagpick-btn {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--surface);
    cursor: pointer;
    white-space: nowrap;
}
.tagpick-btn.has-tags { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tagpick-pop {
    position: absolute; top: calc(100% + 6px); left: 0;
    min-width: 230px; max-height: 320px; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 60;
}
.tagpick-group {
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted);
    padding: 8px 6px 4px;
}
.tagpick-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px; border-radius: 7px;
    cursor: pointer; font-size: 14px;
}
.tagpick-item:hover { background: var(--bg); }
.tagpick-item .dot, .tagbox .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--dot, var(--muted)); flex: none;
}

/* Separador de grupo nas chips de filtro */
.chip-sep {
    align-self: center;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted);
    margin-left: 6px;
}

/* Tags no painel de detalhes */
.tagboxes-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tagbox {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; color: var(--muted);
    user-select: none;
}
.tagbox input { display: none; }
.tagbox.on {
    border-color: var(--dot, var(--accent));
    color: var(--ink);
    background: color-mix(in srgb, var(--dot, var(--accent)) 12%, var(--surface));
}
#dTags .tagpick-group { padding-left: 0; }

/* Grupos no modal de tags */
.tgroup { padding: 4px 0 10px; }
.tgroup-head {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 20px 2px;
}
.tgroup-name {
    flex: 1;
    font-family: var(--font-display);
    font-weight: 700; font-size: 15px;
    border: 1px solid transparent; border-radius: 6px;
    padding: 5px 8px; background: none;
}
.tgroup-name:focus { border-color: var(--line); background: var(--surface); }
.tgroup-name-fixed {
    flex: 1; font-family: var(--font-display);
    font-weight: 700; font-size: 15px; color: var(--muted);
    padding: 5px 8px;
}
.tgroup .types-add { flex-wrap: wrap; margin-top: 8px; }
#groupAdd { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ════════════════════════════════════════════════════════════════
   v1.2 — Pessoas + prazo nas subtarefas
   ════════════════════════════════════════════════════════════════ */

.avatar {
    display: inline-grid; place-items: center;
    width: 18px; height: 18px; flex: none;
    border-radius: 50%;
    background: var(--dot, var(--muted));
    color: #fff;
    font-size: 10px; font-weight: 700;
}
.person-tag {
    display: inline-flex; align-items: center; gap: 5px;
    font-weight: 600; color: var(--muted);
}
.chip .avatar { width: 16px; height: 16px; font-size: 9px; margin-left: -3px; }
.tagbox .avatar { width: 16px; height: 16px; font-size: 9px; }

.sub-date {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 3px 4px;
    background: none;
    font-size: 12.5px;
    color: var(--muted);
    width: 118px; flex: none;
}
.sub-date:hover, .sub-date:focus { border-color: var(--line); background: var(--surface); }
.sub-title small { margin-left: 8px; font-size: 12px; }
.subadd #subDue {
    border: 1px solid var(--line); border-radius: 8px;
    padding: 8px; flex: 0 1 140px; min-width: 110px;
}
@media (max-width: 720px) {
    .subadd { flex-wrap: wrap; }
    .subadd #subDue { flex: 1; }
}

/* ════════════════════════════════════════════════════════════════
   v1.2.1 — Dropdowns no painel + pílulas das seleções
   ════════════════════════════════════════════════════════════════ */

.tagpick.block { display: block; }
.tagpick.block .tagpick-btn { width: 100%; text-align: left; }
.tagpick.block .tagpick-pop { left: 0; right: 0; min-width: 0; }

.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pick-pill {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid color-mix(in srgb, var(--dot, var(--accent)) 45%, var(--line));
    background: color-mix(in srgb, var(--dot, var(--accent)) 10%, var(--surface));
    border-radius: 999px;
    padding: 4px 6px 4px 10px;
    font-size: 13px; font-weight: 600;
}
.pick-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.pick-pill .avatar { width: 16px; height: 16px; font-size: 9px; }
.pick-pill button {
    border: 0; background: none; cursor: pointer;
    color: var(--muted); font-size: 11px;
    padding: 2px 4px; border-radius: 50%;
}
.pick-pill button:hover { color: var(--danger); }

/* ════════════════════════════════════════════════════════════════
   v1.3 — Quadro, sininho, dashboard, comentários, arquivo
   ════════════════════════════════════════════════════════════════ */

/* Alternância Lista/Quadro */
.view-switch {
    display: inline-flex; flex: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px; padding: 3px;
}
.vswitch {
    border: 0; background: none; cursor: pointer;
    padding: 4px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--muted);
}
.vswitch.active { background: var(--accent-soft); color: var(--accent-ink); }
.board-group {
    flex: none;
    border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 10px; background: var(--surface);
    font-size: 13px; color: var(--muted);
}

/* Quadro */
.board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding: 18px 2px 30px;
    align-items: start;
}
.bcol {
    background: color-mix(in srgb, var(--surface) 60%, var(--bg));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    min-height: 140px;
}
.bcol.dropping { border-color: var(--accent); background: var(--accent-soft); }
.bcol-head {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-display);
    font-size: 13.5px; font-weight: 700;
    color: var(--muted);
    margin: 2px 2px 10px;
}
.bcol-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.bcol-head .count { font-family: var(--font-body); font-weight: 500; }
.bcol-cards { display: flex; flex-direction: column; gap: 8px; }
.bcard {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: grab;
}
.bcard:hover { border-color: var(--accent); }
.bcard.dragging { opacity: .45; }
.bcard.prio-alta { border-left: 4px solid var(--danger); }
.bcard-title { font-weight: 600; font-size: 14px; }
.bcard-meta {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 12px; color: var(--muted); margin-top: 5px;
}

/* Sininho */
.bell-wrap { position: relative; }
.bell { font-size: 17px; position: relative; }
.bell-badge {
    position: absolute; top: 0; right: 0;
    min-width: 15px; height: 15px;
    background: var(--danger); color: #fff;
    border-radius: 999px;
    font-size: 10px; font-weight: 700;
    display: grid; place-items: center;
    padding: 0 3px;
}
.bell-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: min(340px, calc(100vw - 30px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 70;
}
.bell-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px 8px;
}
.bell-list { list-style: none; margin: 0; padding: 0 6px 8px; max-height: 340px; overflow-y: auto; }
.bell-item {
    padding: 9px 10px; border-radius: 8px;
    font-size: 13.5px; cursor: pointer;
}
.bell-item:hover { background: var(--bg); }
.bell-item.unseen { background: var(--accent-soft); }
.bell-item.unseen:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.bell-item small { color: var(--muted); }

/* Dashboard (tela) */
.modal-wide { width: min(640px, 100%); }
#dashScreen { max-width: 640px; margin: 24px auto 0; }
.dash-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.dash-title { font-size: 24px; }
.active-nav { text-decoration: underline; }
.dash-sub { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.dash-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px; margin-bottom: 6px;
}
.dash-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    font: inherit; color: inherit; cursor: pointer;
}
.dash-card:hover { border-color: var(--accent); }
div.dash-card { cursor: default; }
div.dash-card:hover { border-color: var(--line); }
.dash-card.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.dash-card.danger .dash-num { color: var(--danger); }
.dash-card.ok .dash-num { color: var(--accent-ink); }
.dash-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.dash-label { font-size: 12.5px; color: var(--muted); }
.dash-h { font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.dash-h small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 6px; border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.dash-task { cursor: pointer; border-radius: 8px; }
.dash-task:hover { background: var(--surface); }
.dash-task-title { flex: 1; min-width: 0; }
.dash-task .task-check { width: 19px; height: 19px; font-size: 10px; }
.dash-task .due-tag { font-size: 12px; color: var(--muted); }
.dash-task .due-tag.overdue { color: var(--danger); }
.dash-task .due-tag.today { color: var(--warn); }
.dash-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }
.dash-empty { color: var(--muted); font-size: 13.5px; margin: 4px 0; }

/* Comentários */
.comment-list { list-style: none; margin: 0 0 10px; padding: 0; }
.comment {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 6px;
}
.comment-body { font-size: 14px; white-space: pre-wrap; }
.comment-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 4px;
}
.comment-foot small { color: var(--muted); font-size: 12px; }
.comment .sub-del { visibility: visible; padding: 2px 6px; }

/* Arquivo de concluídas */
.arch-search { padding: 0 20px 10px; }
.arch-search input {
    width: 100%;
    border: 1px solid var(--line); border-radius: 8px;
    padding: 9px 12px;
}
.arch-list { list-style: none; margin: 0; padding: 0 20px 10px; max-height: 55vh; overflow-y: auto; }
.arch-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.arch-main { flex: 1; min-width: 0; }
.arch-title { font-weight: 600; }

@media (max-width: 720px) {
    .toolbar { flex-wrap: wrap; }
    .board { grid-auto-columns: minmax(220px, 78vw); }
}

/* ════════════════════════════════════════════════════════════════
   v1.3.2 — Barra de filtros clean
   ════════════════════════════════════════════════════════════════ */

.filterbar {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    min-height: 36px;
}
.fbtn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px; font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.fbtn:hover { border-color: var(--accent); color: var(--ink); }
.fbtn.on {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.fbtn .caret { font-size: 9px; opacity: .6; }
.fpick { position: relative; }
.fpick .tagpick-pop { min-width: 210px; }
.fpills { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ════════════════════════════════════════════════════════════════
   v1.4 — Guias do dashboard + delegação
   ════════════════════════════════════════════════════════════════ */

.dash-tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 4px 0 18px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}
.dtab {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 15px;
    font-size: 13.5px; font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}
.dtab:hover { border-color: var(--accent); color: var(--ink); }
.dtab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.dash-h .count { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.dash-h .linklike { font-size: 12px; text-transform: none; letter-spacing: 0; }

.deleg-tag {
    display: inline-flex; align-items: center;
    font-weight: 700; font-size: 12px;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 1px 8px;
}

.sub-deleg {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 3px 2px;
    background: none;
    font-size: 12.5px;
    color: var(--muted);
    max-width: 130px; flex: none;
}
.sub-deleg:hover, .sub-deleg:focus { border-color: var(--line); background: var(--surface); }
@media (max-width: 720px) {
    .subitem { flex-wrap: wrap; }
    .sub-title { width: 100%; }
    .dash-tabs { gap: 5px; }
    .dtab { padding: 5px 11px; font-size: 12.5px; }
}

/* ════════════════════════════════════════════════════════════════
   v1.4.1 — Dashboard em cartões
   ════════════════════════════════════════════════════════════════ */

#dashScreen { max-width: 680px; }
.dash-cols {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}
.dash-bucket {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 14px 8px;
    box-shadow: 0 1px 4px rgba(30,32,40,.04);
}
.dash-bucket.muted { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.dash-bucket-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 14px; font-weight: 700;
}
.dash-bucket-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bucket-head .count {
    font-family: var(--font-body); font-weight: 600; font-size: 12px;
    background: var(--accent-soft); color: var(--accent-ink);
    border-radius: 999px; padding: 1px 8px;
}
.dash-bucket.muted .dash-bucket-head .count { background: var(--bg); color: var(--muted); }
.dash-bucket-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.dash-bucket-actions .linklike { font-size: 12px; padding: 2px; }
.late-note { color: var(--danger); font-size: 11.5px; font-family: var(--font-body); font-weight: 600; }
.dash-bucket .dash-list li:last-child { border-bottom: 0; }
.dash-bucket .dash-task { padding: 8px 2px; }
.dash-bucket .dash-task-title { font-size: 13.5px; }

.dash-footnote {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    color: var(--muted); font-size: 12.5px;
    margin: 16px 2px 0;
}
.dash-footnote .dash-dot { width: 8px; height: 8px; }
.dash-footnote .avatar { width: 15px; height: 15px; font-size: 8px; }

/* ════════════════════════════════════════════════════════════════
   v1.4.2 — Pickers alinhados + bottom sheet no celular
   ════════════════════════════════════════════════════════════════ */

/* Itens dos dropdowns: checkbox · cor · nome, sempre alinhados */
.tagpick-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    text-align: left;
}
.tagpick-item input[type="checkbox"] {
    flex: none; width: 17px; height: 17px; margin: 0;
    accent-color: var(--accent);
}
.tagpick-item .dot, .tagpick-item .avatar { flex: none; }
.tagpick-item .tagpick-name {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Tags e Pessoas no painel: lado a lado no desktop, com dropdown largo */
.pick-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pick-fields .tagpick-pop { width: 280px; right: auto; max-width: calc(100vw - 48px); }
.pick-fields .field:last-child .tagpick-pop { right: 0; left: auto; }

/* ── Celular: dropdowns viram folha inferior (bottom sheet) ────── */
@media (max-width: 720px) {
    .pick-fields { grid-template-columns: 1fr; }

    .tagpick-pop {
        position: fixed !important;
        left: 10px !important; right: 10px !important;
        bottom: 10px !important; top: auto !important;
        width: auto !important; min-width: 0 !important;
        max-height: 55vh; overflow-y: auto;
        border-radius: 16px;
        box-shadow: 0 -14px 44px rgba(20, 22, 30, .3);
        padding: 8px 10px 12px;
        z-index: 96;
    }
    .tagpick-pop::before {
        content: "";
        display: block;
        width: 40px; height: 4px;
        border-radius: 999px;
        background: var(--line);
        margin: 4px auto 10px;
    }
    .tagpick-item { padding: 12px 8px; font-size: 15px; }
    .tagpick-item input[type="checkbox"] { width: 20px; height: 20px; }

    /* Subtarefas: 2 linhas organizadas em vez de quebra bagunçada */
    .subitem {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        row-gap: 4px;
        padding: 9px 4px;
    }
    .subitem .task-check { grid-column: 1; grid-row: 1; }
    .sub-title  { grid-column: 2; grid-row: 1; width: auto; }
    .sub-del    { grid-column: 3; grid-row: 1; visibility: visible; }
    .sub-deleg  { grid-column: 2; grid-row: 2; max-width: none; justify-self: start; }
    .sub-date   { grid-column: 3; grid-row: 2; width: 128px; justify-self: end; }

    /* Painel ocupa a tela toda com respiro pros botões */
    .drawer-body { padding-bottom: 30px; }
    .drawer-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* v1.4.4 — nota de tarefa compartilhada */
.share-note { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ════════════════════════════════════════════════════════════════
   v1.5.1 — Largura no desktop + acabamento mobile
   ════════════════════════════════════════════════════════════════ */

/* Desktop: aproveita a tela (quadro agradece) */
.container { max-width: 1240px; }
#dashScreen { max-width: 720px; margin-left: auto; margin-right: auto; }

/* Lista muito larga cansa a leitura: seções centralizadas num miolo confortável */
#tasksScreen .quickadd { max-width: 100%; }
.board { grid-auto-columns: minmax(260px, 1fr); }

/* Mobile: sem bordas e vãos sobrando */
@media (max-width: 720px) {
    html, body { overflow-x: hidden; }
    .container { padding: 12px 12px 70px; }
    .topbar { padding: 10px 12px; gap: 10px; }
    .toolbar { gap: 8px; margin: 14px 0 8px; }
    .filterbar { gap: 6px; }

    .quickadd { padding: 8px; gap: 6px; box-shadow: none; }

    /* quadro sangra até a borda da tela e desliza coluna a coluna */
    .board {
        margin: 0 -12px;
        padding: 12px 12px 24px;
        grid-auto-columns: 84vw;
        scroll-snap-type: x proximity;
    }
    .bcol { scroll-snap-align: start; }

    .task { padding: 10px 12px; }
    .section { margin-top: 20px; }
}

/* v1.5.2 — Dashboard ocupa a largura toda, como as demais telas */
#dashScreen { max-width: none; margin: 24px 0 0; }

/* ════════════════════════════════════════════════════════════════
   v1.5.3 — Revisão geral do mobile
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
    /* Topo em 2 linhas limpas: [logo | chave de perfil] / [busca | nav | sino | sair] */
    .topbar { padding: 10px 12px 8px; gap: 8px; }
    .logo { font-size: 19px; }
    .profile-switch { margin-left: auto; }
    .pswitch { padding: 5px 14px; font-size: 13px; }

    .topbar-right {
        width: 100%; order: 3;
        display: flex; align-items: center;
        gap: 10px;
        flex-wrap: nowrap;          /* nada quebra nem corta */
    }
    .search { flex: 1; min-width: 0; }
    .user-name { display: none; }   /* o nome não cabe e não faz falta no celular */
    #dashBtn { white-space: nowrap; flex: none; }
    #logoutBtn { flex: none; }
    .bell { flex: none; }

    /* Sino: painel nunca passa da tela */
    .bell-panel { right: -6px; max-width: calc(100vw - 24px); }

    /* Dashboard mais compacto */
    .dash-title { font-size: 21px; }
    .dash-top { margin-top: -4px; }
    .dash-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .dash-card { padding: 10px 6px; }
    .dash-num { font-size: 22px; }
    .dash-label { font-size: 11.5px; }
    .dash-tabs { gap: 5px; padding-bottom: 8px; margin-bottom: 14px; }

    /* Cartões e listas encostam menos nas bordas internas */
    .dash-bucket { padding: 2px 12px 6px; }

    /* Modais ocupam melhor a tela */
    .modal { max-height: 92vh; }
    .modal-backdrop { padding: 12px; align-items: start; padding-top: 24px; }
}

/* Telas bem estreitas: números em grade 2x2 já cobre; nada extra */
@media (max-width: 380px) {
    .pswitch { padding: 5px 10px; }
    .fbtn { padding: 5px 11px; font-size: 12.5px; }
}

/* v1.5.4 — Filtros no celular: uma linha só, deslizável */
@media (max-width: 720px) {
    .filterbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px 8px;
        padding: 2px 12px 6px;
        scrollbar-width: none;
    }
    .filterbar::-webkit-scrollbar { display: none; }
    .fbtn, .fpills { flex: none; white-space: nowrap; }
    .fpills { display: inline-flex; flex-wrap: nowrap; }

    /* barra de ferramentas (Lista/Quadro + links) segue o mesmo padrão */
    .toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 14px -12px 6px;
        padding: 0 12px;
        scrollbar-width: none;
    }
    .toolbar::-webkit-scrollbar { display: none; }
    .toolbar .linklike, .view-switch, .board-group { flex: none; white-space: nowrap; }
}

/* v1.6 — Quadro por prazo */
.bcol-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.bcol-danger .bcol-head { color: var(--danger); }

/* ════════════════════════════════════════════════════════════════
   v1.6 — Calendário + botão de resgate
   ════════════════════════════════════════════════════════════════ */

.pull-today {
    flex: none;
    font-size: 13px;
    padding: 7px 14px;
    border: 1px dashed var(--danger) !important;
    background: color-mix(in srgb, var(--danger) 7%, var(--surface));
    color: var(--danger);
    border-radius: 999px;
    white-space: nowrap;
}
.pull-today:hover { background: var(--danger); color: #fff; }

.cal-head {
    display: flex; align-items: center; gap: 8px;
    margin: 18px 0 10px;
}
.cal-title { font-size: 19px; min-width: 190px; text-align: center; }
.cal-week {
    display: grid; grid-template-columns: repeat(7, 1fr);
    font-size: 11.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--muted);
    padding: 0 2px 6px; text-align: center;
}
.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.cal-cell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    min-height: 96px;
    padding: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.out { opacity: .45; background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-cell.today .cal-daynum { background: var(--accent); color: #fff; }
.cal-cell.selected { background: var(--accent-soft); }
.cal-cell.overdue .cal-daynum { color: var(--danger); font-weight: 800; }
.cal-cell.dropping { border-color: var(--accent); background: var(--accent-soft); }
.cal-daynum {
    display: inline-grid; place-items: center;
    width: 22px; height: 22px; border-radius: 50%;
    font-size: 12.5px; font-weight: 700;
    margin-bottom: 3px;
}
.cal-chip {
    font-size: 11.5px; font-weight: 600;
    border-left: 3px solid var(--dot, var(--accent));
    background: color-mix(in srgb, var(--dot, var(--accent)) 10%, var(--surface));
    border-radius: 5px;
    padding: 2px 5px;
    margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: grab;
}
.cal-chip.done { opacity: .5; text-decoration: line-through; cursor: pointer; }
.cal-chip.alta { border-left-color: var(--danger); }
.cal-chip.dragging { opacity: .4; }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 600; padding: 1px 5px; }

.cal-day-panel { margin-top: 20px; }
.cal-day-head {
    display: flex; align-items: baseline; gap: 12px;
    margin-bottom: 8px;
}
.cal-day-head h3 { font-size: 16px; }
.cal-day-head .count { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
    .cal-grid { gap: 3px; }
    .cal-cell { min-height: 58px; padding: 3px; border-radius: 8px; }
    .cal-daynum { width: 19px; height: 19px; font-size: 11px; }
    .cal-chip { font-size: 0; padding: 0; height: 5px; border-left: 0; background: var(--dot, var(--accent)); border-radius: 99px; margin: 0 1px 3px; }
    .cal-more { font-size: 9.5px; padding: 0; }
    .cal-title { min-width: 0; flex: 1; font-size: 17px; }
    .pull-today { font-size: 12.5px; padding: 6px 12px; }
}

/* v1.7 — Idade da tarefa e histórico de resgate */
.age-tag {
    font-size: 11.5px; font-weight: 700;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
}
.age-tag.age-warn   { color: var(--warn);   border-color: color-mix(in srgb, var(--warn) 45%, var(--line));   background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.age-tag.age-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.rescue-tag {
    font-size: 11.5px; font-weight: 700;
    color: var(--accent-ink);
    white-space: nowrap;
}
.task-meta-line {
    margin: 4px 2px 0;
    font-size: 12px;
    color: var(--muted);
}
.dash-task .age-tag, .dash-task .rescue-tag { flex: none; }

/* v1.8.1 — Radar de adiadas */
.stuck-item { border-left: 3px solid color-mix(in srgb, var(--danger) 45%, var(--line)); padding-left: 9px; }

/* ════════════════════════════════════════════════════════════════
   v2.0 — Setores dinâmicos
   ════════════════════════════════════════════════════════════════ */

/* Acento derivado da cor do setor (definida via --accent inline) */
:root, body {
    --accent-ink:  color-mix(in srgb, var(--accent) 78%, #10131c);
    --accent-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
}

/* Abas de setor: pílulas com a própria cor */
.profile-switch { flex-wrap: wrap; gap: 3px; }
.pswitch {
    color: var(--muted);
    border: 1px solid transparent;
    display: inline-flex; align-items: center; gap: 6px;
}
.pswitch::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--sec, var(--muted));
    opacity: .8;
}
.pswitch.on {
    background: var(--sec, var(--accent));
    color: #fff;
}
.pswitch.on::before { background: #fff; }
.pswitch-add { padding: 6px 11px; font-weight: 700; }
.pswitch-add::before { display: none; }
.pswitch-add:hover { color: var(--ink); }
.pswitch-thumb { display: none; }

@media (max-width: 720px) {
    .profile-switch {
        max-width: 60vw;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .profile-switch::-webkit-scrollbar { display: none; }
    .pswitch { white-space: nowrap; flex: none; }
}

/* derivação do acento vence as regras antigas por perfil */
body[data-profile] {
    --accent-ink:  color-mix(in srgb, var(--accent) 78%, #10131c);
    --accent-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
}

/* v2.1 — hora nas tarefas e subtarefas */
.quickadd #qaTime { min-width: 96px; }
.sub-when { display: inline-flex; gap: 4px; flex: none; }
.sub-time {
    border: 1px solid transparent; border-radius: 6px;
    padding: 3px 2px; background: none;
    font-size: 12.5px; color: var(--muted); width: 74px;
}
.sub-time:hover, .sub-time:focus { border-color: var(--line); background: var(--surface); }
@media (max-width: 720px) {
    .quickadd #qaTime { grid-column: auto; }
    .sub-when { grid-column: 3; grid-row: 2; justify-self: end; }
    .sub-date { width: 118px; }
}

/* ════════════════════════════════════════════════════════════════
   v2.2 — Anexos + ativação de notificações
   ════════════════════════════════════════════════════════════════ */

.att-list { list-style: none; margin: 0 0 8px; padding: 0; }
.att-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--bg);
    margin-bottom: 6px;
}
.att-link {
    display: flex; align-items: center; gap: 9px;
    flex: 1; min-width: 0;
    text-decoration: none; color: var(--ink);
    font-size: 13.5px; font-weight: 600;
}
.att-link:hover .att-name { text-decoration: underline; }
.att-icon { flex: none; }
.att-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-link small { color: var(--muted); font-weight: 400; flex: none; }
.att-item .sub-del { visibility: visible; }
.att-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; margin-bottom: 4px; }

.notif-cta {
    display: flex; flex-direction: column; gap: 6px;
    margin: 4px 12px 10px;
    padding: 10px;
    background: var(--accent-soft);
    border-radius: 10px;
}
.notif-cta .btn { font-size: 13px; padding: 8px 12px; }
.notif-cta small { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* v2.2.1 — filtro por prazo */
.fdue-opt { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; }
.fdue-opt.on { background: var(--accent-soft); border-radius: 8px; }
.fdue-range {
    border-top: 1px solid var(--line);
    margin-top: 6px; padding: 10px 8px 6px;
    display: flex; flex-direction: column; gap: 7px;
}
.fdue-range small { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; }
.fdue-range-row { display: flex; align-items: center; gap: 6px; }
.fdue-range-row input {
    flex: 1; min-width: 0;
    border: 1px solid var(--line); border-radius: 7px;
    padding: 6px; font-size: 13px;
}
.fdue-range .btn { font-size: 13px; padding: 7px; }

/* v2.2.2 — grade da adição rápida conta o campo de hora (7 itens em 1 linha) */
.quickadd { grid-template-columns: 1fr auto auto auto auto auto auto; }
@media (max-width: 720px) {
    .quickadd { grid-template-columns: 1fr 1fr; }
    .quickadd #qaTitle, .quickadd > .btn { grid-column: 1 / -1; }
}

/* v2.2.4 — indicador de anexo */
.att-tag { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }

/* ════════════════════════════════════════════════════════════════
   v2.3 — Coach: estímulo e progresso
   ════════════════════════════════════════════════════════════════ */

/* O cartão do Lume é a casa dele: creme com o halo dourado que ele espalha,
   não o cinza-claro genérico de antes. */
.coach {
    display: flex; align-items: center; gap: 10px;
    margin: 14px 0 4px;
    padding: 11px 14px;
    background:
        radial-gradient(120px 90px at 58px 50%, rgba(255, 214, 107, .30), transparent 70%),
        linear-gradient(180deg, #FFFBF0, #FFF7E4);
    border: 1px solid rgba(240, 140, 30, .28);
    border-radius: 14px;
    font-size: 14px;
    color: #4A3A12;
    box-shadow: 0 2px 14px rgba(240, 140, 30, .09);
}
.coach-text { flex: 1; line-height: 1.45; }
.coach-x { flex: none; opacity: .55; }
.coach-x:hover { opacity: 1; }

.day-progress {
    flex: none;
    font-size: 12.5px; font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    white-space: nowrap;
}
.day-progress b { color: var(--accent-ink); }
.day-progress.complete {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.dash-active {
    margin: 2px 0 14px;
    font-size: 13.5px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 9px 12px;
}

@media (max-width: 720px) {
    .coach { font-size: 13.5px; padding: 10px 12px; }
    .day-progress { padding: 4px 10px; }
}

/* ════════════════════════════════════════════════════════════════
   v2.4 — Lume, o vagalume + cartão de ofensiva
   ════════════════════════════════════════════════════════════════ */

.coach-card {
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 10%, #fffdf6),
        color-mix(in srgb, var(--luz) 14%, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    overflow: hidden;
}
.mascot { flex: none; line-height: 0; }
.mascot svg { overflow: visible; display: block; }
.coach-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coach-card .coach-text { color: var(--ink); font-weight: 500; }

/* animações do Lume */
.m-float { animation: mfloat 3.6s ease-in-out infinite; }
@keyframes mfloat { 50% { transform: translateY(-4px); } }
.m-glow { animation: mglow 2.8s ease-in-out infinite; }
.m-glow.strong { animation-duration: 1.9s; }
@keyframes mglow { 50% { opacity: .5; } }
.m-glowdot { animation: mglow 2.2s ease-in-out infinite; }
.m-eye { animation: mblink 5.2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mblink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.12); } }
.m-wing { animation: mwing 2s ease-in-out infinite; transform-box: view-box; }
.m-wing-r { animation-delay: .12s; }
@keyframes mwing { 50% { transform: rotate(-7deg); } }
.m-wing-r { animation-name: mwingr; }
@keyframes mwingr { 50% { transform: rotate(7deg); } }
.m-spark { animation: mglow 1.6s ease-in-out infinite; }

/* ofensiva */
.streak-row {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px 14px;
}
.streak-label { font-size: 13px; color: var(--ink); }
.streak-label b { color: var(--accent-ink); }
.sdots { display: inline-flex; gap: 5px; }
.sdot { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.sdot i {
    width: 13px; height: 13px; border-radius: 50%;
    background: #DFE4EC;                 /* cinza-azulado: repouso, nunca perda */
    border: 1.5px solid #C3CBD8;
    transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
/* VIVIDO: dourado com halo laranja. O brilho é sinal de conquista —
   quem ganhou o dia trabalhando é quem merece o destaque. */
.sdot.on i {
    background: var(--luz);
    border-color: var(--luz-forte);
    box-shadow: 0 0 0 2px rgba(240, 140, 30, .3), 0 0 7px 1px rgba(240, 140, 30, .6);
}
/* REACESO: dourado liso, sem halo. A luz é a mesma; o brilho extra fica
   com quem conquistou. */
.sdot.on.reaceso i {
    background: var(--luz);
    border-color: #E8A93A;
    box-shadow: none;
}

/* apagada e comprável: vira botão — um convite discreto, não uma cobrança */
button.sdot.relight {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
button.sdot.relight i { border-style: dashed; }
button.sdot.relight:hover i,
button.sdot.relight:focus-visible i {
    background: #FBE9BC;
    border-color: #E8A93A;
    box-shadow: 0 0 7px rgba(255, 214, 107, .55);
}
button.sdot.relight:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
button.sdot.acendendo i { animation: acender .7s ease-in-out infinite; }
@keyframes acender {
    0%, 100% { background: #DFE4EC; }
    50%      { background: var(--luz); box-shadow: 0 0 10px rgba(255, 214, 107, .9); }
}

/* contador vitalício — nunca zera */
.luz-total {
    display: inline-flex; flex-direction: column; line-height: 1.25;
    font-size: 12.5px; font-weight: 600; color: var(--accent-ink);
}
.luz-total small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.sdot.today i { border-color: var(--accent); border-width: 2px; }
.sdot small { font-size: 8.5px; color: var(--muted); font-weight: 700; }

@media (max-width: 720px) {
    .coach-card { gap: 10px; padding: 10px 12px; }
    .mascot svg { width: 68px; height: 75px; }
    .streak-row { gap: 6px 10px; }
    .streak-label { font-size: 12.5px; }
}

/* v2.5 — Lume ilustrado (PNG) */
/* Caixa fixa para TODAS as poses. O object-fit: contain garante que o
   desenho preencha a moldura do mesmo jeito, qualquer que seja a proporção
   do PNG — desde que o arquivo venha aparado, sem margem transparente.
   Padrão dos arquivos: quadrado, fundo transparente, bicho ocupando ~90%. */
.mascot-img {
    width: 104px; height: 104px;
    object-fit: contain; object-position: center;
    display: block;
}
@media (max-width: 720px) { .mascot-img { width: 80px; height: 80px; } }

/* v2.5.1 — halo do Lume atrás do PNG (o brilho que o recorte perdeu) */
.mascot { position: relative; }
.mascot::before {
    content: "";
    position: absolute;
    left: 50%; top: 58%;
    width: 78px; height: 78px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 233, 168, .85) 0%,
        rgba(255, 214, 107, .35) 55%,
        rgba(255, 214, 107, 0) 75%);
    animation: mglow 2.6s ease-in-out infinite;
    pointer-events: none;
}
.mascot img, .mascot svg { position: relative; z-index: 1; }
@media (max-width: 720px) { .mascot::before { width: 60px; height: 60px; } }

/* ════════════════════════════════════════════════════════════════
   Filosofia do Lume — a chama varia de intensidade, nunca apaga
   ════════════════════════════════════════════════════════════════ */

.mascot[data-glow="forte"]::before {
    width: 96px; height: 96px;
    animation-duration: 1.8s;
    opacity: 1;
}
.mascot[data-glow="media"]::before {
    width: 78px; height: 78px;
    animation-duration: 2.6s;
    opacity: .85;
}
.mascot[data-glow="suave"]::before {
    width: 56px; height: 56px;
    animation-duration: 4s;
    opacity: .55;   /* mais fraca, porém sempre presente */
}
@media (max-width: 720px) {
    .mascot[data-glow="forte"]::before { width: 74px; height: 74px; }
    .mascot[data-glow="media"]::before { width: 60px; height: 60px; }
    .mascot[data-glow="suave"]::before { width: 44px; height: 44px; }
}

/* ════════════════════════════════════════════════════════════════
   v2.7 — Lumens + Loja do Lume
   ════════════════════════════════════════════════════════════════ */

.lume-coin {
    border: 1px solid #E8B23C;
    background: linear-gradient(135deg, #FFF4CE, #FFE9A8);
    color: #7A5B12;
    font-weight: 700; font-size: 12.5px;
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
    margin-left: auto;
    transition: transform .15s;
}
.lume-coin { cursor: pointer; }
.lume-coin:hover { transform: scale(1.06); }
.lume-coin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal-lume { max-width: 560px; }
.lume-balance {
    margin-left: auto; margin-right: 8px;
    font-weight: 700; color: #7A5B12;
    background: #FFF4CE; border: 1px solid #E8B23C;
    border-radius: 999px; padding: 4px 12px; font-size: 13px;
}
.lume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.lume-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 6px;
    background: var(--bg);
}
.lume-item img { width: 64px; height: 64px; object-fit: contain; }
.lume-item strong { font-size: 12.5px; }
.lume-item.owned { border-color: #E8B23C; background: #FFFBEE; }
.lume-owned { font-size: 12px; color: #7A5B12; font-weight: 700; }
.lume-buy { font-size: 12px; padding: 5px 10px; }

.lume-favs { display: flex; flex-wrap: wrap; gap: 8px; }
.lume-fav {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 12px 5px 7px;
    font-size: 13px; cursor: pointer;
    background: var(--bg);
}
.lume-fav img { width: 26px; height: 26px; object-fit: contain; }
.lume-fav:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.lume-fav input { accent-color: var(--accent); }

/* v2.8 — acessórios vestíveis */
.mascot { position: relative; }
.mascot .mascot-img { position: relative; z-index: 1; }
.lume-acc { position: absolute; pointer-events: none; }
.lume-slot-h {
    margin: 12px 0 8px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.lume-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
}
.lume-item.worn { border-color: var(--accent); background: var(--accent-soft); }
.lume-item .linklike { font-size: 12px; }

/* ════════════════════════════════════════════════════════════════
   v2.9 — Casa do Lume
   ════════════════════════════════════════════════════════════════ */



@media (max-width: 720px) {
}

/* Casa sem arte ainda: cena noturna digna em CSS (nada de pixel esticado) */

/* ════════════════════════════════════════════════════════════════
   v3.0 — Casa do Lume: cenário vivo + layout
   ════════════════════════════════════════════════════════════════ */


/* vida do cenário */
.cs-cloud  { animation: csDrift 26s ease-in-out infinite alternate; }
.cs-cloud2 { animation-duration: 34s; animation-delay: -8s; }
@keyframes csDrift { to { transform: translateX(22px); } }
.cs-star   { animation: mglow 2.4s ease-in-out infinite; }
.cs-fire   { animation: csFloat 5s ease-in-out infinite; }
.cs-fire2  { animation-delay: -2.4s; animation-duration: 6.4s; }
@keyframes csFloat { 50% { transform: translate(6px, -8px); } }
.cs-sprout { transform-box: fill-box; transform-origin: 20% 95%; animation: csSway 4.5s ease-in-out infinite; }
@keyframes csSway { 50% { transform: rotate(4deg); } }
@media (max-width: 720px) {
}




/* ══ Visão TUDO ══════════════════════════════════════════════════
   Panorâmica de leitura: "o que eu não vejo, não existe".
   Criar tarefa continua sendo só dentro do setor. */

.pswitch-tudo { font-weight: 700; letter-spacing: .02em; }
.pswitch-tudo::before { content: '◇'; margin-right: 5px; opacity: .7; }
.pswitch-tudo.on::before { content: '◈'; opacity: 1; }

/* no Tudo o campo de criar some — e a barra de visões também,
   porque quadro e calendário são ferramentas de um setor só */
body.em-tudo #quickAdd,
body.em-tudo .view-switch,
body.em-tudo #boardGroup { display: none; }

.tudo-hint {
    margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5;
}

/* cada seção puxa a cor do próprio setor via --sec */
.section--setor { border-left: 3px solid var(--sec, var(--accent)); padding-left: 12px; }
.section-title--setor { display: flex; align-items: center; gap: 8px; }
.section-title--setor .sec-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--sec, var(--accent)); flex: none;
}
.section-title--setor .count {
    background: color-mix(in srgb, var(--sec, var(--accent)) 16%, transparent);
    color: var(--sec, var(--accent));
}
.sec-ir { margin-left: auto; font-size: 11.5px; opacity: .75; }
.sec-ir:hover { opacity: 1; }


/* ══ Setores compartilhados ══════════════════════════════════════ */

.pswitch-share { position: relative; }
.pswitch-share::after {
    content: '⇄'; margin-left: 5px; font-size: 11px; opacity: .65;
}
.pswitch .por-quem {
    display: block; font-size: 9.5px; font-weight: 600;
    opacity: .7; letter-spacing: .01em; margin-top: 1px;
}

/* quem só pode ver e concluir não vê o que não pode usar */
body.so-ver #quickAdd { display: none; }
body.so-ver [data-secshare],
body.so-ver .drawer-danger { display: none; }

.type-row--convidada { opacity: .95; }
.sec-bolha { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sec-nome { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.sec-nome small { font-size: 11px; color: var(--muted); font-weight: 500; }

.share-form { flex-wrap: wrap; }
.share-form #shareUser { flex: 1 1 150px; min-width: 0; }
.share-form #sharePerm { flex: 0 1 auto; }

.bell-convite { border-left: 3px solid var(--accent); }
.bell-acoes { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.btn-sm { padding: 4px 12px; font-size: 12.5px; }


/* o gerenciador de setores precisa parecer um gerenciador, não um "+" */
.pswitch-add { font-weight: 600; letter-spacing: .01em; }

/* Compartilhar é ação de verdade: não pode ser o elemento mais apagado da linha */
.btn-share {
    border: 1px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600;
    padding: 5px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap;
    transition: background .15s ease;
}
.btn-share:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.btn-share:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ══ Guia dos Lumens ═════════════════════════════════════════════ */
.guia-sub {
    margin: 16px 20px 8px; font-size: 13px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.guia-lista { list-style: none; margin: 0 20px 4px; padding: 0; }
.guia-item {
    display: flex; align-items: baseline; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--line);
}
.guia-item:last-child { border-bottom: 0; }
.guia-n {
    flex: none; min-width: 44px; text-align: right;
    font-size: 15px; font-weight: 700; color: #E8A93A;
    font-variant-numeric: tabular-nums;
}
.guia-txt { display: flex; flex-direction: column; line-height: 1.35; font-size: 14px; }
.guia-txt small { font-size: 12px; color: var(--muted); }
.guia-raro .guia-n { color: var(--luz-forte); }   /* a estrela é luz, não roxo */
.guia-raro .guia-txt { font-style: italic; }


/* ══ A luz do vaga-lume ══════════════════════════════════════════
   Não é um símbolo sobre a luz do Lume — é a luz dele.
   Mesmo dourado das bolinhas acesas, respirando devagar. */
.vagalume {
    display: inline-block; vertical-align: middle;
    width: 9px; height: 9px; border-radius: 50%;
    margin: -2px 8px 0 0; flex: none;
    background: var(--luz);
    animation: vagalumear 3.4s ease-in-out infinite;
}
@keyframes vagalumear {
    0%, 100% { opacity: .45; box-shadow: 0 0 3px 0 rgba(255, 214, 107, .5); }
    45%      { opacity: 1;   box-shadow: 0 0 9px 3px rgba(255, 214, 107, .75); }
}
/* quem pediu menos movimento não leva pisca nenhum */
@media (prefers-reduced-motion: reduce) {
    .vagalume { animation: none; opacity: 1; box-shadow: 0 0 6px 2px rgba(255, 214, 107, .6); }
}


/* ══ Alerta severo ═══════════════════════════════════════════════
   Cartão flutuante, não faixa. A faixa de ponta a ponta empurrava a
   página inteira e ficava presa no meio do rolamento. */
.severo-flutua {
    position: fixed; z-index: 80;
    right: 18px; bottom: 18px; width: min(340px, calc(100vw - 36px));
    background: #fff; border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(179, 38, 30, .25);
    border-top: 4px solid #B3261E;
    box-shadow: 0 14px 40px rgba(20, 22, 30, .22);
    animation: severoSobe .22s ease-out;
}
@keyframes severoSobe {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.severo-cabeca {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 14px 8px;
}
.severo-cabeca strong { flex: 1; font-size: 14px; color: #B3261E; line-height: 1.3; }
.severo-pino {
    flex: none; width: 20px; height: 20px; border-radius: 50%;
    background: #B3261E; color: #fff; font-weight: 800; font-size: 13px;
    display: grid; place-items: center;
    animation: severoBate 1.5s ease-in-out infinite;
}
@keyframes severoBate { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.severo-x {
    flex: none; background: none; border: 0; cursor: pointer;
    font-size: 15px; opacity: .6; padding: 2px;
}
.severo-x:hover { opacity: 1; }

.severo-itens { list-style: none; margin: 0; padding: 0 14px 4px; }
.severo-itens li {
    padding: 5px 0; border-top: 1px solid var(--line);
    display: flex; flex-direction: column; line-height: 1.35;
}
.severo-itens li:first-child { border-top: 0; }
.severo-link {
    background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
    font: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink);
}
.severo-link:hover { text-decoration: underline; }
.severo-itens small { color: #B3261E; font-size: 11.5px; font-weight: 600; }

.severo-perm {
    margin: 0; padding: 8px 14px;
    background: #FFF6E5; border-top: 1px solid var(--line);
    font-size: 12px; line-height: 1.45; color: #7A5B12;
}
.severo-ok {
    display: block; width: calc(100% - 28px); margin: 10px 14px 14px;
    background: #B3261E; color: #fff; border: 0; font-weight: 700;
}
.severo-ok:hover { background: #98201A; }

/* a linha da tarefa pulsa até a ciência */
.task.severo-pulsa { animation: severoPulsa 1.6s ease-in-out infinite; border-radius: 10px; }
@keyframes severoPulsa {
    0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0); }
    50%      { box-shadow: 0 0 0 3px rgba(179, 38, 30, .35); }
}
@media (max-width: 720px) {
    .severo-flutua { right: 10px; left: 10px; bottom: 10px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .severo-flutua, .severo-pino { animation: none; }
    .task.severo-pulsa { animation: none; box-shadow: 0 0 0 2px rgba(179, 38, 30, .45); }
}

.field-severo { grid-column: 1 / -1; }
.check-inline { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; }
.check-inline input { width: 17px; height: 17px; flex: none; }
.check-inline small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }

.som-pick {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.som-pick label { color: var(--muted); font-weight: 600; }
.som-pick select { flex: 1; min-width: 90px; }


/* ══ Foco de Hoje ════════════════════════════════════════════════ */
.task-foco {
    background: none; border: 0; cursor: pointer; flex: none;
    font-size: 17px; line-height: 1; padding: 2px 4px;
    color: var(--line); transition: color .15s ease, transform .15s ease;
}
.task-foco:hover { color: #E8A93A; transform: scale(1.15); }
.task-foco.on { color: #E8A93A; text-shadow: 0 0 8px rgba(232, 169, 58, .5); }
.task-foco:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.section--foco {
    background: linear-gradient(180deg, rgba(255, 214, 107, .13), transparent 70%);
    border-radius: 14px; padding: 12px 12px 4px; margin-bottom: 18px;
    border: 1px solid rgba(232, 169, 58, .3);
}
.section--foco .section-title { color: #B8860B; }
.section--foco .count { background: rgba(232, 169, 58, .2); color: #8a6410; }
.foco-aviso { font-weight: 400; font-size: 11.5px; color: var(--muted); margin-left: 8px; }

.aviso-subs {
    background: color-mix(in srgb, var(--warn, #C77700) 9%, transparent);
    border-left: 3px solid var(--warn, #C77700);
    border-radius: 8px; padding: 9px 12px; margin-bottom: 14px;
    font-size: 12.5px; line-height: 1.5;
}
.aviso-subs .linklike { font-size: 12.5px; }

/* aparelhos que recebem aviso com o app fechado */
.push-box { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.push-linha { display: flex; align-items: center; gap: 10px; }
.push-linha b { flex: 1; }
.push-box > small { display: block; color: var(--muted); margin: 5px 0 0; line-height: 1.45; }
.push-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.push-lista li {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 4px 0; border-top: 1px solid var(--line);
}
.push-lista small { color: var(--muted); flex: 1; font-size: 11px; }
.push-acoes { display: flex; gap: 12px; margin-top: 8px; }

/* rastro de conclusão e lixeira */
.feito-por { font-size: 11px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
#lixoLista .sec-nome small { font-size: 11.5px; }


/* ══ Calendário dos dias de luz ══════════════════════════════════
   Células de tamanho FIXO. Com 1fr elas esticavam para preencher a
   largura do modal e viravam bolas gigantes. */
.cal-legenda {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin: 4px 20px 12px; font-size: 12px; color: var(--muted);
}
.cal-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.cal-am { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }

.cal-meses { padding: 0 20px 4px; max-height: 52vh; overflow-y: auto; }
.cal-mes { margin-bottom: 20px; }
.cal-mes h3 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.cal-mes h3 small { font-weight: 500; color: var(--muted); font-size: 11.5px; }

.cal-cab, .cal-grade {
    display: grid; grid-template-columns: repeat(7, 30px);
    gap: 6px; justify-content: start;
}
.cal-cab i {
    text-align: center; font-style: normal; font-size: 10px;
    font-weight: 700; color: var(--muted);
}
.cal-vazio { visibility: hidden; }
.cal-dia {
    width: 30px; height: 30px; box-sizing: border-box;
    display: grid; place-items: center; border-radius: 50%;
    font-style: normal; font-size: 11px; font-weight: 600;
    border: 1.5px solid transparent; padding: 0;
}
/* VIVIDO: dourado com halo laranja — o dia que você conquistou. */
.cal-viv, i.cal-viv {
    background: var(--luz); border-color: var(--luz-forte); color: var(--luz-escura);
    box-shadow: 0 0 0 2px rgba(240, 140, 30, .3), 0 0 7px 1px rgba(240, 140, 30, .55);
}
/* REACESO: dourado liso — a mesma luz, comprada depois. */
.cal-rea, i.cal-rea { background: var(--luz); border-color: #E8A93A; color: var(--luz-escura); }
/* apagado: cinza-azulado, nunca vermelho */
.cal-apa, i.cal-apa { background: #E8ECF2; border-color: #D5DBE4; color: #7C8698; }
/* dias antes de você chegar: ficam à vista, mas apagadinhos — o mês continua
   sendo um mês, em vez de virar um buraco branco */
.cal-fora { background: none; border-color: transparent; color: #C9D0DA; font-weight: 500; }
.cal-hoje { outline: 2px solid var(--accent); outline-offset: 1px; }

button.cal-dia.cal-pode { cursor: pointer; font-family: inherit; }
button.cal-dia.cal-pode:hover {
    background: #FBE9BC; border-color: #E8A93A; color: var(--luz-escura);
}
button.cal-dia.cal-pode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.cal-dia.acendendo { animation: acender .7s ease-in-out infinite; }

/* o contador do cartão virou porta de entrada */
button.luz-total {
    background: none; border: 0; cursor: pointer; text-align: left;
    font: inherit; padding: 0;
}
button.luz-total:hover { text-decoration: underline; }
button.luz-total:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* desfazer dentro do próprio aviso: um caminho só para voltar atrás */
.toast-undo {
    display: block; margin-top: 6px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
    color: inherit; font: inherit; font-size: 12px; font-weight: 700;
    padding: 3px 12px; border-radius: 7px; cursor: pointer;
}
.toast-undo:hover:not(:disabled) { background: rgba(255, 255, 255, .28); }
.toast-undo:disabled { opacity: .6; cursor: default; }


/* ══ Ação em lote ════════════════════════════════════════════════ */
.task-sel { width: 19px; height: 19px; flex: none; cursor: pointer; margin: 2px 3px; }
body.em-lote .task { cursor: pointer; }
body.em-lote .task-foco { display: none; }

.barra-lote {
    position: fixed; z-index: 70; left: 50%; transform: translateX(-50%);
    bottom: 16px; width: min(680px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--ink, #1B1E26); color: #fff;
    padding: 10px 14px; border-radius: 13px;
    box-shadow: 0 12px 34px rgba(20, 22, 30, .3);
    animation: loteSobe .2s ease-out;
}
@keyframes loteSobe { from { transform: translate(-50%, 12px); opacity: 0; }
                        to { transform: translate(-50%, 0);   opacity: 1; } }
.barra-lote.vazia .lote-acoes { opacity: .4; pointer-events: none; }
.lote-conta { font-weight: 700; font-size: 13px; white-space: nowrap; }
.lote-acoes { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; flex: 1; }
.barra-lote .btn-sm { background: rgba(255,255,255,.14); color: #fff; border: 0; }
.barra-lote .btn-sm:hover { background: rgba(255,255,255,.26); }
.barra-lote .linklike { color: #fff; opacity: .85; font-size: 12.5px; }
.barra-lote .linklike:hover { opacity: 1; }
.barra-lote .lote-perigo { color: #FF9A92; }
.barra-lote input[type=date] {
    background: rgba(255,255,255,.14); border: 0; color: #fff;
    border-radius: 7px; padding: 4px 7px; font: inherit; font-size: 12px;
}
.lote-sep { width: 1px; height: 18px; background: rgba(255,255,255,.25); }
.barra-lote .iconbtn { color: #fff; opacity: .7; }
.barra-lote .iconbtn:hover { opacity: 1; }
@media (max-width: 720px) {
    .barra-lote { bottom: 8px; padding: 9px 11px; gap: 8px; }
    .lote-conta { width: 100%; }
}


/* ajuda: onde fica cada coisa */
#ajudaBtn {
    width: 24px; height: 24px; border-radius: 50%; padding: 0;
    border: 1.5px solid var(--line); font-weight: 800; line-height: 1;
}
#ajudaBtn:hover { border-color: var(--accent); color: var(--accent); }
.ajuda-lista { list-style: none; margin: 0; padding: 0 20px 6px; }
.ajuda-lista li {
    padding: 9px 0; border-bottom: 1px solid var(--line);
    font-size: 13px; line-height: 1.5;
}
.ajuda-lista li:last-child { border-bottom: 0; }
.ajuda-lista b { color: var(--accent-ink, var(--ink)); }

/* ══ Tela estreita ═══════════════════════════════════════════════
   Auditado depois que um print mostrou rolagem horizontal dentro do
   painel da tarefa. O culpado era flex sem wrap com campos de largura fixa. */
@media (max-width: 560px) {
    .subadd input, .subadd button { flex: 1 1 100%; }
    .type-row { gap: 6px; }
    .type-row .sec-nome { flex: 1 1 100%; }
    .cal-cab, .cal-grade { grid-template-columns: repeat(7, 1fr); }
    .cal-dia { width: 100%; height: auto; aspect-ratio: 1; max-width: 34px; }
    .modal { width: 100%; }
    .cal-meses, .modal-hint, .cal-legenda { padding-left: 14px; padding-right: 14px; }
    .severo-flutua { right: 8px; left: 8px; width: auto; }
}
/* nada no app deve gerar rolagem lateral */
html, body { overflow-x: hidden; }
.drawer, .modal { overflow-x: hidden; }
.drawer-body { overflow-x: hidden; }


/* ══ Sininho: setor visível e urgência legível ═══════════════════ */
.bell-topo { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; flex-wrap: wrap; }
.bell-setor {
    font-size: 10.5px; font-weight: 800; letter-spacing: .03em;
    text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
    color: var(--sec); background: color-mix(in srgb, var(--sec) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--sec) 35%, transparent);
}
.bell-quando { font-size: 11px; font-weight: 700; color: var(--muted); }
.bell-quando.urg-atraso { color: var(--danger); }
.bell-quando.urg-hoje   { color: var(--warn); }
.bell-sev {
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    padding: 2px 7px; border-radius: 999px;
    background: #B3352E; color: #fff;
}
.bell-titulo { font-weight: 600; line-height: 1.35; }
.bell-item.urg-atraso { border-left: 3px solid var(--danger); }
.bell-item.urg-hoje   { border-left: 3px solid var(--warn); }
.topbar .bell-panel .bell-setor { color: var(--sec); }
.topbar .bell-panel .bell-quando.urg-atraso { color: var(--danger); }
.topbar .bell-panel .bell-quando.urg-hoje { color: var(--warn); }
.topbar .bell-panel .bell-sev { color: #fff; }

/* quanto tempo a tarefa está no topo — informação, não cobrança */
.foco-tag {
    font-size: 11px; font-weight: 700; color: #8A6410;
    background: color-mix(in srgb, var(--luz) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--luz-forte) 35%, transparent);
    padding: 1px 7px; border-radius: 999px;
}


/* ══ Um Salvar por janela ════════════════════════════════════════ */
.painel-rodape {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 14px 20px 4px; padding-top: 12px; border-top: 1px solid var(--line);
}
.painel-rodape small { color: var(--muted); font-size: 12px; }
.painel-rodape .btn:disabled { opacity: .45; cursor: default; }
/* linha alterada e ainda não salva: fica visível qual mexeu */
.type-row.sujo, .tgroup-head.sujo {
    background: color-mix(in srgb, var(--luz) 20%, transparent);
    border-radius: 8px;
    box-shadow: inset 3px 0 0 var(--luz-forte);
}

/* diagnóstico dentro da ajuda */
.ajuda-diag { margin: 4px 20px 16px; }
.ajuda-diag pre {
    background: #F2EEE3; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px; font-size: 11px; line-height: 1.5; max-height: 180px;
    overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0;
}
