/* =========================================================
   Organizador — branco e verde, com neon onde importa
   ========================================================= */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f4f9f5;
  --panel: #ffffff;
  --panel-2: #f0f7f2;
  --panel-3: #e2efe6;
  --ink: #06140c;
  --ink-2: #2a3f33;
  --ink-3: #566a5e;
  --line: rgba(6, 40, 22, .09);
  --line-2: rgba(6, 40, 22, .19);
  --accent: #058a4c;
  --accent-hover: #04723e;
  --accent-soft: #dcf6e7;
  --on-accent: #ffffff;
  --neon: #2bff88;
  --neon-2: #00f0c0;
  --glow: rgba(43, 255, 136, .45);
  --now: #00b862;
  --danger: #d92d20;
  --danger-soft: #fde8e6;
  --s-todo: #8a9a90; --s-doing: #00c46a; --s-waiting: #e8a020; --s-done: #4f6b5b;
  --screen: radial-gradient(120% 140% at 0% 0%, #114a2f 0%, #08301d 38%, #03140b 100%);
  --shadow: 0 1px 2px rgba(6, 40, 22, .05), 0 10px 30px -14px rgba(6, 40, 22, .22);
  --shadow-lg: 0 2px 6px rgba(6, 40, 22, .08), 0 34px 80px -24px rgba(6, 40, 22, .45);
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-xl: 30px; --r-lg: 22px; --r-md: 15px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --px: 60px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030a06; --panel: #08130d; --panel-2: #0c1b13; --panel-3: #12261b;
  --ink: #e6f7ec; --ink-2: #b3cbbc; --ink-3: #84a091;
  --line: rgba(180, 255, 210, .08); --line-2: rgba(180, 255, 210, .17);
  --accent: #2bff88; --accent-hover: #74ffb2; --accent-soft: #0d2e1d; --on-accent: #022012;
  --now: #2bff88; --danger: #ff8b80; --danger-soft: #3a1714;
  --s-todo: #84a091; --s-doing: #2bff88; --s-waiting: #ffc247; --s-done: #5f7d6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 30px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 34px 80px -24px rgba(0, 0, 0, .9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #030a06; --panel: #08130d; --panel-2: #0c1b13; --panel-3: #12261b;
    --ink: #e6f7ec; --ink-2: #b3cbbc; --ink-3: #84a091;
    --line: rgba(180, 255, 210, .08); --line-2: rgba(180, 255, 210, .17);
    --accent: #2bff88; --accent-hover: #74ffb2; --accent-soft: #0d2e1d; --on-accent: #022012;
    --now: #2bff88; --danger: #ff8b80; --danger-soft: #3a1714;
    --s-todo: #84a091; --s-doing: #2bff88; --s-waiting: #ffc247; --s-done: #5f7d6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 34px 80px -24px rgba(0, 0, 0, .9);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--sans); font-feature-settings: "cv11", "ss01"; letter-spacing: -.006em;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.is-dragging, body.is-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-3)); flex: none; display: inline-block; }
[hidden] { display: none !important; }
.linkish { background: none; border: 0; padding: 0; color: var(--neon); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.logo { width: 34px; height: 34px; display: block; }
.logo rect { fill: #0b3a24; }
.logo circle { fill: none; stroke: var(--neon); stroke-width: 3.2; filter: drop-shadow(0 0 4px var(--glow)); }
.logo path { fill: none; stroke: #eafff2; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Abertura ---------- */
.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #030a06; transition: opacity .5s var(--ease), visibility .5s; }
.splash .logo { width: 76px; height: 76px; animation: breathe 1.6s var(--ease) infinite; }
.splash .logo circle { stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw 1s var(--ease) forwards; }
.splash.done { opacity: 0; visibility: hidden; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- Entrada (login / criar conta) ---------- */
.auth {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain;
  display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: #030a06; color: #e9fff1; color-scheme: dark;
}
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .5; will-change: transform; }
.auth-bg i:nth-child(1) { background: radial-gradient(circle, #1bdd73, transparent 62%); left: -18vmax; top: -22vmax; animation: float1 22s ease-in-out infinite alternate; }
.auth-bg i:nth-child(2) { background: radial-gradient(circle, #00c9a7, transparent 62%); right: -24vmax; bottom: -26vmax; animation: float2 26s ease-in-out infinite alternate; }
.auth-bg i:nth-child(3) { background: radial-gradient(circle, #a6ff4d, transparent 64%); left: 30%; top: 40%; width: 34vmax; height: 34vmax; opacity: .22; animation: float3 30s ease-in-out infinite alternate; }
.auth-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(43, 255, 136, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(43, 255, 136, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
@keyframes float1 { to { transform: translate(14vmax, 10vmax) scale(1.1); } }
@keyframes float2 { to { transform: translate(-12vmax, -8vmax) scale(.92); } }
@keyframes float3 { to { transform: translate(-16vmax, -12vmax) scale(1.2); } }
.auth-card {
  position: relative; width: min(420px, 100%); padding: 32px clamp(22px, 5vw, 36px) 26px; border-radius: 30px;
  background: rgba(6, 26, 16, .62); border: 1px solid rgba(43, 255, 136, .18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 40px 120px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(43, 255, 136, .35);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  display: grid; gap: 14px; animation: rise .7s var(--ease) both;
}
.auth-card.leaving { animation: leave .26s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
.auth-brand { display: flex; align-items: center; gap: 12px; font: 600 19px/1 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.auth-brand .logo { width: 40px; height: 40px; }
.auth h1 { font: 600 clamp(28px, 6vw, 34px)/1.1 var(--display); letter-spacing: -.035em; }
.auth-sub { color: rgba(222, 255, 236, .7); text-wrap: pretty; }
.auth-note { background: rgba(255, 194, 71, .12); border: 1px solid rgba(255, 194, 71, .3); color: #ffe2a3; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
#auth-form { display: grid; gap: 14px; margin-top: 4px; }
.auth .field > label { color: rgba(222, 255, 236, .82); }
.auth .field input {
  width: 100%; min-height: 50px; padding: 10px 16px; border-radius: 14px; font-size: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #f2fff7;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.auth .field input::placeholder { color: rgba(222, 255, 236, .4); }
.auth .field input:hover { border-color: rgba(255, 255, 255, .28); }
.auth .field input:focus-visible { outline: none; border-color: var(--neon); background: rgba(43, 255, 136, .06); box-shadow: 0 0 0 4px rgba(43, 255, 136, .18), 0 0 28px -6px var(--glow); }
.auth .err { color: #ff9d94; }
.auth .hint-s { color: rgba(222, 255, 236, .6); margin-top: -8px; }
.auth-foot { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12.5px; color: rgba(222, 255, 236, .55); margin-top: 4px; text-align: center; }
.auth-foot .ic { width: 15px; height: 15px; color: var(--neon); }

/* ---------- Estrutura ---------- */
.app {
  display: grid; min-height: 100dvh;
  grid-template-columns: 92px minmax(0, 1fr) 316px;
  grid-template-rows: auto 1fr;
  grid-template-areas: "nav top rail" "nav view rail";
}
.nav { grid-area: nav; }
.top { grid-area: top; }
.rail { grid-area: rail; }
#view { grid-area: view; min-width: 0; outline: none; }

.nav {
  position: sticky; top: 0; height: 100dvh; padding: 18px 10px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 50%, var(--bg));
}
.brand { display: grid; place-items: center; padding: 4px 0 16px; border-radius: 14px; }
.brand .logo { transition: transform .4s var(--spring); }
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.nav-link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 62px; padding: 8px 4px;
  border-radius: var(--r-md); color: var(--ink-3); text-decoration: none; font-size: 12px; font-weight: 600;
  transition: background-color .2s, color .2s;
}
.nav-link .ic { width: 22px; height: 22px; transition: transform .3s var(--spring); }
.nav-link:hover { background: var(--panel-3); color: var(--ink); }
.nav-link:hover .ic { transform: translateY(-2px); }
.nav-link[aria-current="page"] { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); }
.nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--neon); box-shadow: 0 0 12px var(--glow);
}

.top { padding: 18px clamp(16px, 2.6vw, 36px) 0; min-width: 0; }
.top-row { display: flex; gap: 10px; align-items: center; }
#quick { flex: 1; display: flex; gap: 8px; min-width: 0; }
.qbox { position: relative; flex: 1; min-width: 0; }
.qbox input {
  width: 100%; height: 54px; padding: 0 58px 0 22px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); box-shadow: var(--shadow); font-size: 16px;
  transition: border-color .2s, box-shadow .25s;
}
.qbox input::placeholder { color: var(--ink-3); }
.qbox input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43, 255, 136, .22), 0 0 34px -10px var(--glow); }
.mic {
  position: absolute; right: 7px; top: 7px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--panel-2); color: var(--ink-2); display: grid; place-items: center;
  transition: background-color .2s, color .2s, transform .3s var(--spring);
}
.mic:hover { background: var(--accent-soft); color: var(--accent); transform: scale(1.06); }
.mic.rec { background: var(--neon); color: #022012; animation: rec 1.4s ease-out infinite; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(43, 255, 136, .6), 0 0 18px var(--glow); } 100% { box-shadow: 0 0 0 16px rgba(43, 255, 136, 0), 0 0 18px var(--glow); } }
.send { height: 54px; border-radius: 999px; padding: 0 22px; }
#newBtn { height: 54px; border-radius: 999px; padding: 0 20px; }
.top-sub { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 7px 20px 0; min-height: 30px; }
.qpreview { font-size: 13.5px; color: var(--ink-3); min-width: 0; }
.qpreview b { color: var(--accent); font-weight: 650; }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; flex: none; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-doing); box-shadow: 0 0 8px var(--glow); }
.sync[data-state="saving"] i { background: var(--s-waiting); box-shadow: none; animation: blink 1s ease-in-out infinite; }
.sync[data-state="offline"] i { background: var(--ink-3); box-shadow: none; }
.sync[data-state="error"] i, .sync[data-state="auth"] i { background: var(--danger); box-shadow: none; }
.sync[data-state="offline"], .sync[data-state="error"], .sync[data-state="auth"] { color: var(--ink-2); }

/* ---------- Botões e campos ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, box-shadow .25s, transform .2s var(--spring), color .2s;
}
.btn:hover { background: var(--panel-3); border-color: var(--ink-3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: var(--accent-hover); box-shadow: 0 0 0 4px rgba(43, 255, 136, .18), 0 10px 26px -10px var(--glow); }
.btn.neon { background: var(--neon); color: #022012; border-color: transparent; box-shadow: 0 0 24px -6px var(--glow); }
.btn.neon:hover { background: #6dffae; box-shadow: 0 0 0 4px rgba(43, 255, 136, .22), 0 0 36px -4px var(--glow); }
.btn.glass { background: rgba(255, 255, 255, .08); color: #f2fff7; border-color: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .34); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.danger-solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-3); }
.btn.icon { width: 40px; padding: 0; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.icon.sm { width: 34px; padding: 0; }
.btn.wide { width: 100%; min-height: 52px; font-size: 15.5px; border-radius: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; }
.field > label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 84px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43, 255, 136, .2); }
select { background-color: var(--panel); color: var(--ink); }
.filter { width: auto; min-width: 190px; }
.err { font-size: 13px; color: var(--danger); font-weight: 600; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.hint-s { font-size: 13px; color: var(--ink-3); margin-top: -6px; text-wrap: pretty; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-in { font: 600 22px/1 var(--display) !important; letter-spacing: .3em; text-align: center; }

/* ---------- Páginas ---------- */
.page { padding: 8px clamp(16px, 2.6vw, 36px) 56px; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0 8px; }
.eyebrow { font-size: 14px; font-weight: 550; color: var(--ink-3); margin-bottom: 2px; }
h1 { font: 600 clamp(28px, 3.6vw, 42px)/1.06 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.head-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-ctl { display: flex; gap: 6px; align-items: center; }
.switch { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--panel-3); gap: 2px; }
.switch a { display: grid; place-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; transition: background-color .2s, color .2s, box-shadow .2s; }
.switch a:hover { color: var(--ink); }
.switch a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.summary { color: var(--ink-2); margin: 4px 0 18px; text-wrap: pretty; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.panel h2 { font: 600 16px/1.3 var(--display); letter-spacing: -.02em; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel h2.late { color: var(--danger); }
.count { font: 600 12.5px/1.6 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-3); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; }
.empty { padding: 26px 8px; text-align: center; color: var(--ink-3); display: grid; gap: 12px; justify-items: center; text-wrap: balance; }
.empty-s { color: var(--ink-3); font-size: 14px; padding: 6px 2px 10px; text-wrap: pretty; }

/* Entrada da tela: uma cascata curta, só ao trocar de tela */
[data-enter] .page > * { animation: rise .55s var(--ease) both; }
[data-enter] .page > *:nth-child(2) { animation-delay: .05s; }
[data-enter] .page > *:nth-child(3) { animation-delay: .1s; }
[data-enter] .page > *:nth-child(4) { animation-delay: .15s; }
[data-enter] .page > *:nth-child(5) { animation-delay: .2s; }
[data-enter] .page > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Tela Agora ---------- */
.agora { display: grid; gap: 16px; align-content: start; }
.agora-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.agora-tools { display: flex; align-items: center; gap: 14px; }
.clock { font: 300 clamp(36px, 4.2vw, 56px)/1 var(--display); letter-spacing: -.04em; color: var(--ink-2); }
.clock .colon { animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.agora-allday { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.agora-allday > span { font-size: 13px; font-weight: 650; color: var(--ink-3); margin-right: 2px; }

.now {
  position: relative; overflow: hidden; isolation: isolate; container-type: inline-size;
  border-radius: var(--r-xl); background: var(--screen); color: #f2fff7;
  border: 1px solid rgba(43, 255, 136, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -40px rgba(3, 40, 20, .75), 0 0 0 1px rgba(3, 20, 11, .2);
  min-height: min(44dvh, 460px); display: flex;
}
.now::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(220, 255, 235, .1) 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: linear-gradient(115deg, transparent 20%, #000 75%); -webkit-mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
}
.now-fill {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: linear-gradient(90deg, rgba(43, 255, 136, .04), rgba(43, 255, 136, .2));
  border-right: 2px solid var(--neon); box-shadow: 14px 0 40px -10px var(--neon);
  transform: translateX(calc((var(--p, 0) - 1) * 100cqw));
  transition: transform 1s linear;
}
.sheen { position: absolute; top: 0; bottom: 0; width: 22%; left: 0; background: linear-gradient(90deg, transparent, rgba(180, 255, 210, .16), transparent); animation: sheen 3.8s var(--ease) infinite; }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(560%); } }
.now-body { padding: clamp(22px, min(4vw, 5dvh), 56px); display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; width: 100%; }
.now-label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; color: rgba(222, 255, 236, .85); }
.now-label .kind { font-weight: 550; color: rgba(222, 255, 236, .7); border: 1px solid rgba(222, 255, 236, .22); border-radius: 999px; padding: 1px 10px; font-size: 13px; }
.live { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--neon); animation: ping 2s var(--ease) infinite; }
.live.calm { background: rgba(222, 255, 236, .5); box-shadow: none; }
.live.calm::after { display: none; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }
.now-title { font: 600 clamp(2rem, min(5vw, 7dvh), 4.3rem)/1.02 var(--display); letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; margin-top: 6px; color: #fff; }
.now-until { display: flex; align-items: baseline; gap: .12em; font: 300 clamp(3.4rem, min(10.5vw, 15dvh), 9.4rem)/.92 var(--display); letter-spacing: -.055em; margin-top: 8px; }
.now-until span { font: 500 .24em/1 var(--sans); letter-spacing: -.01em; color: rgba(222, 255, 236, .6); margin-right: .25em; }
.now-until b { font-weight: 300; color: #fff; text-shadow: 0 0 34px rgba(43, 255, 136, .45), 0 0 2px rgba(43, 255, 136, .4); }
.now-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: clamp(15px, 1.6vw, 19px); color: rgba(222, 255, 236, .75); margin-top: 10px; }
.now-left strong { font-weight: 700; color: var(--neon); font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(43, 255, 136, .45); }
.now-left .loc { display: inline-flex; align-items: center; gap: 6px; }
.now-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.now-also { margin-top: 12px; font-size: 14px; color: rgba(222, 255, 236, .75); }
.now.free { background: radial-gradient(120% 140% at 100% 0%, #0d3523 0%, #062014 45%, #030f08 100%); }
.now.free .now-title { color: rgba(242, 255, 247, .95); }
[data-enter] .now-body > * { animation: rise .6s var(--ease) both; }
[data-enter] .now-body > :nth-child(2) { animation-delay: .08s; }
[data-enter] .now-body > :nth-child(3) { animation-delay: .16s; }
[data-enter] .now-body > :nth-child(n+4) { animation-delay: .24s; }

.next { display: grid; gap: 6px; }
.next h3 { font: 600 15px/1.3 var(--display); padding: 0 4px; }
.next-row {
  position: relative; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); width: 100%; text-align: left; padding: 16px 22px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .3s var(--spring), box-shadow .3s;
}
.next-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.next-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.next-time { display: grid; font: 400 clamp(26px, 3.2vw, 40px)/1 var(--display); letter-spacing: -.04em; min-width: 3.1ch; }
.next-time small { font: 650 12.5px/1 var(--sans); letter-spacing: 0; color: var(--accent); margin-bottom: 4px; }
.next-info { display: grid; gap: 2px; min-width: 0; }
.next-title { font: 600 clamp(18px, 2vw, 24px)/1.25 var(--display); letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-sub { display: flex; gap: 14px; color: var(--ink-3); font-size: 14px; }
.next-sub span { color: var(--accent); font-weight: 650; }
.next.none p { padding: 14px 22px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink-3); }

.lower { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 6px; }
.lower h3 { font: 600 15px/1.3 var(--display); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 0 4px; }
.lower section { min-width: 0; }

/* ---------- Agenda de hoje ---------- */
.rail {
  position: sticky; top: 0; align-self: start; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 18px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px;
  background: color-mix(in srgb, var(--panel) 60%, var(--bg));
}
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rail-head h2 { font: 600 21px/1 var(--display); letter-spacing: -.035em; }
.rail-head p { font-size: 13.5px; color: var(--ink-3); font-weight: 550; }
.rail-all { display: flex; flex-wrap: wrap; gap: 6px; }
.rail-list { display: grid; gap: 4px; }
.rl {
  position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; text-align: left;
  padding: 10px 12px 10px 10px; border: 0; border-radius: 15px; background: transparent; overflow: hidden;
  transition: background-color .2s, transform .25s var(--spring);
}
.rl::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c); }
.rl:hover { background: var(--panel-3); }
.rl-t { padding-left: 6px; font: 500 14.5px/1.35 var(--display); color: var(--ink-2); }
.rl-b { display: grid; gap: 1px; min-width: 0; }
.rl-n { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rl-s { font-size: 12.5px; color: var(--ink-3); }
.rl.past, .rl.done { opacity: .5; }
.rl.done .rl-n { text-decoration: line-through; }
.rl.is-now { background: var(--screen); color: #f2fff7; box-shadow: 0 14px 30px -16px rgba(3, 40, 20, .8), 0 0 0 1px rgba(43, 255, 136, .25); }
.rl.is-now::before { background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.rl.is-now .rl-t { color: var(--neon); }
.rl.is-now .rl-s { color: rgba(222, 255, 236, .7); }
.rl.next .rl-t { color: var(--accent); }
.rl-p { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--neon); box-shadow: 0 0 10px var(--neon); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 1s linear; }
.rail-empty { color: var(--ink-3); font-size: 14px; padding: 4px 2px; }
.rail-add { align-self: flex-start; margin-top: auto; }

/* ---------- Dia ---------- */
.grid-day { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.allday { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 13px 0 11px; border-radius: 999px; border: 0;
  background: color-mix(in srgb, var(--c) 14%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 38%, transparent);
  font-weight: 550; font-size: 13.5px; max-width: 100%; transition: background-color .2s;
}
.pill:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); }
.pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tl { position: relative; max-height: 72dvh; overflow: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px; }
.tl-grid { position: relative; }
.tl-slot { position: absolute; left: 0; right: 0; height: var(--px); border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; padding: 0; color: var(--ink-3); cursor: cell; transition: background-color .2s; }
.tl-slot:hover { background: color-mix(in srgb, var(--neon) 7%, transparent); }
.tl-h { position: absolute; top: -9px; left: 0; width: 46px; font: 500 12px/1.4 var(--display); background: var(--panel); padding-right: 6px; }
.tl-slot:first-child .tl-h { top: 2px; }
.tl-ev { position: absolute; top: 0; bottom: 0; left: 54px; right: 2px; pointer-events: none; }
.ev {
  position: absolute; pointer-events: auto; overflow: hidden; text-align: left; border: 0; border-radius: 12px; padding: 6px 10px;
  background: color-mix(in srgb, var(--c) 14%, var(--panel));
  box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent);
  display: flex; flex-direction: column; gap: 1px; line-height: 1.25; transition: background-color .2s, transform .25s var(--spring);
}
.ev:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); transform: translateX(2px); }
.ev.is-task { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, var(--panel)) 0 8px, color-mix(in srgb, var(--c) 17%, var(--panel)) 8px 16px); }
.ev.done b { text-decoration: line-through; color: var(--ink-3); }
.ev b { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-now { position: absolute; left: 46px; right: 0; height: 0; border-top: 2px solid var(--now); pointer-events: none; z-index: 2; box-shadow: 0 0 10px var(--glow); }
.tl-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); box-shadow: 0 0 10px var(--neon); }

/* ---------- Tarefas ---------- */
.task { display: flex; align-items: stretch; gap: 2px; border-radius: 13px; transition: background-color .2s; }
.task:hover { background: var(--panel-2); }
.chk { position: relative; display: grid; place-items: center; width: 42px; flex: none; cursor: pointer; }
.chk input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chk .box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center; transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--spring); }
.chk:hover .box { border-color: var(--accent); transform: scale(1.08); }
.chk .box svg { width: 12px; height: 12px; stroke: var(--on-accent); stroke-width: 3.5; fill: none; opacity: 0; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; }
.chk input:checked + .box { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px -2px var(--glow); }
.chk input:checked + .box svg { opacity: 1; }
.chk input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.box.pop { animation: pop .5s var(--spring); }
.box.pop svg { animation: drawcheck .4s var(--ease) both; }
@keyframes pop { 0% { transform: scale(.6); box-shadow: 0 0 0 0 var(--glow); } 60% { transform: scale(1.18); box-shadow: 0 0 0 10px rgba(43, 255, 136, 0); } 100% { transform: scale(1); } }
@keyframes drawcheck { from { stroke-dashoffset: 24; } }
.task-body { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 9px 8px 9px 0; display: grid; gap: 2px; }
.task-body .t { font-weight: 550; overflow-wrap: anywhere; }
.task.done .t { text-decoration: line-through; color: var(--ink-3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--ink-3); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .late { color: var(--danger); font-weight: 650; }
.meta .hi { color: var(--accent); font-weight: 650; }
.meta .ic { width: 13px; height: 13px; }
.meta .st { border-radius: 999px; padding: 0 8px; font-weight: 650; }
.meta .st.doing { background: color-mix(in srgb, var(--s-doing) 16%, transparent); color: var(--accent); }
.meta .st.waiting { background: color-mix(in srgb, var(--s-waiting) 18%, transparent); color: color-mix(in srgb, var(--s-waiting) 70%, var(--ink)); }
.task.compact .task-body { padding: 4px 4px 4px 0; }
.task.compact .chk { width: 30px; }
.task.compact .chk .box { width: 17px; height: 17px; }
.task.compact .t { font-size: 13px; }

.up-day { margin-top: 10px; }
.up-day h3 { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 2px; }
.up-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 8px; border: 0; background: none; border-radius: 10px; text-align: left; transition: background-color .2s; }
.up-row:hover { background: var(--panel-2); }
.up-row .tm { width: 44px; flex: none; font: 500 12.5px/1 var(--display); color: var(--ink-3); }
.up-row .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Kanban ---------- */
.kanban { max-width: none; }
.board {
  display: grid; grid-template-columns: repeat(4, minmax(208px, 1fr)); gap: 14px; margin-top: 18px;
  overflow-x: auto; padding-bottom: 14px; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
}
.col {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px;
  min-height: 340px; scroll-snap-align: start; transition: background-color .2s, box-shadow .25s;
}
.col.over { background: color-mix(in srgb, var(--neon) 10%, var(--panel-2)); box-shadow: inset 0 0 0 2px var(--neon), 0 0 30px -10px var(--glow); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 0 4px; }
.col-head h2 { font: 600 15px/1.3 var(--display); letter-spacing: -.02em; flex: 1; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.s-todo { background: var(--s-todo); }
.s-doing { background: var(--s-doing); box-shadow: 0 0 10px var(--glow); animation: glowpulse 2.4s ease-in-out infinite; }
.s-waiting { background: var(--s-waiting); } .s-done { background: var(--s-done); }
@keyframes glowpulse { 50% { box-shadow: 0 0 2px var(--glow); } }
.col-list { display: grid; gap: 8px; align-content: start; }
.col-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 18px 8px; border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.kcard {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 11px 11px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; cursor: grab; box-shadow: var(--shadow); touch-action: manipulation; overflow: hidden;
  transition: transform .25s var(--spring), box-shadow .25s;
}
.kcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kcard.done .kc-t { text-decoration: line-through; color: var(--ink-3); }
.kcard.dragging { opacity: .3; transform: scale(.97); }
.kghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: var(--shadow-lg), 0 0 0 2px var(--neon), 0 0 40px -8px var(--glow); cursor: grabbing; transition: none; }
.kc-main { display: grid; gap: 6px; text-align: left; background: none; border: 0; padding: 0; min-width: 0; }
.kc-t { font-weight: 600; overflow-wrap: anywhere; }
.mv-wrap { display: block; }
.mv { width: auto; max-width: 100%; min-height: 30px; padding: 2px 26px 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background-color: var(--panel-2); color: var(--ink-2); }

/* Respostas a ações: item que acabou de chegar ou mudar */
.landed { animation: landed .7s var(--spring); }
@keyframes landed {
  0% { transform: scale(.94); box-shadow: 0 0 0 0 var(--glow); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(43, 255, 136, .25), 0 0 30px var(--glow); }
  100% { transform: scale(1); }
}
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- Semana ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.daycol { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 280px; min-width: 0; }
.daycol.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px -14px var(--glow), var(--shadow); }
.daycol > header { display: flex; align-items: baseline; gap: 8px; }
.daycol .dn { font: 500 28px/1 var(--display); letter-spacing: -.04em; }
.daycol .dw { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.daycol.today .dw { color: var(--accent); }
.daycol .head-btn { border: 0; background: none; padding: 4px 2px; display: flex; align-items: baseline; gap: 8px; border-radius: 8px; text-align: left; }
.daycol .head-btn:hover .dn { color: var(--accent); }
.ev-row { display: grid; gap: 1px; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, var(--panel)); box-shadow: inset 3px 0 0 var(--c); transition: background-color .2s; }
.ev-row:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); }
.ev-row .tm { font-size: 11.5px; color: var(--ink-2); }
.ev-row .tt { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.daycol ul { display: grid; gap: 5px; }
.daycol .add { margin-top: auto; min-height: 34px; border: 1px dashed var(--line-2); background: none; border-radius: 10px; color: var(--ink-3); font-size: 13px; transition: background-color .2s, color .2s, border-color .2s; }
.daycol .add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.daycol .none { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Mês ---------- */
.month { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head div { padding: 11px 10px; font-size: 13px; font-weight: 650; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; transition: background-color .2s; }
.cell:nth-child(7n) { border-right: 0; }
.cell:hover { background: color-mix(in srgb, var(--neon) 6%, var(--panel)); }
.cell.out { background: var(--panel-2); }
.cell.out .cn { color: var(--ink-3); }
.cell .cn { align-self: flex-start; min-width: 28px; height: 28px; padding: 0 7px; border: 0; border-radius: 14px; background: none; font: 500 14px/1 var(--display); }
.cell.today .cn { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px -2px var(--glow); }
.chip { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 22px; padding: 1px 7px; border: 0; border-radius: 7px; text-align: left; font-size: 12px; background: color-mix(in srgb, var(--c) 15%, var(--panel)); }
.chip:hover { background: color-mix(in srgb, var(--c) 28%, var(--panel)); }
.chip .ct { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; }
.more { font-size: 11.5px; color: var(--ink-3); padding-left: 6px; }
.tcount { font-size: 11.5px; color: var(--ink-2); padding-left: 6px; display: flex; align-items: center; gap: 4px; }
.tcount .ic { width: 12px; height: 12px; }
.cell .evs { display: grid; gap: 3px; width: 100%; }

/* ---------- Tarefas (página) e Ajustes ---------- */
.sections { display: grid; gap: 18px; max-width: 780px; margin-top: 14px; }
details.panel > summary { cursor: pointer; font: 600 16px/1.3 var(--display); min-height: 28px; display: flex; align-items: center; }
.settings { display: grid; gap: 18px; max-width: 780px; }
.settings .panel { display: grid; gap: 14px; }
.settings .panel h2 { margin-bottom: 0; }
.settings p.hint, .hint { font-size: 14px; color: var(--ink-3); text-wrap: pretty; }
.cat-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; }
.cat-row input[type="color"] { width: 44px; height: 44px; padding: 3px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
kbd { font: 600 12px var(--sans); padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; font-size: 14px; }

/* Conta e segurança */
.acct { position: relative; overflow: hidden; }
.acct::after { content: ""; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 255, 136, .18), transparent 65%); pointer-events: none; }
#acct { display: grid; gap: 14px; }
.acct-head { display: flex; align-items: center; gap: 14px; }
.acct-head > div { flex: 1; min-width: 0; display: grid; }
.acct-head b { overflow-wrap: anywhere; }
.acct-head small { color: var(--ink-3); font-size: 13px; }
.avatar { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; font: 600 20px/1 var(--display); color: #022012; background: linear-gradient(135deg, var(--neon), var(--neon-2)); box-shadow: 0 0 22px -6px var(--glow); }
.sec-grid { display: grid; gap: 8px; }
.sec-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.sec-item > .ic { width: 22px; height: 22px; color: var(--ink-3); }
.sec-item.on > .ic { color: var(--accent); filter: drop-shadow(0 0 6px var(--glow)); }
.sec-item div { display: grid; gap: 1px; min-width: 0; }
.sec-item small { color: var(--ink-3); font-size: 13px; text-wrap: pretty; }
.sub { font: 600 14.5px/1.3 var(--display); display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.devs, .logins { display: grid; gap: 4px; }
.dev { display: flex; gap: 12px; align-items: center; padding: 8px 4px; }
.dev > .ic { width: 20px; height: 20px; color: var(--ink-3); }
.dev.me > .ic { color: var(--accent); }
.dev-b { display: grid; min-width: 0; }
.dev-b small, .lg small { display: block; color: var(--ink-3); font-size: 12.5px; }
.tag { justify-self: start; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0 8px; margin: 2px 0; }
.lg { display: flex; gap: 12px; align-items: flex-start; padding: 6px 4px; font-size: 14px; }
.lg > i { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--s-doing); }
.lg.bad > i { background: var(--danger); }
.lg.bad b { color: var(--danger); }
.steps { display: grid; gap: 6px; padding-left: 20px; list-style: decimal; color: var(--ink-2); font-size: 14px; }
.qr { display: grid; place-items: center; padding: 14px; border-radius: 20px; background: #fff; width: min(240px, 100%); margin: 4px auto; box-shadow: 0 0 0 1px var(--line), 0 0 40px -16px var(--glow); }
.qr svg { width: 100%; height: auto; display: block; }
.secret { font: 600 17px/1.4 var(--display); letter-spacing: .08em; text-align: center; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--line-2); user-select: all; overflow-wrap: anywhere; }
.hist { display: grid; gap: 4px; }
.hist li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.hist li span { display: grid; }
.hist small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- Diálogo ---------- */
dialog {
  border: 0; padding: 0; border-radius: 28px; width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overscroll-behavior: contain; overflow: hidden;
}
dialog[open] { display: flex; flex-direction: column; animation: dlgin .32s var(--spring); }
dialog::backdrop { background: rgba(2, 16, 9, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s var(--ease); }
@keyframes dlgin { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
#form, #pform { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px 22px 10px; }
.dlg-head h2 { font: 600 23px/1.2 var(--display); letter-spacing: -.035em; }
.dlg-body { padding: 4px 22px 14px; display: grid; gap: 14px; overflow-y: auto; overscroll-behavior: contain; }
.dlg-foot { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel); }
.dlg-foot .spacer { flex: 1; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--panel-3); gap: 4px; }
.seg label { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 120; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  position: relative; pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 20px; border-radius: 18px; overflow: hidden;
  background: #06180f; color: #e9fff1; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(43, 255, 136, .18); animation: toastin .45s var(--spring);
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.toast.out { animation: toastout .22s var(--ease) forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast span { flex: 1; text-wrap: pretty; }
.toast button { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(43, 255, 136, .14); color: var(--neon); font-weight: 650; }
.toast button:hover { background: rgba(43, 255, 136, .26); }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "nav top" "nav rail" "nav view"; grid-template-rows: auto auto 1fr; }
  .rail {
    position: sticky; top: 0; z-index: 20; height: auto; max-height: none; overflow: visible; flex-direction: row; align-items: center; gap: 12px;
    padding: 10px clamp(16px, 2.6vw, 36px); border-left: 0; border-bottom: 1px solid var(--line); margin-top: 6px;
    background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .rail-head { flex: none; flex-direction: column; gap: 0; }
  .rail-head h2 { font-size: 17px; }
  .rail-head p { font-size: 12px; }
  .rail-all { flex: none; flex-wrap: nowrap; }
  .rail-list { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding: 2px 0 4px; scrollbar-width: none; }
  .rail-list::-webkit-scrollbar { display: none; }
  .rail-list > li { flex: none; }
  .rl { flex: none; width: auto; max-width: 260px; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 8px 14px 8px 12px; background: var(--panel); border: 1px solid var(--line); align-items: center; }
  .rl::before { display: none; }
  .rl-t { padding-left: 0; }
  .rl-s { display: none; }
  .rl-n { -webkit-line-clamp: 1; }
  .rail-empty { flex: 1; }
  .rail-add { margin: 0; flex: none; align-self: center; }
  .grid-day { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .daycol { min-height: 0; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "rail" "view"; grid-template-rows: auto auto 1fr; }
  .nav {
    position: fixed; z-index: 30; inset: auto 0 0 0; height: auto; flex-direction: row; justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .brand { display: none; }
  .nav-link { flex: 1; min-height: 54px; padding: 4px 2px; font-size: 11.5px; gap: 3px; }
  .nav-link[aria-current="page"]::before { left: 30%; right: 30%; top: -7px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 4px 4px; }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .top { padding-top: max(12px, env(safe-area-inset-top)); }
  #newBtn span, .send span { display: none; }
  #newBtn, .send { width: 54px; padding: 0; }
  .rail-head p { display: none; }
  .lower { grid-template-columns: 1fr; gap: 18px; }
  .sync span { display: none; }
  .sync[data-state="offline"] span, .sync[data-state="error"] span, .sync[data-state="auth"] span { display: inline; }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .btn.icon { width: 44px; }
  .row2 { grid-template-columns: 1fr; }
  .now { min-height: 0; }
  .now-title { font-size: clamp(1.8rem, 8.4vw, 2.6rem); }
  .now-until { font-size: clamp(4.6rem, 25vw, 7rem); }
  .now-label .kind { display: none; }
  .agora-tools .btn span { display: none; }
  .next-row { padding: 14px 16px; }
  .sec-item { grid-template-columns: auto 1fr; }
  .sec-item .btn { grid-column: 1 / -1; }
  .cell { min-height: 64px; padding: 4px; align-items: center; gap: 2px; flex-direction: column; }
  .cell .cn { align-self: center; }
  .month-head div { padding: 8px 2px; text-align: center; font-size: 11px; }
  .chip { width: auto; min-height: 0; padding: 0; background: none; pointer-events: none; }
  .chip .ct { display: none; }
  .chip .dot { width: 8px; height: 8px; }
  .cell .evs { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .more, .tcount { display: none; }
  .board { grid-template-columns: repeat(4, 82%); }
  dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 28px 28px 0 0; margin: auto 0 0; }
  dialog[open] { animation: sheetin .38s var(--ease); }
  @keyframes sheetin { from { transform: translateY(40px); opacity: 0; } }
  .dlg-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .task-body { padding-block: 12px; }
  .up-row { min-height: 44px; }
  .mv { min-height: 40px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .sheen, .auth-bg i { display: none; }
}
@media print {
  .nav, .top, .rail, .head-ctl, #toasts, #splash, .auth { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
