/* Blocos — identidade visual
   Base neutra quente, cartões macios e a assinatura de quatro blocos coloridos
   (azul, violeta, laranja, marfim) vinda do ícone. Tema claro e escuro. */
:root {
  color-scheme: light;
  --b1: #5B7FE8; --b2: #9A72E0; --b3: #E2844F; --b4: #EDEBE6;
  --brand: linear-gradient(135deg, #5B7FE8 0%, #8B6CE6 48%, #E2844F 100%);
  --accent: #6B5CE7; --accent-soft: rgba(107, 92, 231, .12); --on-accent: #fff;

  --bg: #F3F2EE; --bg-glow: rgba(139, 108, 230, .10); --bg-glow2: rgba(226, 132, 79, .07);
  --card: #FFFFFF; --card2: #FAF9F7; --raise: #FFFFFF;
  --ink: #101114; --ink2: #3C3F47; --muted: #6B6E77; --faint: #8F929A;
  --line: rgba(16, 17, 20, .07); --line2: rgba(16, 17, 20, .055); --soft: #F1F0EC; --chip: rgba(16, 17, 20, .10);
  --off: #D8D9DD; --track: rgba(16, 17, 20, .07); --ring: #C3C5CB;
  --solid: #101114; --on-solid: #fff;
  --red: #C7362B; --red-soft: rgba(199, 54, 43, .08); --redline: rgba(199, 54, 43, .22);
  --amber: #A2620A; --green: #1E7A4C; --green-soft: rgba(30, 122, 76, .09);
  --glass: rgba(255, 255, 255, .78); --glass-line: rgba(16, 17, 20, .08);
  --shadow-sm: 0 1px 2px rgba(16, 17, 20, .04), 0 1px 1px rgba(16, 17, 20, .02);
  --shadow: 0 1px 2px rgba(16, 17, 20, .04), 0 8px 24px -12px rgba(16, 17, 20, .10);
  --shadow-lg: 0 24px 60px -20px rgba(16, 17, 20, .28), 0 6px 18px -8px rgba(16, 17, 20, .12);
  --r-lg: 24px; --r-md: 18px; --r-sm: 14px;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --accent: #9488FF; --accent-soft: rgba(148, 136, 255, .16); --on-accent: #0B0B10;
    --bg: #0B0C0F; --bg-glow: rgba(123, 104, 238, .16); --bg-glow2: rgba(226, 132, 79, .07);
    --card: #15161B; --card2: #1A1B21; --raise: #1E1F26;
    --ink: #F3F3F5; --ink2: #CDCFD5; --muted: #8E919A; --faint: #6B6E77;
    --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .055); --soft: #1D1E25; --chip: rgba(255, 255, 255, .12);
    --off: #34363F; --track: rgba(255, 255, 255, .08); --ring: #4A4D57;
    --solid: #F3F3F5; --on-solid: #0B0C0F;
    --red: #FF7468; --red-soft: rgba(255, 116, 104, .10); --redline: rgba(255, 116, 104, .28);
    --amber: #F4B653; --green: #5AD49A; --green-soft: rgba(90, 212, 154, .10);
    --glass: rgba(24, 25, 31, .72); --glass-line: rgba(255, 255, 255, .08);
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  font-family: 'Geist', 'Helvetica Neue', system-ui, -apple-system, sans-serif; color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  font-feature-settings: 'ss01', 'cv11';
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }
::selection { background: var(--accent-soft); }

/* ---------- estrutura ---------- */
.main {
  position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 60% at 0% -10%, var(--bg-glow), transparent 60%),
    radial-gradient(80% 40% at 110% 0%, var(--bg-glow2), transparent 60%),
    var(--bg);
  background-attachment: local;
}
.wrap { max-width: 560px; margin: 0 auto; padding: calc(var(--top) + 18px) 18px calc(var(--bottom) + 128px); display: flex; flex-direction: column; gap: 24px; }

/* marca */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.logo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 28px; height: 28px; padding: 6px; border-radius: 8px; flex: none;
  background: radial-gradient(90% 90% at 20% 10%, rgba(139, 108, 230, .55), transparent 70%), linear-gradient(#1D1E28, #09090D);
}
.logo i { border-radius: 30%; }
.logo i:nth-child(1) { background: linear-gradient(135deg, #86A0F7, #4766DE); } .logo i:nth-child(2) { background: linear-gradient(135deg, #BC97F5, #7A52D6); }
.logo i:nth-child(3) { background: linear-gradient(135deg, #F8AE78, #D9662E); }
.logo i:nth-child(4) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' stroke='%2315161C' stroke-width='3.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/78% no-repeat, linear-gradient(135deg, #fff, #E6E2D8); }
@media (prefers-color-scheme: dark) { .logo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); } }
.logo.lg { width: 76px; height: 76px; padding: 17px; gap: 6px; border-radius: 24px; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08); }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 4px 0; }
.head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: -0.005em; }
.title { margin: 0; font-size: 38px; font-weight: 650; letter-spacing: -0.045em; line-height: 1; }
.sub { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* anel do dia */
.ring { position: relative; flex: none; width: 64px; height: 64px; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring .trk { stroke: var(--track); }
.ring .val { transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring b small { font-size: 10px; font-weight: 500; color: var(--muted); margin-left: 1px; }

/* ---------- seções e cartões ---------- */
.section { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; min-height: 32px; }
.sec-name { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink2); }
.sec-meta { font-size: 12px; color: var(--muted); text-align: right; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--ink)); }
.sec-name .dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ink)) 18%, transparent); }

.surface { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2px 6px; box-shadow: var(--shadow); }
.surface.pad { padding: 2px 18px; }
.surface.late { border-color: var(--redline); background: linear-gradient(180deg, var(--red-soft), transparent 70%), var(--card); }

/* linha de tarefa */
.row { display: flex; align-items: center; gap: 2px; padding: 3px 0; position: relative; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 46px; right: 8px; height: 1px; background: var(--line2); }
.surface.pad .row + .row::before, .day-list .row + .row::before { left: 0; right: 0; }
.check { flex: none; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.check span {
  width: 24px; height: 24px; border-radius: 8px; border: 1.75px solid color-mix(in srgb, var(--c, var(--ring)) 55%, var(--ring));
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .18s, border-color .18s, transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.check:active span { transform: scale(.86); }
.check.on span { background: var(--c); border-color: var(--c); box-shadow: 0 4px 10px -4px var(--c); }
.row-main { flex: 1 1 auto; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
.row-title { font-size: 15.5px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; transition: color .18s; }
.row-title.done { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--faint); }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-meta .m { display: inline-flex; align-items: center; gap: 4px; }
.row-meta .m + .m::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); opacity: .6; margin-right: 2px; }
.row-meta .lv { font-weight: 600; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, currentColor 11%, transparent); }
.row-meta .m.lv + .m::before, .row-meta .m + .m.lv::before { display: none; }
.lv.importante { color: var(--amber); } .lv.critico { color: var(--red); }
.row-meta.late { color: var(--red); }
.bell { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--accent); border-radius: 12px; transition: color .15s, background .15s; }
.bell:active { background: var(--soft); }
.bell.off { color: var(--faint); opacity: .7; }
.bell svg { width: 18px; height: 18px; }

/* progresso por bloco */
.progress { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.progress > div {
  padding: 14px 14px 13px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.p-name { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-num { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.p-num small { font-size: 15px; color: var(--faint); font-weight: 500; letter-spacing: -0.02em; }
.bar { height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--accent)); transition: width .45s cubic-bezier(.2, .8, .2, 1); }

/* contagem regressiva */
.count {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #121317; color: #fff; border-radius: var(--r-lg); padding: 20px 22px; text-align: left; width: 100%;
  box-shadow: 0 18px 40px -22px rgba(91, 79, 230, .55);
}
.count::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90% 140% at 100% 0%, rgba(139, 108, 230, .55), transparent 55%),
              radial-gradient(70% 120% at 0% 120%, rgba(226, 132, 79, .35), transparent 60%);
}
.count .k { font-size: 12px; color: rgba(255, 255, 255, .62); font-weight: 500; }
.count .t { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 5px; line-height: 1.25; }
.count .n { display: flex; align-items: baseline; gap: 5px; flex: none; }
.count .n b { font-size: 44px; font-weight: 300; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.count .n span { font-size: 13px; color: rgba(255, 255, 255, .62); }

.pill { height: 34px; padding: 0 14px; border: 1px solid var(--chip); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 550; white-space: nowrap; box-shadow: var(--shadow-sm); transition: transform .12s; }
.pill:active { transform: scale(.96); }
.empty {
  background: var(--card); border: 1.5px dashed var(--chip); border-radius: var(--r-lg);
  padding: 34px 24px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5;
}
.empty::before {
  content: ''; display: block; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px;
  background: url(icon-192.png?v=2) center/cover; box-shadow: 0 8px 20px -10px rgba(16, 17, 20, .5);
}
.empty strong { display: block; color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 4px; }

/* ---------- semana ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; font-size: 12px; color: var(--ink2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.day { width: 100%; text-align: left; padding: 16px 0; display: flex; flex-direction: column; gap: 11px; }
.day-wrap + .day-wrap { border-top: 1px solid var(--line2); }
.day-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.day-name { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.day-date { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 450; }
.day-right { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.day[aria-expanded="true"] .day-name { color: var(--accent); }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag.full { color: var(--red); background: var(--red-soft); }
.tag.mark { color: var(--accent); background: var(--accent-soft); }
.segs { display: flex; gap: 3px; height: 8px; }
.segs i { height: 8px; border-radius: 4px; background: var(--c); }
.segs.zero i { background: var(--track); flex: 1; }
.day-list { padding: 0 0 10px; animation: fade .2s ease-out; }
.day-list .row { padding: 1px 0; }

/* ---------- rotina ---------- */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 4px; }
.seg button { height: 42px; border-radius: 12px; font-size: 14px; font-weight: 550; color: var(--muted); transition: color .15s, background .15s; }
.seg button.on { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 17, 20, .08), 0 4px 12px -6px rgba(16, 17, 20, .18); }
.rot-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px 6px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.rot-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--bg-glow), transparent 70%); pointer-events: none; }
.rot-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.rot-num { font-size: 52px; font-weight: 300; letter-spacing: -0.055em; line-height: .9; font-variant-numeric: tabular-nums; }
.rot-num small { font-size: 18px; color: var(--faint); letter-spacing: -0.02em; font-weight: 450; }
.rot-label { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.45; }
.rot-card .bar { margin: 18px 0 8px; height: 6px; }
.rot-card .bar > i { background: var(--brand); }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 0; }
.line + .line, .rot-card .line { border-top: 1px solid var(--line2); }
.line-t { font-size: 15px; font-weight: 550; letter-spacing: -0.01em; }
.line-d { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.line-r { display: flex; align-items: center; gap: 6px; flex: none; }
.time { height: 38px; border: 1px solid var(--chip); border-radius: 11px; padding: 0 10px; background: var(--card2); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 86px; }
.time:disabled { color: var(--faint); opacity: .7; }
.done-note {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: var(--r-md);
  background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); font-size: 14px; font-weight: 550;
  animation: pop .35s cubic-bezier(.3, 1.4, .5, 1);
}
.mini { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink2); transition: background .15s; }
.mini:active { background: var(--soft); }
.mini:disabled { color: var(--off); cursor: default; background: none; }
.mini.del { color: var(--red); }
.add { display: flex; gap: 8px; padding: 12px 0 14px; border-top: 1px solid var(--line2); }
.add .field { flex: 1; width: auto; }

/* ---------- campos e botões ---------- */
.field {
  width: 100%; min-width: 0; height: 50px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft);
  padding: 0 15px; font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); }
.field::placeholder { color: var(--faint); }
.btn {
  height: 50px; padding: 0 20px; border-radius: var(--r-sm); font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--solid); color: var(--on-solid); transition: transform .12s, opacity .15s; box-shadow: var(--shadow-sm);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--chip); }
.btn.danger { background: var(--red-soft); color: var(--red); border: 1px solid var(--redline); box-shadow: none; }
.btn.wide { width: 100%; }
.link { font-size: 14px; font-weight: 550; color: var(--accent); padding: 10px 4px; align-self: flex-start; }
.link:active { opacity: .6; }

/* switch */
.switch { flex: none; width: 56px; height: 44px; display: flex; align-items: center; justify-content: center; }
.switch span { width: 48px; height: 29px; border-radius: 15px; padding: 3px; background: var(--off); display: flex; transition: background .2s; }
.switch span::after { content: ''; width: 23px; height: 23px; border-radius: 12px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .22s cubic-bezier(.3, 1.3, .5, 1); }
.switch.on span { background: var(--accent); }
.switch.on span::after { transform: translateX(19px); }

/* ---------- navegação flutuante ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 14px calc(var(--bottom) + 12px); pointer-events: none; }
.nav::before { content: ''; position: absolute; inset: -30px 0 0; background: linear-gradient(to top, var(--bg) 35%, transparent); pointer-events: none; z-index: -1; }
.nav-in {
  pointer-events: auto; max-width: 440px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  padding: 7px; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: saturate(1.6) blur(22px); backdrop-filter: saturate(1.6) blur(22px); box-shadow: var(--shadow-lg);
}
.tab { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 550; border-radius: 19px; transition: color .15s, background .15s; }
.tab svg { width: 22px; height: 22px; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.tab.on { color: var(--ink); background: var(--soft); }
.tab.on svg { transform: translateY(-1px); color: var(--accent); }
.fab {
  justify-self: center; width: 54px; height: 54px; border-radius: 18px; color: #fff; display: flex; align-items: center; justify-content: center;
  background: var(--brand); box-shadow: 0 10px 22px -8px rgba(107, 92, 231, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s cubic-bezier(.3, 1.4, .5, 1);
}
.fab:active { transform: scale(.92) rotate(90deg); }

/* ---------- folha (formulários) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 9, 12, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 10; animation: fade .2s ease-out; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 560px; margin: 0 auto; background: var(--card);
  border-radius: 32px 32px 0 0; box-shadow: var(--shadow-lg); border-top: 1px solid var(--line);
  max-height: calc(100% - var(--top) - 24px); max-height: calc(100dvh - var(--top) - 24px);
  display: flex; flex-direction: column; animation: up .32s cubic-bezier(.2, .9, .2, 1);
}
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px calc(var(--bottom) + 22px); display: flex; flex-direction: column; gap: 22px; }
.sheet-body > * { flex-shrink: 0; }
.grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--off); flex: none; margin-bottom: -4px; }
.sheet h2 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -0.035em; }
.fl { display: flex; flex-direction: column; gap: 10px; }
.fl > label, .fl > .lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fl .lbl em { font-style: normal; color: var(--faint); text-transform: none; letter-spacing: 0; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 42px; padding: 0 15px; border: 1px solid var(--chip); border-radius: 13px; font-size: 14px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 8px; background: var(--card); transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.chip.on .dot { box-shadow: 0 0 0 2px var(--on-solid); }
.chip input { border: 0; background: transparent; height: 40px; font-size: 14px; font-weight: 550; color: inherit; font-variant-numeric: tabular-nums; }
.chip.on input { color-scheme: dark; }
.chip input::-webkit-calendar-picker-indicator { display: none; }
@media (prefers-color-scheme: dark) { .chip.on input { color-scheme: light; } }
.line > div:first-child { min-width: 0; flex: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.sw:active { transform: scale(.92); }
.sw i { width: 32px; height: 32px; border-radius: 10px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.sw.on { box-shadow: inset 0 0 0 2px var(--c); }
.box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 8px 8px 16px; }
.box-t { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.box-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 4px; }
.actions .btn { height: 54px; border-radius: 17px; }
.actions .btn:not(.ghost):not(.danger) { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -10px rgba(107, 92, 231, .65); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom) + 104px); transform: translateX(-50%);
  background: rgba(18, 19, 23, .92); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 13.5px; font-weight: 550; padding: 12px 18px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45); z-index: 20; max-width: calc(100% - 40px); width: max-content; text-align: center;
  animation: toast .3s cubic-bezier(.2, .9, .3, 1.2);
}

/* ---------- login ---------- */
.login {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: calc(var(--top) + 24px) 24px calc(var(--bottom) + 24px);
  background:
    radial-gradient(60% 40% at 15% 10%, rgba(91, 127, 232, .20), transparent 70%),
    radial-gradient(50% 35% at 90% 25%, rgba(154, 114, 224, .18), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(226, 132, 79, .14), transparent 70%),
    var(--bg);
}
.login form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; animation: rise .5s cubic-bezier(.2, .9, .2, 1); }
.login .logo { margin-bottom: 14px; }
.login .title { font-size: 44px; }
.login .sub { margin-bottom: 10px; }
.login .btn { background: var(--brand); color: #fff; height: 54px; box-shadow: 0 12px 26px -10px rgba(107, 92, 231, .6); }
.login .err { color: var(--red); font-size: 14px; font-weight: 500; }
.notice { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: var(--r-md); padding: 14px 16px; font-size: 13px; color: var(--ink2); line-height: 1.5; }

.spin { width: 34px; height: 34px; margin: 42vh auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.spin i { border-radius: 30%; animation: blink 1.1s ease-in-out infinite; }
.spin i:nth-child(1) { background: var(--b1); } .spin i:nth-child(2) { background: var(--b2); animation-delay: .15s; }
.spin i:nth-child(4) { background: var(--b4); animation-delay: .3s; box-shadow: inset 0 0 0 1px var(--line); } .spin i:nth-child(3) { background: var(--b3); animation-delay: .45s; }

@keyframes blink { 0%, 100% { transform: scale(.55); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(60px); opacity: .4; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
@keyframes toast { from { transform: translate(-50%, 14px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (min-width: 600px) {
  .wrap { padding-top: calc(var(--top) + 36px); }
  .title { font-size: 44px; }
}
