:root {
  --bg: #0b0d10;
  --bg2: #12151a;
  --surface: #181c22;
  --surface2: #222730;
  --line: #2b313a;
  --plum-900: #2a0a1c;
  --plum-800: #4a1230;
  --plum-700: #6a1b45;
  --rose: #a8305f;
  --rose-2: #c4467a;
  --rose-soft: #e99bbb;
  --text: #f3eef1;
  --muted: #9b949b;
  --link: #7b86ff;
  --ok: #5fcfa0;
  --danger: #e5546f;
  --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overflow: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -12%, rgba(106, 27, 69, .50), transparent 60%),
    radial-gradient(760px 460px at 100% 105%, rgba(74, 18, 48, .40), transparent 60%);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------- layout ---------- */
.shell { position: relative; display: grid; grid-template-columns: 92px 1fr; height: 100dvh; }
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0;
  border-right: 1px solid var(--line); background: rgba(11, 13, 16, .72); backdrop-filter: blur(10px);
}
.brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.brand-name { font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-top: 6px; color: #f6d3e2; }
.drops { display: flex; flex-wrap: wrap; gap: 5px; }
.drop { width: 32px; height: 32px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); font-size: 17px; filter: grayscale(1) opacity(.35); cursor: pointer; }
.drop.on { filter: none; background: rgba(74, 168, 255, .16); border-color: rgba(74, 168, 255, .5); }
.wsel { background: var(--bg2); color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; font: inherit; font-size: 13px; }
.logo { width: 50px; height: 50px; border-radius: 16px; box-shadow: 0 8px 22px rgba(168, 48, 95, .28); }
.nav-btn {
  width: 70px; padding: 11px 0 9px; border-radius: 18px; border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.on {
  background: linear-gradient(160deg, var(--plum-800), var(--plum-900)); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(196, 70, 122, .38);
}
.nav-btn.on svg { color: var(--rose-soft); }
main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2);
  font-weight: 650; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.98); }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--rose), var(--plum-700)); color: #fff; box-shadow: 0 6px 18px rgba(168, 48, 95, .3); }
.btn.ghost { background: transparent; }
.btn.danger { border: 0; background: var(--danger); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 14px; border-radius: 12px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2);
  display: inline-grid; place-items: center; color: var(--text); flex: none;
}
.icon-btn:hover { filter: brightness(1.2); }
.icon-btn.flat { border-color: transparent; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.flat:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
input, select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose-2); box-shadow: 0 0 0 3px rgba(196, 70, 122, .22); }
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label.f > :is(input, select, textarea) { margin-top: 6px; color: var(--text); font-weight: 400; font-size: 15px; }
input[type="date"], input[type="time"] { min-height: 44px; }

/* ---------- board ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 22px 26px 10px; flex-wrap: wrap; }
.top .ttl { flex: 1; min-width: 180px; }
.top h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.top .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.top .sub::first-letter, .cap::first-letter { text-transform: uppercase; }
.top .sub b { color: var(--rose-soft); font-weight: 650; text-transform: none; }
.board-pick { display: flex; gap: 8px; align-items: center; }
.board-pick select { width: auto; min-width: 150px; min-height: 42px; border-radius: 14px; background-color: var(--surface2); font-weight: 600; }

.cols { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 8px 26px 26px; overflow-x: auto; align-items: flex-start; scroll-snap-type: x proximity; }
.col {
  flex: 0 0 304px; max-height: 100%; display: flex; flex-direction: column; scroll-snap-align: start;
  background: rgba(24, 28, 34, .92); border: 1px solid var(--line); border-radius: 22px; padding: 12px;
}
.col-h { display: flex; align-items: center; gap: 6px; padding: 2px 2px 10px; }
.col-name { background: transparent; border: 0; padding: 6px 8px; font-weight: 750; font-size: 15.5px; border-radius: 10px; min-width: 0; }
.col-name:focus { background: var(--bg2); }
.count { font-size: 12px; font-weight: 700; color: var(--rose-soft); background: rgba(196, 70, 122, .16); padding: 2px 9px; border-radius: 99px; }
.col-h .sp { flex: 1; }
.cards { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px; min-height: 22px; overscroll-behavior: contain; }
.add-card {
  margin-top: 10px; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 0 12px;
  border-radius: 13px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-weight: 600;
}
.add-card:hover { color: var(--text); border-color: var(--rose); }
.add-form { margin-top: 10px; display: grid; gap: 8px; }
.add-form .row { display: flex; gap: 8px; }
.add-col { flex: 0 0 240px; min-height: 52px; border-radius: 20px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-col:hover { color: var(--text); border-color: var(--rose); }

.card {
  position: relative; background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 11px;
  cursor: grab; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: border-color .15s, background .15s;
}
.card:hover { border-color: rgba(196, 70, 122, .55); }
.card .lbl { display: block; width: 34px; height: 6px; border-radius: 99px; margin-bottom: 9px; }
.card-row { display: flex; gap: 10px; align-items: flex-start; }
.card-title { flex: 1; font-weight: 600; word-break: break-word; }
.tick {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 99px; border: 1.8px solid #5b5460; background: transparent;
  display: grid; place-items: center; color: transparent; padding: 0;
}
.tick:hover { border-color: var(--rose-2); }
.card.done .tick { background: var(--rose); border-color: var(--rose); color: #fff; }
.card.done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(155, 148, 155, .6); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-left: 32px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.chip.today { background: rgba(196, 70, 122, .2); color: var(--rose-soft); }
.chip.late { background: rgba(229, 84, 111, .17); color: #ff8fa3; }
.card.placeholder { opacity: .28; }
.card.ghost { position: fixed; z-index: 100; margin: 0; pointer-events: none; transform: rotate(2.5deg); box-shadow: 0 22px 44px rgba(0, 0, 0, .6); border-color: var(--rose-2); cursor: grabbing; }
body.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* ---------- page / cards ---------- */
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 26px 32px; }
.panel { background: rgba(24, 28, 34, .92); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.panel h3 { font-size: 15px; font-weight: 750; margin-bottom: 14px; }
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; flex: 1; }

/* ---------- focus ---------- */
.focus { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.focus-main { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 18px; }
.seg { display: inline-flex; padding: 5px; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; flex-wrap: wrap; justify-content: center; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 650; min-height: 40px; padding: 0 16px; border-radius: 12px; }
.seg button.on { background: linear-gradient(135deg, var(--rose), var(--plum-700)); color: #fff; }
.ring-wrap { position: relative; width: min(78vw, 340px); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--plum-800); stroke-width: 12; opacity: .75; }
.ring .prog { fill: none; stroke: url(#ringGrad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 741.4; transition: stroke-dashoffset .4s linear; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.time { font-size: clamp(54px, 15vw, 76px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ctrls { display: flex; align-items: center; gap: 18px; }
.play { width: 82px; height: 82px; border-radius: 99px; border: 0; color: #fff; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose), var(--plum-700)); box-shadow: 0 10px 28px rgba(168, 48, 95, .42); }
.play:active { transform: scale(.96); }
.ctrls .icon-btn { width: 52px; height: 52px; border-radius: 99px; }
.pick { width: min(100%, 380px); }
.rounds { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.dot { width: 11px; height: 11px; border-radius: 99px; background: var(--plum-800); }
.dot.on { background: var(--rose-2); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 11px; color: var(--muted); }
.bar i { display: block; width: 100%; min-height: 4px; border-radius: 8px; background: linear-gradient(180deg, var(--rose-2), var(--plum-700)); }
.bar.zero i { background: var(--plum-800); }

/* ---------- agenda ---------- */
.agenda { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-h h2 { flex: 1; font-size: 19px; font-weight: 800; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.day { min-height: 70px; border-radius: 14px; background: var(--bg2); border: 1.5px solid transparent; padding: 8px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.day:hover { border-color: var(--plum-700); }
.day.out { visibility: hidden; }
.day.today { border-color: var(--rose); }
.day.sel { background: var(--plum-800); }
.day .n { font-weight: 700; font-size: 14px; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--rose-2); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 8px; width: 100%; text-align: left; }
.item:hover { border-color: var(--rose); }
.item .bar-l { width: 5px; align-self: stretch; border-radius: 99px; background: var(--rose-2); flex: none; }
.item .t { font-weight: 650; }
.item .s { font-size: 13px; color: var(--muted); }
.item.static { cursor: default; }
.item.static:hover { border-color: var(--line); }
.empty { color: var(--muted); font-size: 14px; padding: 6px 2px 2px; }

/* ---------- reminders / settings ---------- */
.narrow { max-width: 820px; margin: 0 auto; }
.rem { display: grid; grid-template-columns: auto 120px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(24, 28, 34, .92); border: 1px solid var(--line); margin-bottom: 12px; }
.rem.off { opacity: .55; }
.rem .days { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.dchip { width: 40px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-weight: 700; font-size: 13px; }
.dchip.on { background: var(--plum-800); border-color: var(--rose); color: #fff; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); position: relative; cursor: pointer; flex: none; padding: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 99px; background: #cfc8cd; transition: transform .2s, background .2s; }
.switch:checked { background: var(--rose); border-color: var(--rose); }
.switch:checked::after { transform: translateX(20px); background: #fff; }
.switch:focus { box-shadow: 0 0 0 3px rgba(196, 70, 122, .22); }
.set-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .lbl2 { flex: 1; }
.set-row .lbl2 b { display: block; font-weight: 650; }
.set-row .lbl2 span { color: var(--muted); font-size: 13px; }
.set-row input[type="number"] { width: 90px; text-align: center; }
.stack { display: grid; gap: 18px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 26px 0; padding: 12px 14px; border-radius: 16px; background: rgba(196, 70, 122, .14); border: 1px solid rgba(196, 70, 122, .35); }
.banner span { flex: 1; min-width: 200px; }

/* ---------- modal / toast / mini ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 16px; background: rgba(5, 6, 8, .68); backdrop-filter: blur(5px); }
.modal.on { display: grid; }
.sheet { width: min(540px, 100%); max-height: 94dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 22px; display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.sheet.small { width: min(400px, 100%); }
.sheet-h { display: flex; align-items: center; justify-content: space-between; }
.sheet-h h2, .sheet > h2 { font-size: 20px; font-weight: 800; }
.sheet-f { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.sheet-f .sp { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lbls { display: flex; gap: 10px; flex-wrap: wrap; }
.lbls button { width: 38px; height: 38px; border-radius: 99px; border: 3px solid transparent; padding: 0; }
.lbls button.on { border-color: #fff; }
.lbls button.none { background: var(--bg2); border: 1.5px dashed var(--muted); color: var(--muted); }
.lbls button.none.on { border: 3px solid #fff; }
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 16px; background: var(--plum-800); border: 1px solid var(--rose); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); animation: pop .25s ease; }
.toast b { display: block; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.mini { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid var(--rose); border-radius: 99px; background: linear-gradient(135deg, var(--plum-800), var(--plum-900)); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .focus, .agenda { grid-template-columns: 1fr; }
  .col { flex-basis: 276px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .brand { display: none; }
  .nav-btn { width: auto; flex: 1; max-width: 90px; padding: 8px 0 6px; }
  .top { padding: 16px 16px 8px; }
  .cols { padding: 6px 16px 20px; }
  .col { flex-basis: 84vw; }
  .page { padding: 18px 16px 28px; }
  .banner { margin: 12px 16px 0; }
  .mini { bottom: 84px; right: 14px; }
  .rem { grid-template-columns: auto 1fr auto; }
  .rem .days { grid-column: 1 / -1; }
  .rem .time-in { grid-column: 2; }
  .rem .txt { grid-column: 1 / -1; order: 5; }
  .rem .days { order: 6; }
  .day { min-height: 54px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- hoje / checklist ---------- */
.today { max-width: 1100px; margin: 0 auto; }
.greet { margin-bottom: 18px; }
.greet h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 8px; }
.trow.late { border-color: rgba(229, 84, 111, .45); }
.trow .tick { margin-top: 0; }
.t-main { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 4px 0; }
.t-main .t { font-weight: 650; word-break: break-word; }
.t-main .s { font-size: 13px; color: var(--muted); }
.quick { display: flex; gap: 10px; margin-top: 12px; }
.pbar { height: 7px; border-radius: 99px; background: var(--plum-800); overflow: hidden; margin-bottom: 8px; }
.pbar.big { height: 12px; margin-bottom: 0; }
.pbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rose), var(--rose-2)); transition: width .3s; }
.ck { display: grid; gap: 4px; }
.ck-i { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 2px; }
.ck-i span { flex: 1; word-break: break-word; }
.ck-i.on span { color: var(--muted); text-decoration: line-through; }
.ck-i.on .tick { background: var(--rose); border-color: var(--rose); color: #fff; }
.ck-add { display: flex; gap: 8px; margin-top: 8px; }

.howto { display: grid; gap: 8px; margin-top: 14px; }
.howto div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.howto b { font-size: 14px; }
.howto span { font-size: 13px; color: var(--muted, #9aa0a8); }
