/* ===== Início ===== */
.home-h{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.main.home{gap:28px}
.hring-m{display:none}
.home-cols{display:flex;gap:32px;align-items:flex-start}
.home-l{flex:0 0 600px;max-width:600px;min-width:0;display:flex;flex-direction:column;gap:18px}
.home-r{flex:1 1 0;min-width:0;max-width:640px;display:flex;flex-direction:column;gap:14px}
#homeev:empty,#homemat:empty,.hf-d-wrap:empty,#homebills:empty,#homefood:empty{display:none}

/* adicionar tarefa */
.home .addbar{min-height:48px;padding:0 10px;gap:10px;border:1.5px dashed var(--dashed);border-radius:15px}
.home .addbar .plus{width:28px;height:28px;border-radius:9px}
.home .addbar input{font-size:16px}

/* eventos compactos */
.home .sub{margin:0 0 8px 2px;font-size:12px}
.home-evbox{border-radius:14px;background:var(--surface);border:1px solid var(--card-border);overflow:hidden}
.home-evbox .evrow{min-height:36px;padding:6px 12px;gap:12px;border:0;border-radius:0;background:transparent;border-bottom:1px solid var(--line)}
.home-evbox .evrow:last-child{border-bottom:0}
.home-evbox .evrow>i{width:8px;height:8px;border-radius:50%}
.home-evbox .evrow b{min-width:52px;font-size:13.5px}
.home-evbox .evrow span{font-size:14.5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-evbox .evrow em{font-size:12.5px;flex:none}
.evrow.tay .tspk{flex:none;width:8px;display:grid;place-items:center;color:var(--lilac);overflow:visible}
.evrow.tay b{color:var(--lilac);font-size:12.5px}

/* tarefas por projeto */
.home-th{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:2px}
.home-btns{display:flex;align-items:center;gap:8px}
.home-btns>span{display:flex}
.filtbtn{border-color:var(--line);color:var(--text)}
.filtbtn.on{border-color:var(--accent);color:var(--accent-text);background:var(--today-bg)}
.filtbtn span{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.hp-dot{display:block;flex:none;width:10px;height:10px;border-radius:50%;background:var(--dot,var(--muted))}
.hp-dot.all{width:auto;height:auto;background:none;color:var(--muted);display:grid}
.ord-it small{flex:none;font-size:12.5px;color:var(--muted)}
.home-list{display:flex;flex-direction:column;gap:6px}
.home-tbox{display:contents}
.hg{display:flex;flex-direction:column;gap:8px}
.hg-h{display:flex;align-items:center;gap:8px;margin:8px 0 0 2px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.hg-h em{font-style:normal;font-weight:500;letter-spacing:0}
.hg-l{display:flex;flex-direction:column;gap:8px}
.home .task{min-height:52px;padding:6px 12px 6px 14px;gap:12px}
.home .t-text{font-size:16px}
.home .task .due,.home .task .due.hot{min-width:0;padding:3px 6px;background:transparent;color:var(--muted);font-size:13px;font-weight:700}
.home .task .due.late{color:var(--red)}

/* cartões da direita */
.hcard{display:flex;flex-direction:column;gap:10px;padding:16px 18px;border-radius:18px;background:var(--surface);border:1px solid var(--card-border)}
.hc-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.hc-h h3{margin:0;font-size:16px;font-weight:800;letter-spacing:-.01em}
.hc-h small{font-size:12.5px;color:var(--muted)}
.hc-empty{margin:0;font-size:14px;color:var(--muted)}
.hbill{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}
.hbill:last-child{border-bottom:0}
.hbill .pbox{flex:none;border-radius:8px}
.hbill .pbox.on{background:var(--accent);border-color:var(--accent)}
.hb-n{flex:1;min-width:0;display:flex;flex-direction:column}
.hb-n b{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hb-n small{font-size:12.5px;color:var(--muted)}
.hb-v{flex:none;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}
.hbill.paid{opacity:.55}
.hbill.paid .hb-n b{text-decoration:line-through}
.hb-f{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:6px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.hb-f b{font-size:20px;font-weight:800;color:var(--accent-text)}
.home-duo{display:flex;gap:14px;align-items:stretch}
.hring-d,#homewater{flex:1 1 0;min-width:0;display:flex}
.hring,.hwater{flex:1;display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:16px;min-width:0}
.hring i,.hwater>i{flex:none;width:36px;height:36px;border-radius:11px;display:grid;place-items:center}
.hring{background:var(--lilac-bg);border:1px solid color-mix(in srgb,var(--lilac) 45%,transparent)}
.hring i{background:color-mix(in srgb,var(--lilac) 25%,transparent);color:var(--lilac)}
.hring b{display:block;font-size:15px;font-weight:800;color:var(--lilac)}
.hring small{display:block;font-size:13.5px;color:var(--text)}
.hring.today{background:var(--red);border-color:var(--red)}
.hring.today i{background:rgba(42,10,20,.16);color:#2A0A14}
.hring.today b,.hring.today small{color:#2A0A14}
:root[data-theme="light"] .hring.today i,:root[data-theme="light"] .hring.today b,:root[data-theme="light"] .hring.today small{color:#fff}
:root[data-theme="light"] .hring.today i{background:rgba(255,255,255,.22)}
.hring.late{background:var(--red-bg);border-color:var(--red-line)}
.hring.late i{background:var(--red);color:#2A0A14}
:root[data-theme="light"] .hring.late i{color:#fff}
.hring.late b{color:var(--red)}
.hring.none{background:var(--surface);border:1px dashed var(--dashed)}
.hring.none b{color:var(--muted)}
.hring.none i{background:var(--chip-bg);color:var(--muted)}
.hx-m,.sl-m{display:none}
.hwater{background:var(--surface);border:1px solid var(--card-border)}
.hwater>i{background:var(--blue-bg);color:var(--blue)}
.hwater>div{flex:1;min-width:0;display:flex;flex-direction:column}
.hwater>div b{font-size:15px;font-weight:800}
.hwater>div small{font-size:13px;color:var(--muted)}
.hwater .btn{flex:none;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.hmat{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 14px;border-radius:12px;background:var(--teal-bg);border:1px solid color-mix(in srgb,var(--teal) 35%,transparent)}
.hmat i{flex:none;display:grid;color:var(--teal)}
.hmat b{flex:none;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--teal)}
.hmat span{flex:1;min-width:0;font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hf-m{display:none}
.hf-grid{display:flex;flex-direction:column;gap:2px}
.hf-row{display:grid;grid-template-columns:44px repeat(4,minmax(0,1fr));gap:8px;padding:6px 8px;border-radius:8px;font-size:13.5px}
.hf-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hf-row.hfh{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.hf-row .hf-d{font-size:11.5px;font-weight:800;letter-spacing:.06em;color:var(--muted)}
.hf-row.now{background:var(--today-bg);color:var(--today-text)}
.hf-row.now .hf-d{color:var(--accent-text)}
.hf-strip{display:none}.hf-rows{display:block}
.hf-mrow{display:flex;align-items:baseline;gap:14px;padding:10px 2px;border-bottom:1px solid var(--line);font-size:14.5px}.hf-mrow:last-child{border-bottom:0}.hf-mrow span{flex:none;width:62px;font-size:11px;font-weight:800;letter-spacing:.06em;color:var(--muted)}.hf-mrow b{font-weight:700;min-width:0}

@media (max-width:820px),(hover:none) and (pointer:coarse){
  .main.home{gap:14px}
  .home-h{align-items:flex-start}
  .hring-m{display:block;flex:none;max-width:210px}
  .hring-m .hring{padding:8px 12px;gap:10px;border-radius:14px}
  .hring-m .hring i{width:30px;height:30px;border-radius:9px}
  .hring-m .hring b{font-size:13px}
  .hring-m .hring small{font-size:12px;line-height:1.25}
  .hring-d{display:none}
  .hx-d,.sl-d{display:none}.hx-m,.sl-m{display:inline}
  html.home-on .icon-btn.theme-mini{display:none!important}
  .home-cols{flex-direction:column;gap:14px}
  .home-l,.home-r{flex:none;width:100%;max-width:none;gap:12px}
  .home-duo{order:-1}
  #homewater{width:100%}
  .home .addbar{min-height:48px}
  .hf-m{display:block}.hf-d-wrap{display:none}
  .hmat{padding:9px 12px;gap:8px}
  .hmat b{font-size:11px}
  .hmat span{font-size:14px}
  .home-evbox .evrow{padding:6px 12px;min-height:38px}
  /* tarefas mais baixas */
  .home .task,.home .task.reorder{flex-wrap:nowrap;gap:10px;min-height:42px;padding:5px 8px 5px 10px;border-radius:13px;align-items:center}
  .home .task>*{order:0}
  .home .task .chk{width:22px;height:22px;border-radius:50%}
  .home .task .t-text{flex:1 1 auto;font-size:14.5px;padding:0}
  .home .task .t-text~*{font-size:11.5px}
  .home .task .t-text+*,.home .task .t-text+.chip{margin-left:0}
  .home .task .due,.home .task .due.hot,.home .task .due.late{min-width:0;padding:3px 4px;font-size:11.5px;background:transparent;color:var(--muted)}
  .home .task .due.late{color:var(--red)}
  .home .task .grip{order:9;width:26px;height:34px;margin:0}
  .home .task .del{display:none}
  /* recorrência fica numa linha embaixo do nome, sem espremer o texto */
  .home .task,.home .task.reorder{flex-wrap:wrap;row-gap:2px}
  .home .task .t-text{flex:1 1 0;min-width:0}
  .home .task .rp-b{display:none}
  .home .task .rp-b span{max-width:none}
  .hg{gap:6px}.hg-l{gap:6px}
  .hg-h{margin:6px 0 0 2px;font-size:11.5px}
  .home-th .title{font-size:19px}
  .home-tbox{display:flex;flex-direction:column;gap:12px;padding:14px 12px 12px;border-radius:20px;background:var(--side);border:1.5px solid var(--border)}
  .home-tbox .home-th{margin:0 2px}
  .home-tbox{min-width:0;max-width:100%;box-sizing:border-box}
  .home-tbox .home-th{min-width:0;flex-wrap:nowrap}
  .home-tbox .home-th .title{flex:none}
  .home-tbox .home-btns{flex:0 1 auto;min-width:0;gap:6px}
  .home-tbox .home-btns>span{min-width:0}
  .home-tbox .sortbtn{min-width:0;padding:0 9px;gap:6px;max-width:100%}
  .home-tbox .filtbtn span{max-width:84px}
  .home-tbox .empty-note{margin:6px 4px}
  .hwater{padding:12px 14px}
  .hcard{padding:14px 16px}
  .hf-grid{display:none}
  .hf-strip{display:flex;gap:6px}
  .hf-pill{flex:1 1 0;min-width:0;height:38px;border:0;border-radius:12px;background:var(--chip-bg);color:var(--muted);font-size:13px;font-weight:800}
  .hf-pill.on{background:var(--accent);color:var(--on-accent)}
  .hf-rows{display:block}
  .hf-mrow{display:flex;align-items:baseline;gap:14px;padding:10px 2px;border-bottom:1px solid var(--line);font-size:14.5px}
  .hf-mrow:last-child{border-bottom:0}
  .hf-mrow span{flex:none;width:62px;font-size:11px;font-weight:800;letter-spacing:.06em;color:var(--muted)}
  .hf-mrow b{font-weight:700;min-width:0}
}
.pop.ord-pop .ord-it i{flex:none;width:16px;height:16px;border-radius:0;background:none;display:grid;place-items:center;color:var(--accent-text)}

/* iPad na horizontal (821–1180px): coluna esquerda flexível e direita estreita, anel e água empilhados */
@media (min-width:821px) and (max-width:1180px){
  .home-cols{gap:20px}
  .home-l{flex:1 1 0;max-width:none}
  .home-r{flex:0 0 320px;max-width:320px}
  .home-duo{flex-direction:column}
  .hf-row{grid-template-columns:36px repeat(4,minmax(0,1fr));gap:4px;padding:6px 4px;font-size:12.5px}
}
.home .task .rp-b{display:none}

.hb-t{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.hb-t em{font-style:normal;font-size:12px;font-weight:700;color:var(--muted)}
