:root {
  --bg: #09090d;
  --surface: #101016;
  --surface-2: #16161f;
  --surface-3: #1c1c28;
  --border: #1f1f2b;
  --border-light: #2a2a3a;
  --text: #f4f4f6;
  --text-dim: #8b8b9e;
  --text-faint: #55556a;
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --purple-glow: rgba(124, 58, 237, 0.35);
  --cell-empty: #16161f;
  --radius: 18px;
  --radius-sm: 12px;
  --cell: 12px;
  --cell-gap: 3px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Tema claro */
:root[data-theme="light"] {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #f1f1f7;
  --surface-3: #e6e6f0;
  --border: #e3e3ec;
  --border-light: #d3d3e0;
  --text: #18181f;
  --text-dim: #56566a;
  --text-faint: #7a7a8e;
  --cell-empty: #e6e6f0;
  color-scheme: light;
}
:root[data-theme="light"] .topbar { background: rgba(246, 246, 251, 0.82); border-bottom-color: var(--border); }
:root[data-theme="light"] .navrail { background: transparent; }
:root[data-theme="light"] .bg-glow { opacity: 0.45; }
:root[data-theme="light"] .modal-overlay { background: rgba(20, 20, 30, 0.45); }

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { color-scheme: dark; overflow-x: clip; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { touch-action: manipulation; font-family: inherit; }

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 320px at 85% -5%, rgba(124, 58, 237, 0.16), transparent 70%),
    radial-gradient(500px 380px at -10% 45%, rgba(124, 58, 237, 0.08), transparent 70%),
    radial-gradient(420px 300px at 60% 110%, rgba(99, 102, 241, 0.07), transparent 70%);
  z-index: 0;
}

.desktop-only { display: inline-flex; }
.mobile-only { display: none; }

/* ---------- Splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  z-index: 300;
}

.splash-logo { color: var(--purple-light); filter: drop-shadow(0 0 26px var(--purple-glow)); animation: splash-pulse 1.6s ease-in-out infinite; }

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.07); opacity: 0.85; }
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--border-light);
  border-top-color: var(--purple-light);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tela de login (painel sobre a landing) ---------- */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: auth-overlay-in 0.28s ease both;
}
@keyframes auth-overlay-in { from { opacity: 0; } to { opacity: 1; } }

/* trava a rolagem da landing enquanto o painel de login está aberto */
body.auth-open { overflow: hidden; }

.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: linear-gradient(170deg, rgba(124, 58, 237, 0.12), var(--surface) 40%);
  border: 1px solid var(--border-light);
  border-radius: 26px;
  padding: 40px 26px 28px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(124, 58, 237, 0.1);
  animation: auth-pop 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes auth-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Alça (aparece como bottom-sheet no mobile) */
.auth-grip { display: none; }
/* halo de luz no topo do card */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.5), rgba(124, 58, 237, 0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-logo {
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 26px var(--purple-glow));
}
.auth-logo svg { display: block; }

.auth-title { font-size: 27px; font-weight: 900; letter-spacing: -0.6px; }
.auth-title span { background: linear-gradient(120deg, var(--purple-light), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { font-size: 14px; color: var(--text-dim); margin: 7px 0 26px; }

.setup-note {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  color: #fcd34d;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: left;
}
.setup-note code { font-size: 11.5px; background: rgba(0, 0, 0, 0.35); padding: 1.5px 5px; border-radius: 5px; }

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 22px;
}

.segmented button {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease;
}
.segmented button.active { color: #fff; }

.segmented-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 2px 14px var(--purple-glow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.segmented.signup .segmented-pill { transform: translateX(100%); }

#auth-form { text-align: left; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-dim);
  margin: 2px 0 16px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.remember-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--purple);
  cursor: pointer;
}

.auth-msg {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.55;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
}
.auth-msg.error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

/* Campos da tela de login: ícone à esquerda + toggle de senha */
.auth-card .field { margin-bottom: 14px; }
.auth-card .input-wrap { position: relative; display: flex; align-items: center; }
.auth-card .input-ico {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color 0.15s ease;
}
.auth-card .input-wrap input { padding-left: 44px; }
.auth-card .input-wrap.has-toggle input { padding-right: 46px; }
.auth-card .input-wrap:focus-within .input-ico { color: var(--purple-light); }

.pass-toggle {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.pass-toggle svg { width: 19px; height: 19px; display: block; }
.pass-toggle:hover { color: var(--text-dim); background: var(--surface-3); }
.pass-toggle:active { transform: scale(0.92); }

.auth-card { z-index: 1; }

/* Halo pulsante atrás do logo */
.auth-logo { position: relative; }
.auth-logo::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
  z-index: -1;
  animation: logo-halo 3.2s ease-in-out infinite;
}
@keyframes logo-halo {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Entrada escalonada dos elementos do card */
.auth-logo,
.auth-title,
.auth-sub,
.segmented,
#auth-form { animation: auth-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.auth-logo { animation-delay: 0.05s; }
.auth-title { animation-delay: 0.12s; }
.auth-sub { animation-delay: 0.18s; }
.segmented { animation-delay: 0.24s; }
#auth-form { animation-delay: 0.3s; }
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Foco mais vivo nos campos do login */
.auth-card .input-wrap input:focus {
  background: var(--surface-3);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22), 0 4px 18px rgba(124, 58, 237, 0.12);
}

/* Brilho que cruza o botão ao passar o mouse */
.auth-card #auth-submit {
  position: relative;
  overflow: hidden;
  height: 50px;
  font-size: 15px;
  letter-spacing: 0.2px;
}
.auth-card #auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.auth-card #auth-submit:hover::after { transform: translateX(120%); }

/* Botão "voltar" no topo do card de login */
.auth-back {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px 7px 9px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.auth-back i { width: 15px; height: 15px; }
.auth-back:hover { color: var(--text); border-color: var(--purple-light); transform: translateX(-2px); }

/* Login como bottom-sheet no mobile */
@media (max-width: 560px) {
  .auth-view {
    place-items: end stretch;
    padding: 0;
    background: color-mix(in srgb, var(--bg) 58%, transparent);
  }
  .auth-card {
    width: 100%;
    max-width: none;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    padding: 16px 22px calc(26px + var(--safe-bottom));
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
    animation: sheet-up 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  .auth-grip {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-light);
    margin: 0 auto 14px;
  }
  .auth-back {
    position: static;
    margin: 0 auto 8px 0;
  }
  .auth-logo { margin-top: 2px; }
}

/* ====================================================================
   LANDING PAGE
   ==================================================================== */
.landing {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  padding: 0 clamp(18px, 5vw, 56px);
}

/* Aurora animada de fundo */
.lp-aurora {
  position: fixed;
  inset: -20vh -10vw auto;
  height: 130vh;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(620px 420px at 78% 8%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(560px 460px at 12% 22%, rgba(99, 102, 241, 0.18), transparent 62%),
    radial-gradient(520px 420px at 60% 78%, rgba(168, 85, 247, 0.12), transparent 65%);
  filter: blur(8px);
  animation: lp-aurora 18s ease-in-out infinite alternate;
}
@keyframes lp-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.04); }
}
:root[data-theme="light"] .lp-aurora { opacity: 0.6; }

/* Nav */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1140px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 0 14px;
}
.lp-nav::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: -1;
}
.lp-nav.scrolled::before { opacity: 1; }
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}
.lp-brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 14px var(--purple-glow));
}
.lp-brand-name { font-size: 19px; font-weight: 900; letter-spacing: -0.4px; }
.lp-brand-name span { background: linear-gradient(120deg, var(--purple-light), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-nav-links { margin-left: auto; display: flex; gap: 26px; }
.lp-nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.15s;
}
.lp-nav-links a:hover { color: var(--text); }
.lp-nav-actions { display: flex; gap: 10px; }

/* Botões da landing */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.16,1,.3,1), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.lp-btn i { width: 18px; height: 18px; }
.lp-btn-ghost { background: var(--surface-2); border-color: var(--border-light); color: var(--text); }
.lp-btn-ghost:hover { border-color: var(--purple-light); transform: translateY(-2px); }
.lp-btn-solid {
  background: linear-gradient(120deg, #8b5cf6, var(--purple));
  color: #fff;
  box-shadow: 0 8px 24px var(--purple-glow);
}
.lp-btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 34px var(--purple-glow); }
.lp-btn-lg { padding: 14px 26px; font-size: 16px; }

/* Hero */
.lp-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 90px) 0 clamp(30px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--purple) 10%, var(--surface));
  color: var(--purple-light);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.lp-badge i { width: 15px; height: 15px; }
.lp-hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -1.5px;
  font-weight: 900;
}
.lp-grad { background: linear-gradient(110deg, var(--purple-light), var(--purple) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead {
  margin: 22px 0 30px;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 32em;
}
.lp-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}
.lp-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-dim); }
.lp-trust i { width: 16px; height: 16px; color: var(--purple-light); }

/* Mockup do app no hero */
.lp-hero-art { position: relative; perspective: 1400px; }
.lp-shot {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: linear-gradient(170deg, color-mix(in srgb, var(--purple) 10%, var(--surface)), var(--surface) 42%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), 0 0 50px rgba(124, 58, 237, 0.08);
  overflow: hidden;
  animation: lp-float-card 7s ease-in-out infinite;
}
@keyframes lp-float-card {
  0%, 100% { transform: rotateY(-7deg) rotateX(3deg) translateY(0); }
  50% { transform: rotateY(-4deg) rotateX(1deg) translateY(-12px); }
}
.lp-shot-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.lp-dot { width: 11px; height: 11px; border-radius: 50%; }
.lp-dot.red { background: #ff5f57; } .lp-dot.yellow { background: #febc2e; } .lp-dot.green { background: #28c840; }
.lp-shot-title { margin-left: 10px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.lp-shot-body { padding: 18px; }
.lp-shot-row { display: flex; gap: 12px; margin-bottom: 16px; }
.lp-stat {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-stat-num { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.lp-stat-lbl { font-size: 12px; color: var(--text-dim); }
.lp-shot-label { font-size: 12px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 9px; }
.lp-heat {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  margin-bottom: 18px;
}
.lp-heat span {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--cell-empty);
  opacity: 0;
  animation: lp-cell-pop 0.4s ease forwards;
}
.lp-heat span.l1 { background: rgba(124, 58, 237, 0.35); }
.lp-heat span.l2 { background: rgba(124, 58, 237, 0.6); }
.lp-heat span.l3 { background: rgba(139, 92, 246, 0.85); }
.lp-heat span.l4 { background: #a78bfa; }
@keyframes lp-cell-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
.lp-shot-habits { display: flex; flex-direction: column; gap: 9px; }
.lp-habit {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.lp-habit-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c);
}
.lp-habit-ico i { width: 17px; height: 17px; }
.lp-habit-name { font-size: 14px; font-weight: 600; flex: 1; }
.lp-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border-light);
  display: grid;
  place-items: center;
  color: #fff;
}
.lp-check.done { background: linear-gradient(120deg, #8b5cf6, var(--purple)); border-color: transparent; }
.lp-check i { width: 14px; height: 14px; }

/* Cartões flutuantes ao redor do mockup */
.lp-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.lp-float b { display: block; font-size: 13px; }
.lp-float small { display: block; font-size: 11.5px; color: var(--text-dim); }
.lp-float-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.lp-float-ico i { width: 18px; height: 18px; }
.lp-float-1 { top: 6%; left: -7%; animation: lp-bob 5s ease-in-out infinite; }
.lp-float-2 { bottom: 8%; right: -5%; animation: lp-bob 6s ease-in-out infinite 0.6s; }
@keyframes lp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Marquee */
.lp-marquee {
  max-width: 100vw;
  overflow: hidden;
  margin: clamp(20px, 4vw, 40px) calc(50% - 50vw);
  padding: 16px 0;
  border-block: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.lp-marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: lp-marquee 26s linear infinite;
}
.lp-marquee-track span { font-size: clamp(18px, 3vw, 30px); font-weight: 800; letter-spacing: -0.5px; color: var(--text-faint); }
.lp-marquee-track i { color: var(--purple); font-style: normal; }
@keyframes lp-marquee { to { transform: translateX(-50%); } }

/* Seções */
.lp-section { max-width: 1140px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto clamp(34px, 5vw, 56px); }
.lp-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 12px;
}
.lp-head h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.lp-head p { margin-top: 14px; font-size: clamp(15px, 1.6vw, 17px); color: var(--text-dim); line-height: 1.6; }

/* Grade de recursos */
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-card {
  position: relative;
  padding: 26px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1), border-color 0.25s, box-shadow 0.25s;
}
.lp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 160px at 50% -20%, color-mix(in srgb, var(--c, var(--purple)) 18%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.lp-card:hover { transform: translateY(-5px); border-color: var(--border-light); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32); }
.lp-card:hover::before { opacity: 1; }
.lp-card-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--c) 20%, transparent);
  color: var(--c);
  margin-bottom: 16px;
}
.lp-card-ico i { width: 23px; height: 23px; }
.lp-card h3 { position: relative; font-size: 18px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
.lp-card p { position: relative; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }

/* Passos */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.lp-step {
  position: relative;
  padding: 28px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.lp-step-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, var(--purple));
  box-shadow: 0 8px 22px var(--purple-glow);
  margin-bottom: 16px;
}
.lp-step h3 { font-size: 17px; font-weight: 800; margin-bottom: 7px; }
.lp-step p { font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }

/* CTA final */
.lp-cta {
  position: relative;
  text-align: center;
  padding: clamp(40px, 7vw, 72px) 28px;
  border-radius: 28px;
  border: 1px solid var(--border-light);
  background: linear-gradient(160deg, color-mix(in srgb, var(--purple) 16%, var(--surface)), var(--surface) 60%);
  overflow: hidden;
}
.lp-cta-glow {
  position: absolute;
  inset: auto 0 -60% 0;
  height: 120%;
  background: radial-gradient(540px 280px at 50% 0%, var(--purple-glow), transparent 70%);
  pointer-events: none;
}
.lp-cta h2 { position: relative; font-size: clamp(26px, 4vw, 40px); font-weight: 900; letter-spacing: -1px; }
.lp-cta p { position: relative; margin: 12px 0 28px; font-size: clamp(15px, 1.6vw, 17px); color: var(--text-dim); }
.lp-cta .lp-btn { position: relative; }

/* Rodapé */
.lp-foot {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 0 calc(36px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.lp-foot-by { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-dim); }
.lp-foot-by i { width: 15px; height: 15px; color: var(--purple-light); }
.lp-foot-by b { color: var(--text); font-weight: 700; }

/* Reveal ao rolar */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
.lp-grid [data-reveal].in:nth-child(2) { transition-delay: 0.06s; }
.lp-grid [data-reveal].in:nth-child(3) { transition-delay: 0.12s; }
.lp-grid [data-reveal].in:nth-child(4) { transition-delay: 0.06s; }
.lp-grid [data-reveal].in:nth-child(5) { transition-delay: 0.12s; }
.lp-grid [data-reveal].in:nth-child(6) { transition-delay: 0.18s; }
.lp-steps [data-reveal].in:nth-child(2) { transition-delay: 0.1s; }
.lp-steps [data-reveal].in:nth-child(3) { transition-delay: 0.2s; }

/* Tap targets confortáveis em telas de toque */
.lp-btn { min-height: 44px; }

/* Responsivo (mobile-first nas quebras) */
@media (max-width: 900px) {
  .lp-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: clamp(24px, 8vw, 56px);
  }
  .lp-hero-copy { min-width: 0; }
  .lp-lead { margin-inline: auto; max-width: 46ch; }
  .lp-hero-cta { justify-content: center; }
  .lp-trust { justify-content: center; }
  .lp-hero-art { order: -1; width: 100%; max-width: 440px; margin: 0 auto; }
  .lp-shot { animation: none; transform: none; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr 1fr; }
  .lp-nav-links { display: none; }
}

@media (max-width: 600px) {
  .landing { padding-inline: 16px; }
  .lp-badge { font-size: 12px; padding: 6px 12px; }
  .lp-hero { padding-bottom: 8px; gap: 26px; }
  .lp-hero-cta { flex-direction: column; }
  .lp-hero-cta .lp-btn { width: 100%; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; gap: 14px; }
  .lp-card, .lp-step { padding: 22px 20px; }
  /* cartões flutuantes menores e dentro da viewport */
  .lp-float { padding: 9px 12px; gap: 8px; border-radius: 12px; }
  .lp-float b { font-size: 12px; }
  .lp-float small { font-size: 11px; }
  .lp-float-1 { left: 2px; top: -4%; }
  .lp-float-2 { right: 2px; bottom: 4%; }
  .lp-trust { gap: 10px 16px; row-gap: 10px; }
  .lp-marquee { padding: 12px 0; }
  .lp-foot { flex-direction: column; text-align: center; gap: 14px; }
}

/* Telefones bem estreitos */
@media (max-width: 380px) {
  .lp-nav-actions .lp-btn { padding: 9px 14px; font-size: 13.5px; }
  .lp-brand-name { font-size: 17px; }
  .lp-float-1 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-aurora, .lp-shot, .lp-float, .lp-marquee-track, .lp-heat span { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .lp-heat span { opacity: 1; }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) calc(20px + var(--safe-right)) 12px calc(20px + var(--safe-left));
  background: rgba(9, 9, 13, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(31, 31, 43, 0.7);
}

.topbar .brand, .topbar-right { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 11px; }

.logo-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 14px var(--purple-glow));
}
.logo-mark svg { display: block; }

.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.brand h1 span { color: var(--purple-light); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 4px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

/* ---------- Botões ---------- */
.btn {
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 20px var(--purple-glow);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-primary .plus { font-size: 17px; font-weight: 700; line-height: 1; }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); }

.btn-block { width: 100%; margin-top: 4px; }

.fab {
  position: fixed;
  right: calc(16px + var(--safe-right));
  bottom: calc(18px + var(--safe-bottom));
  width: 58px;
  height: 58px;
  border: none;
  display: grid;
  place-items: center;
  background: none;
  color: #8b5cf6;
  cursor: pointer;
  z-index: 30;
  filter: drop-shadow(0 4px 16px rgba(124, 58, 237, 0.7));
  transition: transform 0.15s ease, color 0.15s ease;
}
.fab svg { width: 40px; height: 40px; display: block; }
.fab:active { transform: scale(0.88); color: var(--purple-light); }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: all 0.15s ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-light); }
.icon-btn.danger:hover { color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
.user-chip .icon-btn { width: 30px; height: 30px; border-radius: 50%; }

/* ---------- Layout ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px calc(20px + var(--safe-right)) calc(90px + var(--safe-bottom)) calc(20px + var(--safe-left));
}

.demo-banner {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-sm);
  color: var(--purple-light);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  padding: 9px 14px;
  margin-bottom: 16px;
}

/* ---------- Scrollbars finas (cores do sistema) ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--border-light) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Shell: navegação Hábitos | Calendário ---------- */
.app-shell { display: flex; align-items: flex-start; }

.navrail {
  position: sticky;
  top: 78px;
  width: 84px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: var(--text-dim); background: var(--surface); }
.nav-item.active {
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

.app-shell main { flex: 1; min-width: 0; }

/* ---------- Página Calendário ---------- */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav .icon-btn { width: 30px; height: 30px; font-size: 18px; color: var(--text-dim); }
.cal-nav b { font-size: 15px; font-weight: 800; text-transform: capitalize; letter-spacing: -0.2px; margin-left: 8px; }

.cal-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cal-seg {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.cal-seg button {
  padding: 6px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cal-seg button.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 2px 10px var(--purple-glow);
}

.cal-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.cal-filter input { width: 15px; height: 15px; accent-color: var(--purple); cursor: pointer; }

.btn-mini {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-mini:hover { border-color: var(--purple); color: var(--text); }
.btn-mini.primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
}

.agenda-note { font-size: 11.5px; color: var(--text-faint); line-height: 1.55; }

/* visão Mês */
.cal-month {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cal-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-month-head span {
  padding: 8px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal-mcell {
  min-height: 96px;
  min-width: 0;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  transition: background 0.12s ease;
}
.cal-mcell:nth-child(7n) { border-right: none; }
.cal-mcell:hover { background: var(--surface-2); }
.cal-mcell.out { opacity: 0.35; }
.cal-mcell .mnum {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-mcell.today .mnum { background: var(--purple); color: #fff; box-shadow: 0 0 10px var(--purple-glow); }
.cal-more { font-size: 9.5px; font-weight: 700; color: var(--text-faint); padding-left: 2px; }

/* pílulas de item (hábito/tarefa) nas visões mês e semana */
.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  min-width: 0;
  overflow: hidden;
}
.pill > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .st { flex-shrink: 0; font-size: 9px; font-style: normal; color: var(--pc, var(--purple-light)); }
.pill.done { background: color-mix(in srgb, var(--pc, var(--purple)) 26%, var(--surface-2)); }
.pill.partial { background: color-mix(in srgb, var(--pc, var(--purple)) 14%, var(--surface-2)); }
.pill.comp { border: 1px solid color-mix(in srgb, var(--pc, var(--purple)) 55%, transparent); }
.pill.missed { color: var(--text-faint); }
.pill.missed .st { color: #f87171; }
.pill.pending { color: var(--text-dim); }
.pill.task { border-left: 2px solid var(--purple-light); background: rgba(124, 58, 237, 0.13); }
.pill.task .st { color: var(--purple-light); font-size: 8.5px; }

/* pontinhos no lugar das pílulas (mês no mobile) */
.mdots { display: none; gap: 3px; flex-wrap: wrap; padding-left: 2px; }
.mdots i { width: 5px; height: 5px; border-radius: 50%; display: block; }

/* visões Dia e Semana: grade de horários (estilo Google Calendar) */
.cal-tg {
  --gutter: 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cal-tg-scroll {
  overflow: auto;
  max-height: min(68vh, 680px);
  overscroll-behavior: contain;
}
.cal-tg-head,
.cal-tg-allday,
.cal-tg-body {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(0, 1fr));
}
.cal-tg-top {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cal-tg-day {
  border: none;
  background: none;
  color: var(--text-dim);
  font-family: inherit;
  text-align: center;
  padding: 8px 0 6px;
  cursor: pointer;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.cal-tg.single .cal-tg-day { cursor: default; }
.cal-tg:not(.single) .cal-tg-day:hover { background: var(--surface-2); }
.cal-tg-day span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.cal-tg-day b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.cal-tg-day.today b { background: var(--purple); color: #fff; }
.cal-tg-allday { border-top: 1px solid var(--border); }
.cal-tg-adcell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.cal-tg-adcell .pill.clickable { cursor: pointer; }
.cal-tg-body { position: relative; }
/* régua de horas fixa à esquerda quando a semana rola na horizontal */
.cal-tg-gutter,
.cal-tg-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
}
.cal-tg-gutter span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-faint);
}
.cal-tg-col {
  position: relative;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.cal-tg-col.today { background: rgba(124, 58, 237, 0.05); }
.cal-tg-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  opacity: 0.55;
  pointer-events: none;
}
.cal-tg-ev {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px 6px;
  border-radius: 6px;
  border-left: 3px solid var(--pc, var(--purple-light));
  background: color-mix(in srgb, var(--pc, var(--purple)) 28%, var(--surface-2));
  overflow: hidden;
  z-index: 2;
}
.cal-tg-ev.task {
  border-left-color: var(--purple-light);
  background: rgba(124, 58, 237, 0.16);
}
.cal-tg-ev .tg-title {
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-tg-ev .tg-time { font-size: 9.5px; color: var(--text-dim); }
.cal-tg-ev.short { flex-direction: row; align-items: center; gap: 5px; }
.cal-tg-ev.short .tg-time { display: none; }
.cal-tg-ev.pending { background: color-mix(in srgb, var(--pc, var(--purple)) 10%, var(--surface-2)); }
.cal-tg-ev.missed { opacity: 0.55; }
.cal-tg-ev.missed .tg-title { text-decoration: line-through; }
.cal-tg-ev.clickable { cursor: pointer; transition: filter 0.12s ease; }
.cal-tg-ev.clickable:hover { filter: brightness(1.15); }
.cal-tg-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid #ef4444;
  z-index: 3;
  pointer-events: none;
}
.cal-tg-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

/* listas de itens (aba Tarefas) */
.cal-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 10px;
}
.cal-group h3 {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
}

.cal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 6px;
  border-left: 3px solid var(--pc, var(--border-light));
}
.cal-item.task { border-left-color: var(--purple-light); }
.cal-item.clickable { cursor: pointer; transition: background 0.12s ease; }
.cal-item.clickable:hover { background: var(--surface-3); }
.cal-item time {
  font-size: 11px;
  font-weight: 800;
  color: var(--purple-light);
  min-width: 42px;
  flex-shrink: 0;
}
.cal-item .ci-icon { display: grid; place-items: center; color: var(--pc, var(--purple-light)); flex-shrink: 0; }
.cal-item .ci-icon svg { width: 15px; height: 15px; }
.cal-item .ci-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cal-item .ci-title { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item .ci-desc {
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-item time { min-width: 42px; }
.cal-item.task time { min-width: 76px; }

.cal-item .ci-status {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.cal-item.done .ci-status { color: var(--pc, var(--purple-light)); }
.cal-item.partial .ci-status { color: #fbbf24; }
.cal-item.missed .ci-status { color: #f87171; }
.cal-item.missed { opacity: 0.75; }

/* ---------- Aba Tarefas ---------- */
.tasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tasks-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.tasks-actions { display: flex; align-items: center; gap: 8px; }
.tasks-body { display: flex; flex-direction: column; gap: 12px; }

/* transição suave ao trocar de aba (clique ou gesto) */
#view-habits, #view-calendar, #view-tasks { animation: view-in 0.22s ease; }
@keyframes view-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Resumo (faixa compacta) ---------- */
.summary { margin-bottom: 16px; }

.summary-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.08), var(--surface) 55%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
}

.strip-today { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.strip-today svg { display: block; flex-shrink: 0; }
.strip-today .ring-track { stroke: var(--surface-3); }
.strip-today .ring-fill {
  stroke: url(#ring-grad);
  transition: stroke-dashoffset 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.strip-today .ring-text {
  fill: var(--text);
  font-size: 10px;
  font-weight: 800;
  font-family: "Inter", sans-serif;
}
.strip-today-info { display: flex; flex-direction: column; gap: 1px; }
.strip-today-info b { font-size: 14.5px; font-weight: 800; letter-spacing: -0.2px; }

.strip-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.strip-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}
.strip-stat b { font-size: 15px; font-weight: 800; color: var(--text); }
.strip-stat > span:last-child {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.strip-stat svg { width: 15px; height: 15px; color: var(--purple-light); }
.strip-ico { font-size: 13px; }

/* ---------- Atalhos do dia (quickbar) ---------- */
.quickbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.quickbar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-right: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--habit-color, var(--purple)); color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip .chip-icon { display: grid; place-items: center; color: var(--habit-color, var(--purple-light)); }
.chip .chip-icon svg { width: 14px; height: 14px; }
.chip.done {
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 24%, var(--surface));
  border-color: var(--habit-color, var(--purple));
  color: var(--text);
  box-shadow: 0 0 12px color-mix(in srgb, var(--habit-color, var(--purple)) 35%, transparent);
}

/* ---------- Hábito: linha estilo Notion ---------- */
.habits { display: flex; flex-direction: column; gap: 10px; }

.habit-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s ease;
  animation: card-in 0.35s ease both;
  overflow: hidden;
}

.habit-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--habit-color, var(--purple)), transparent 85%);
  opacity: 0.85;
  z-index: 1;
  pointer-events: none;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.habit-card:hover, .habit-card.expanded { border-color: var(--border-light); }

/* linha principal: check · ícone · nome · progresso · ações · chevron */
.habit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.row-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: var(--surface-2);
  color: transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.row-check:hover { border-color: var(--habit-color, var(--purple)); }
.row-check:active { transform: scale(0.9); }
.row-check.done {
  background: var(--habit-color, var(--purple));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 10px var(--purple-glow);
}

.habit-emoji {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 12%, var(--surface-2));
  border: 1px solid var(--border-light);
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
  color: var(--habit-color, var(--purple-light));
}
.habit-emoji svg { width: 17px; height: 17px; }

.habit-info { flex-shrink: 0; width: min(26%, 240px); min-width: 130px; }
.habit-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
}
.streak-badge.on-fire { text-shadow: 0 0 14px rgba(251, 191, 36, 0.5); }
.streak-badge .zero { color: var(--text-faint); font-weight: 500; }
.streak-badge svg { width: 13px; height: 13px; }

/* semana atual (Dom → Sáb): um quadradinho por dia */
.row-week {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.week-day {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.week-day.done {
  background: var(--habit-color, var(--purple));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 6px var(--purple-glow);
}
.week-day.partial {
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 35%, var(--surface-2));
  border-color: transparent;
  color: var(--text);
}
.week-day.comp {
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--habit-color, var(--purple)) 70%, transparent);
  color: var(--text-dim);
}
.week-day.miss { color: var(--text-faint); }
.week-day.off { opacity: 0.35; }
.week-day.future { opacity: 0.5; background: transparent; }
.week-day.today {
  outline: 1.5px solid var(--purple-light);
  outline-offset: 1px;
}

/* ações aparecem no hover, estilo Notion */
.habit-actions { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.15s ease; }
.habit-card:hover .habit-actions, .habit-card.expanded .habit-actions { opacity: 1; }

/* botão ⋮ que abre o menu de ações — só no mobile (ver media query) */
.habit-more { display: none; flex-shrink: 0; }

.row-chevron {
  color: var(--text-faint);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.row-chevron svg { width: 16px; height: 16px; }
.habit-card.expanded .row-chevron { transform: rotate(180deg); }

/* detalhe: abre ao clicar na linha (painel GitHub + estatísticas) */
.habit-detail { display: none; padding: 0 18px 16px; border-top: 1px solid var(--border); }
.habit-card.expanded .habit-detail { display: block; }
.habit-detail .habit-stats { margin-top: 14px; }

/* meta diária: dia parcial (fez algo, mas abaixo da meta) */
.cell.partial {
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 38%, var(--cell-empty));
  border-color: transparent;
}
.chip.partial {
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--habit-color, var(--purple)) 50%, transparent);
  color: var(--text);
}
.row-check.partial {
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 38%, var(--surface-2));
  border-color: var(--habit-color, var(--purple));
  color: #fff;
}
.goal-badge { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.goal-badge.met { color: var(--purple-light); }

/* campos de meta no modal de hábito */
.goal-fields { display: flex; gap: 10px; }
.goal-fields input {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
}
.goal-fields input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18); }
.goal-fields input[type="number"] { flex: 0 0 110px; }
.goal-fields input[type="text"] { flex: 1; }
.goal-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; margin-top: 8px; }

/* campo de horário opcional */
.time-field { align-items: center; }
.goal-fields input[type="time"] {
  flex: 0 0 140px;
  color-scheme: dark; /* ícone nativo do relógio claro no tema escuro */
}
.btn-clear-time {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-clear-time:hover { border-color: var(--purple); color: var(--text); }

/* seletor de dias da semana */
.weekday-row { display: flex; gap: 6px; }
.weekday-row button {
  flex: 1;
  padding: 9px 0;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.weekday-row button:hover { border-color: var(--purple); }
.weekday-row button.selected {
  background: rgba(124, 58, 237, 0.18);
  border-color: var(--purple);
  color: var(--text);
  box-shadow: 0 0 8px var(--purple-glow);
}

/* dia fora da rotina (descanso) */
.cell.off { opacity: 0.3; }
.chip.off { opacity: 0.55; border-style: dashed; }
.schedule-badge { color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.time-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.time-badge svg { width: 12px; height: 12px; }

@media (pointer: coarse) {
  .habit-actions { opacity: 1; }
}

/* ---------- Menu de ações do hábito (⋮) ---------- */
.habit-menu .modal { --habit-color: var(--purple); }
.habit-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.habit-menu-head .habit-emoji { width: 40px; height: 40px; }
.habit-menu-head b {
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.habit-menu-list { display: flex; flex-direction: column; gap: 2px; }
.habit-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.habit-menu-item:hover, .habit-menu-item:active { background: var(--surface-2); }
.habit-menu-item svg { width: 19px; height: 19px; color: var(--text-dim); flex-shrink: 0; }
.habit-menu-item.danger { color: #f87171; }
.habit-menu-item.danger svg { color: #f87171; }

/* ---------- Estatísticas do hábito ---------- */
.habit-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.mini-stat { display: flex; flex-direction: column; gap: 1px; }
.mini-stat b { font-size: 16px; font-weight: 700; }
.mini-stat span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }

.comp-meter { display: flex; flex-direction: column; gap: 4px; margin-left: auto; align-items: flex-end; }
.comp-dots { display: flex; gap: 5px; }
.comp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--habit-color, var(--purple));
  box-shadow: 0 0 8px var(--purple-glow);
}
.comp-dot.used { background: var(--surface-2); border: 1px solid var(--border-light); box-shadow: none; }
.comp-meter span { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Heatmap (painel estilo GitHub) ---------- */
.heatmap-wrap {
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  -webkit-overflow-scrolling: touch;
}
.heatmap-wrap::-webkit-scrollbar { height: 6px; }
.heatmap-wrap::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.heatmap { display: inline-flex; flex-direction: column; gap: 4px; }

.heatmap-months {
  display: flex;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-left: 30px;
  position: relative;
  height: 14px;
}
.heatmap-months span { position: absolute; }

.heatmap-body { display: flex; gap: 4px; }

.heatmap-days {
  display: flex;
  flex-direction: column;
  gap: var(--cell-gap);
  font-size: 10px;
  color: var(--text-faint);
  width: 26px;
  flex-shrink: 0;
}
.heatmap-days span { height: var(--cell); line-height: var(--cell); }

.heatmap-grid { display: flex; gap: var(--cell-gap); }
.heatmap-col { display: flex; flex-direction: column; gap: var(--cell-gap); }

.cell {
  width: var(--cell);
  height: var(--cell);
  border-radius: 3px;
  background: var(--cell-empty);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.cell:hover { transform: scale(1.35); box-shadow: 0 0 8px rgba(124, 58, 237, 0.4); z-index: 2; position: relative; }
.cell.out-of-range { visibility: hidden; pointer-events: none; }
.cell.today { outline: 1.5px solid var(--purple-light); outline-offset: 1px; }
.cell.done { background: var(--habit-color, var(--purple)); border-color: transparent; box-shadow: 0 0 6px var(--purple-glow); }
.cell.comp {
  background: transparent;
  border: 2px solid var(--habit-color, var(--purple));
  box-shadow: inset 0 0 4px var(--purple-glow);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 8px;
  justify-content: flex-end;
}
.heatmap-legend .cell { cursor: default; width: 11px; height: 11px; }
.heatmap-legend .cell:hover { transform: none; box-shadow: none; }
.heatmap-legend .gap { width: 8px; }

/* ---------- Estado vazio ---------- */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty-icon { color: var(--purple-light); opacity: 0.9; margin-bottom: 18px; filter: drop-shadow(0 0 22px var(--purple-glow)); }
.empty-state h2 { color: var(--text); font-size: 21px; margin-bottom: 8px; letter-spacing: -0.3px; }
.empty-state p { font-size: 14.5px; margin-bottom: 24px; }

/* ---------- Campos ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 7px;
}

.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-family: inherit;
  font-size: 16px; /* >=16px evita zoom automático no iOS */
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 56px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8b9e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }

/* ---------- Modais ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 9, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 50;
  animation: fade-in 0.18s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 28px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(124, 58, 237, 0.08);
  animation: modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sheet-handle { display: none; }

/* Em telas de toque o conteúdo do sheet não vira seleção de texto
   durante o arrasto; só os campos de digitação continuam selecionáveis */
@media (pointer: coarse) {
  .modal {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .modal input,
  .modal textarea {
    -webkit-user-select: text;
    user-select: text;
  }
}

.modal h2 { font-size: 18px; margin-bottom: 18px; letter-spacing: -0.3px; }
.modal-sm p { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin-bottom: 4px; }

/* ---------- Modal de criação (estilo Notion) ---------- */
.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.create-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.icon-preview {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--habit-color, var(--purple-light));
  background: var(--surface-2);
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 14%, var(--surface-2));
  border: 1px solid var(--border-light);
  border-color: color-mix(in srgb, var(--habit-color, var(--purple)) 35%, transparent);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.icon-preview svg { width: 26px; height: 26px; }

.title-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  padding: 8px 0;
  caret-color: var(--purple-light);
}
.title-input::placeholder { color: var(--text-faint); font-weight: 600; }

.create-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.create-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.create-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.create-section > .create-label { margin-bottom: 12px; }

.icon-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--text-faint);
  transition: border-color 0.15s ease;
}
.icon-search:focus-within { border-color: var(--purple); }
.icon-search svg { width: 13px; height: 13px; flex-shrink: 0; }
.icon-search input {
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 130px;
}
.icon-search input::placeholder { color: var(--text-faint); }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  max-height: 176px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.icon-grid::-webkit-scrollbar { width: 6px; }
.icon-grid::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.icon-grid button {
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.icon-grid button:hover { background: var(--surface-2); color: var(--text); }
.icon-grid button.selected {
  background: rgba(124, 58, 237, 0.16);
  border-color: var(--purple);
  color: var(--purple-light);
}
.icon-grid button svg { width: 18px; height: 18px; }

.icon-grid-empty {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  padding: 18px 0;
}

.color-row { display: flex; gap: 12px; flex-wrap: wrap; }
.color-row button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.12s ease;
}
.color-row button:hover { transform: scale(1.15); }
.color-row button.selected {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(26px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-radius: 13px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  max-width: calc(100vw - 40px);
  text-align: center;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  color: var(--text);
  pointer-events: none;
  z-index: 90;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.tooltip b { color: var(--purple-light); }

/* ---------- Confete ---------- */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 200;
  animation: confetti-fall 0.9s ease-out forwards;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(540deg) scale(0.4); }
}

/* ---------- Mobile (iPhone 15: 393pt) ---------- */
@media (pointer: coarse) {
  :root { --cell: 11px; --cell-gap: 2px; }
}

@media (max-width: 600px) {
  .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }

  main { padding: 14px calc(14px + var(--safe-right)) calc(120px + var(--safe-bottom)) calc(14px + var(--safe-left)); }

  /* navegação vira pílula flutuante estilo Instagram: só ícones,
     o ativo ganha uma bolha clara */
  .navrail {
    position: fixed;
    top: auto;
    bottom: calc(12px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 7px;
    background: rgba(18, 18, 26, 0.88);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(42, 42, 58, 0.65);
    border-radius: 999px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
    z-index: 40;
  }
  .nav-item {
    width: 52px;
    height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    color: var(--text-dim);
    justify-content: center;
  }
  .nav-item span { display: none; }
  .nav-item svg { width: 21px; height: 21px; }
  .nav-item:hover { background: none; }
  .nav-item.active {
    background: var(--text);
    border-color: transparent;
    color: #0a0a0f;
  }

  .fab { bottom: calc(78px + var(--safe-bottom)); }

  /* calendário compacto */
  .cal-toolbar { gap: 8px; }
  .cal-nav b { font-size: 13.5px; margin-left: 4px; }
  .cal-controls { gap: 8px; }
  .cal-seg button { padding: 6px 9px; font-size: 11px; }
  .cal-mcell { min-height: 56px; padding: 3px 3px 4px; gap: 2px; }
  .cal-mcell .mnum { width: 19px; height: 19px; font-size: 10.5px; }
  .cal-mcell .pill, .cal-mcell .cal-more { display: none; }
  .mdots { display: flex; }

  /* grade de horários: semana rola na horizontal, com colunas mínimas legíveis */
  .cal-tg { --gutter: 44px; }
  .cal-tg:not(.single) .cal-tg-head,
  .cal-tg:not(.single) .cal-tg-allday,
  .cal-tg:not(.single) .cal-tg-body {
    min-width: calc(var(--gutter) + var(--cols, 7) * 104px);
  }
  .cal-tg-scroll { max-height: calc(100vh - 230px); }

  .topbar { padding: calc(12px + var(--safe-top)) calc(16px + var(--safe-right)) 10px calc(16px + var(--safe-left)); }
  .brand h1 { font-size: 16.5px; }
  .logo-mark svg { width: 28px; height: 28px; }

  .summary { margin-bottom: 12px; }
  .summary-strip { gap: 12px; padding: 8px 12px; }
  .strip-today { gap: 8px; }
  .strip-today-info b { font-size: 13px; }
  .strip-stat { gap: 4px; }
  .strip-stat b { font-size: 13.5px; }

  .quickbar { gap: 6px; margin-bottom: 14px; }
  .chip { padding: 7px 11px; font-size: 12px; }

  /* linhas compactas: mais hábitos visíveis por tela.
     Layout em dois níveis: 1) check · ícone · nome/streak · ⋮ · chevron
                            2) semana ocupando a largura toda            */
  .habits { gap: 8px; }
  .habit-row { gap: 10px; padding: 10px 12px; flex-wrap: wrap; row-gap: 10px; }
  .habit-emoji { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
  .habit-emoji svg { width: 16px; height: 16px; }
  /* nome + streak ficam contidos e não transbordam mais sobre a semana */
  .habit-info { flex: 1; width: auto; min-width: 0; overflow: hidden; }
  .habit-name { font-size: 14px; }
  .habit-meta { font-size: 10.5px; gap: 8px; flex-wrap: nowrap; overflow: hidden; min-width: 0; }
  .habit-meta > * { flex-shrink: 0; min-width: 0; }
  /* último badge da linha pode encolher com reticências em vez de vazar */
  .habit-meta > *:last-child { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
  /* frequência é redundante com a grade da semana (dias fora da rotina já
     aparecem esmaecidos), então some no mobile para não apertar streak/meta */
  .habit-meta .schedule-badge { display: none; }

  /* no mobile o cluster inline some; tudo vai para o menu (botão ⋮),
     que fica bem visível por ser a porta de entrada para excluir/editar */
  .habit-actions { display: none; }
  .habit-more {
    display: grid;
    color: var(--text-dim);
    background: var(--surface-2);
    border-color: var(--border);
  }

  /* a semana passa para a segunda linha, com quadradinhos maiores e tocáveis */
  .row-week {
    order: 1;
    flex-basis: 100%;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }
  .week-day { width: 34px; height: 28px; font-size: 10px; border-radius: 7px; }

  .habit-detail { padding: 0 12px 12px; }
  .habit-stats { gap: 14px; margin-bottom: 8px; }
  .mini-stat b { font-size: 14px; }
  .comp-meter { margin-left: auto; }
  .heatmap-legend { display: none; }

  .auth-card { padding: 32px 22px 26px; border-radius: 24px; }

  /* modais viram bottom sheets */
  .modal-overlay { place-items: end center; }
  .modal {
    width: 100vw;
    max-width: 100vw;
    border-radius: 24px 24px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 14px 20px calc(24px + var(--safe-bottom));
    animation: sheet-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sheet-handle {
    display: block;
    width: 40px;
    height: 4.5px;
    border-radius: 3px;
    background: var(--border-light);
    margin: 0 auto 16px;
    /* área de toque generosa para iniciar o arrasto */
    position: relative;
  }
  .sheet-handle::before {
    content: "";
    position: absolute;
    inset: -16px -60px -12px;
  }
  .modal-actions { margin-top: 20px; }
  .modal-actions .btn { flex: 1; }

  .create-header { gap: 12px; }
  .icon-preview { width: 46px; height: 46px; border-radius: 12px; font-size: 22px; }
  .icon-preview svg { width: 22px; height: 22px; }
  .title-input { font-size: 18px; }

  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 150px; }
  .icon-grid button svg { width: 20px; height: 20px; }
  .icon-search input { width: 100px; }
  .color-row button { width: 32px; height: 32px; }

  .toast { bottom: calc(92px + var(--safe-bottom)); }
}

@keyframes sheet-in {
  from { transform: translateY(60%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Tarefas nativas (aba Tarefas + listas do dia) ===== */

.task-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2, rgba(255, 255, 255, 0.18));
  background: transparent;
  color: transparent;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.task-check:hover { border-color: var(--purple-light); color: var(--purple-light); }
.task-check.done {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.cal-item.done-task { opacity: 0.65; }
.cal-item.done-task .ci-title { text-decoration: line-through; color: var(--text-dim); }

.pill.done-task { opacity: 0.55; }
.pill.done-task > span { text-decoration: line-through; }

.task-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 4px;
}
.task-actions .icon-btn { font-size: 12px; width: 26px; height: 26px; }

.cal-group.overdue h3 { color: #f87171; }
.cal-group.overdue .cal-item { border-left-color: #f87171; }
.cal-group.done-group h3 { color: var(--text-faint); }

/* ---------- Abas das colunas (kanban no mobile) ---------- */
.kanban-tabs { display: none; }

/* ---------- Quadro Kanban (aba Tarefas) ---------- */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.kanban-col {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.08));
  border-top: 3px solid var(--col-color, var(--border-light));
  border-radius: 14px;
  padding: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.kanban-col.drag-over {
  background: var(--surface-3);
  border-color: var(--purple-light);
}
.kanban-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.kanban-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--col-color, var(--purple));
}
.kanban-col-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim, #b8b8c8);
}
.kanban-col-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint);
}
.kanban-col-edit {
  margin-left: auto;
  width: 26px;
  height: 26px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.kanban-col-edit svg { width: 14px; height: 14px; }
.kanban-col:hover .kanban-col-edit { opacity: 1; }
@media (pointer: coarse) { .kanban-col-edit { opacity: 1; } }

.kanban-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 9px;
  border: 1px dashed var(--border-light, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.kanban-add svg { width: 14px; height: 14px; }
.kanban-add:hover { border-color: var(--purple); color: var(--text); }
.kanban-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 56px;
}
.kanban-empty {
  margin: 0;
  padding: 14px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
  border: 1px dashed var(--border-light, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
}
.kanban-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.08));
  border-left: 3px solid var(--card-color, var(--purple-light));
  border-radius: 10px;
  padding: 10px 11px;
  cursor: grab;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.kanban-card[style*="--card-color"] {
  background: color-mix(in srgb, var(--card-color) 9%, var(--surface-3));
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card.done-task { opacity: 0.7; }
.kanban-card.done-task .kanban-card-title { text-decoration: line-through; color: var(--text-dim); }
.kanban-card-title { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.kanban-card-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kanban-card-meta { display: flex; align-items: center; gap: 6px; }
.kanban-card-when {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purple-light);
  background: color-mix(in srgb, var(--purple-light) 14%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
}
.kanban-card-when.no-date { color: var(--text-faint); background: var(--surface-2); }
.kanban-card-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.kanban-actions-spacer { flex: 1; }
.kanban-move {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.14));
  background: var(--surface-2);
  color: var(--text-dim, #c4c4d4);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.12s ease;
}
.kanban-move svg { width: 15px; height: 15px; }
.kanban-move:hover { border-color: var(--purple-light); color: var(--purple-light); }
.kanban-card-actions .icon-btn { width: 26px; height: 26px; }
.kanban-card-actions .icon-btn svg { width: 14px; height: 14px; }

/* ---------- Subtarefas (checklist nos cards) ---------- */
.subtask-list { display: flex; flex-direction: column; gap: 5px; margin: 2px 0; }
.subtask-progress-row { display: flex; align-items: center; gap: 8px; }
.subtask-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  flex-shrink: 0;
}
.subtask-count svg { width: 12px; height: 12px; }
.subtask-progress {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.subtask-progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--card-color, var(--purple-light));
  transition: width 0.3s ease;
}
.subtask-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 3px 2px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.subtask-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--border-light);
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.12s ease;
}
.subtask-box svg { width: 11px; height: 11px; }
.subtask-item.done .subtask-box,
.subtask-box.done {
  background: var(--card-color, var(--purple));
  border-color: transparent;
}
.subtask-text { font-size: 11.5px; color: var(--text-dim); line-height: 1.3; }
.subtask-item.done .subtask-text { text-decoration: line-through; color: var(--text-faint); }

/* editor de subtarefas no modal */
.subtask-editor { display: flex; flex-direction: column; gap: 8px; }
.subtask-edit-row { display: flex; align-items: center; gap: 8px; }
.subtask-edit-row .subtask-box { width: 22px; height: 22px; border-radius: 6px; cursor: pointer; }
.subtask-edit-row .subtask-box svg { width: 13px; height: 13px; }
.subtask-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}
.subtask-input:focus { border-color: var(--purple); }
.subtask-edit-row .icon-btn { width: 30px; height: 30px; flex-shrink: 0; }
.subtask-edit-row .icon-btn svg { width: 15px; height: 15px; }

/* mobile: abas escolhem a coluna; uma coluna por vez (sem rolagem lateral) */
@media (max-width: 640px) {
  .kanban-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 4px;
    scrollbar-width: none;
  }
  .kanban-tabs::-webkit-scrollbar { display: none; }
  .kanban-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--surface-2);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .kanban-tab b {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-3);
    font-size: 10.5px;
    color: var(--text-faint);
  }
  .kanban-tab.active {
    background: var(--col-color, var(--purple));
    border-color: transparent;
    color: #fff;
  }
  .kanban-tab.active b { background: rgba(255, 255, 255, 0.25); color: #fff; }

  .kanban {
    display: block;
    overflow: visible;
    padding-bottom: 0;
  }
  /* só a coluna ativa fica visível no mobile */
  .kanban-col { display: none; }
  .kanban-col.active { display: flex; }
}

/* ---------- Modal de detalhes do hábito (estatísticas) ---------- */
.modal-stats { width: min(620px, calc(100vw - 32px)); }

.stats-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.stats-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--habit-color, var(--purple));
  background: color-mix(in srgb, var(--habit-color, var(--purple)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--habit-color, var(--purple)) 30%, transparent);
}
.stats-icon svg { width: 22px; height: 22px; }
.stats-title { min-width: 0; }
.stats-title h2 { font-size: 18px; margin: 0; letter-spacing: -0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-title p { font-size: 12.5px; color: var(--text-faint); margin: 3px 0 0; }
.stats-head .icon-btn { margin-left: auto; flex-shrink: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-grid + .stats-grid { margin-top: 10px; }
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stat-card svg { width: 16px; height: 16px; color: var(--habit-color, var(--purple)); margin-bottom: 4px; }
.stat-card b { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }

.stats-section { margin-top: 22px; }
.stats-section h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stats-section h3 span { font-size: 11px; font-weight: 500; color: var(--text-faint); text-transform: none; }

/* gráfico de linha (evolução semanal) */
.line-chart { width: 100%; height: auto; display: block; }
.line-chart .grid { stroke: var(--border); stroke-width: 1; }
.line-chart .axis { fill: var(--text-faint); font-size: 10px; font-family: inherit; }
.line-chart .line { fill: none; stroke: var(--habit-color, var(--purple)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .area { fill: color-mix(in srgb, var(--habit-color, var(--purple)) 14%, transparent); }
.line-chart circle { fill: var(--habit-color, var(--purple)); }

/* barras mensais */
.month-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.mbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; min-width: 0; }
.mbar b { font-size: 12px; font-weight: 700; }
.mbar-track { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.mbar-track span {
  width: 100%;
  min-height: 2px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--habit-color, var(--purple)), color-mix(in srgb, var(--habit-color, var(--purple)) 55%, transparent));
}
.mbar-label { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }

/* barras horizontais (dia da semana / comparativo) */
.wd-rows { display: flex; flex-direction: column; gap: 8px; }
.wd-row { display: flex; align-items: center; gap: 10px; }
.wd-label { width: 52px; flex-shrink: 0; font-size: 12px; color: var(--text-dim); }
.wd-track { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wd-track span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--habit-color, var(--purple)) 60%, transparent), var(--habit-color, var(--purple)));
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.wd-row b { width: 40px; flex-shrink: 0; text-align: right; font-size: 12px; font-weight: 700; }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .month-bars { height: 110px; gap: 6px; }
}

/* ---------- Opção "sem cor" na paleta ---------- */
.color-row button.no-color {
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), #f87171 calc(50% - 1px), #f87171 calc(50% + 1px), transparent calc(50% + 1px)),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-light);
}

/* ---------- Tarefas arquivadas (modal) ---------- */
.archive-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.archive-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.archive-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.archive-item-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-item-when { font-size: 11px; color: var(--text-faint); }
.archive-item .icon-btn { flex-shrink: 0; width: 32px; height: 32px; }

.btn-mini i { width: 14px; height: 14px; vertical-align: -2px; }
.btn-mini { display: inline-flex; align-items: center; gap: 5px; }

/* ============================================================
   Dashboard (tela inicial)
   ============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.dash-header { grid-column: 1 / -1; }
.dash-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; text-transform: capitalize; }
.dash-header p { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; text-transform: capitalize; }

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

/* visão geral: anel + estatísticas (ocupa a linha toda) */
.dash-overview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.1), var(--surface) 60%);
}
.dash-ring { flex-shrink: 0; }
.dash-ring .ring-track { stroke: var(--surface-3); }
.dash-ring .ring-fill { stroke: url(#dash-ring-grad); transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.dash-ring .ring-text { fill: var(--text); font-size: 13px; font-weight: 800; font-family: "Inter", sans-serif; }
.dash-overview-stats { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; }
.dash-ostat { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dash-ostat i { width: 17px; height: 17px; color: var(--purple-light); margin-bottom: 3px; }
.dash-ostat b { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.dash-ostat span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.25; overflow-wrap: anywhere; }

.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dash-card-title { display: flex; align-items: center; gap: 8px; }
.dash-card-title i { width: 17px; height: 17px; color: var(--purple-light); }
.dash-card-title h3 { font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.dash-card-link {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-card-link svg { width: 16px; height: 16px; }
.dash-card-link:hover { background: var(--surface-2); color: var(--purple-light); }

.dash-list { display: flex; flex-direction: column; gap: 7px; }
.dash-empty { font-size: 12.5px; color: var(--text-faint); padding: 8px 2px; }

/* item de hábito no dashboard */
.dash-habit {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: opacity 0.15s ease;
}
.dash-habit.done { opacity: 0.6; }
.dash-habit-icon { display: grid; place-items: center; color: var(--habit-color, var(--purple-light)); flex-shrink: 0; }
.dash-habit-icon svg { width: 16px; height: 16px; }
.dash-habit-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-habit.done .dash-habit-name { text-decoration: line-through; }
.dash-habit-meta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #fbbf24; flex-shrink: 0; }
.dash-habit-meta svg { width: 13px; height: 13px; }

/* botão de marcar (hábito e tarefa) no dashboard */
.dash-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: var(--surface-3);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-check svg { width: 14px; height: 14px; }
.dash-check:hover { border-color: var(--habit-color, var(--purple)); }
.dash-check.done { background: var(--habit-color, var(--purple)); border-color: transparent; }
.dash-check.partial { background: color-mix(in srgb, var(--habit-color, var(--purple)) 40%, var(--surface-3)); border-color: var(--habit-color, var(--purple)); }

/* item de tarefa no dashboard */
.dash-task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-color, transparent);
}
.dash-task-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-task-when {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purple-light);
  background: color-mix(in srgb, var(--purple-light) 14%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dash-task-when.no-date { color: var(--text-faint); background: var(--surface-3); }
.dash-task .dash-check { border-radius: 7px; }

/* agenda do dia */
.dash-agenda { grid-column: 1 / -1; }
.dash-agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border-left: 3px solid var(--pc, var(--purple-light));
}
.dash-agenda-item.clickable { cursor: pointer; transition: background 0.12s ease; }
.dash-agenda-item.clickable:hover { background: var(--surface-3); }
.dash-agenda-item.task { border-left-color: var(--purple-light); }
.dash-agenda-item.missed { opacity: 0.6; }
.dash-agenda-time { font-size: 11.5px; font-weight: 800; color: var(--purple-light); min-width: 44px; flex-shrink: 0; }
.dash-agenda-title { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-agenda-item.done .dash-agenda-time { color: var(--text-faint); }

@media (max-width: 760px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-overview { gap: 14px; min-width: 0; }
  .dash-card { min-width: 0; }
  .dash-overview-stats { gap: 9px; }
  .dash-ostat b { font-size: 16px; }
  .dash-ostat span { font-size: 9px; letter-spacing: 0.2px; }
  .dash-header h2 { font-size: 19px; }
}

@media (max-width: 380px) {
  .dash-card { padding: 14px; }
  .dash-overview { gap: 10px; }
  .dash-ostat i { margin-bottom: 1px; }
}

/* ============================================================
   Aba Infra — apresentação em slides com visual de terminal
   ============================================================ */
:root {
  --term-bg: #0a0a0f;
  --term-green: #3ddc84;
  --term-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.term-slides {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--term-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(124, 58, 237, 0.06);
  position: relative;
  height: min(620px, calc(100vh - 190px));
}
.term-slides::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(900px 260px at 50% -30%, rgba(124, 58, 237, 0.14), transparent 70%);
  z-index: 3;
}

/* barra do terminal */
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #16161f, #101016);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 4;
}
.term-dots { display: inline-flex; gap: 7px; }
.term-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }
.term-title {
  font-family: var(--term-mono);
  font-size: 12px;
  color: var(--text-dim);
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-badge {
  font-family: var(--term-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.term-badge b { font-weight: 700; color: #fff; }

/* palco do slide */
.term-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
  font-family: var(--term-mono);
}
.term-prompt { color: var(--term-green); font-weight: 700; }

.term-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px 44px;
  max-width: 100%;
  opacity: 0;
  transform: translateX(var(--enter, 28px));
  transition: opacity 0.34s ease, transform 0.34s ease;
}
.term-slide.enter-left { --enter: -28px; }
.term-slide.in { opacity: 1; transform: translateX(0); }

.slide-open {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slide-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
  margin-bottom: 18px;
}
.slide-icon svg { width: 28px; height: 28px; }

.slide-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  min-height: 32px;
}
.slide-title.typing::after {
  content: "▋";
  color: var(--purple-light);
  animation: term-blink 1s step-end infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

.slide-body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #c7c7d8;
  max-width: 640px;
}
.slide-body p { margin: 0 0 4px; }
.slide-body b { color: #fff; font-weight: 700; }
.slide-body code {
  font-family: var(--term-mono);
  background: rgba(255, 255, 255, 0.08);
  color: #ffd479;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}
.slide-gap { height: 12px; }
.slide-list { list-style: none; padding: 0; margin: 6px 0 0; }
.slide-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  animation: slide-li-in 0.4s ease both;
}
.slide-list li::before {
  content: "›";
  position: absolute;
  left: 4px;
  top: -1px;
  color: var(--purple-light);
  font-weight: 700;
  font-family: var(--term-mono);
}
@keyframes slide-li-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.slide-list li:nth-child(2) { animation-delay: 0.06s; }
.slide-list li:nth-child(3) { animation-delay: 0.12s; }
.slide-list li:nth-child(4) { animation-delay: 0.18s; }
.slide-list li:nth-child(5) { animation-delay: 0.24s; }
.slide-foot { margin-top: 18px; font-size: 14px; }
.slide-foot .term-prompt { animation: term-blink 1.1s step-end infinite; }

/* rodapé de navegação */
.term-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(16, 16, 22, 0.6);
  flex-shrink: 0;
  z-index: 4;
}
.term-navbtn {
  font-family: var(--term-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.term-navbtn:hover {
  color: var(--purple-light);
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.1);
}
.slide-dots { display: flex; gap: 8px; }
.slide-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.slide-dot:hover { background: var(--text-dim); }
.slide-dot.active {
  background: var(--purple-light);
  transform: scale(1.25);
  box-shadow: 0 0 10px var(--purple-glow);
}

@media (max-width: 600px) {
  .term-slides { height: calc(100vh - 210px); border-radius: 13px; }
  .term-title { font-size: 10.5px; }
  .term-slide { padding: 22px 22px; }
  .slide-icon { width: 46px; height: 46px; margin-bottom: 14px; }
  .slide-icon svg { width: 23px; height: 23px; }
  .slide-title { font-size: 21px; }
  .slide-body { font-size: 14.5px; }
  .term-navbtn { font-size: 11.5px; padding: 8px 11px; }
}

/* ---------- Crédito do autor na topbar ---------- */
.made-by {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--purple) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--purple) 24%, transparent);
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}
.made-by:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--purple) 45%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--purple) 22%, transparent);
}
.made-by i { width: 14px; height: 14px; color: var(--purple-light); }
.made-by b {
  font-weight: 800;
  background: linear-gradient(90deg, var(--purple-light), #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 880px) {
  .made-by span { display: none; }       /* só o ícone em telas médias */
  .made-by { padding: 7px; }
}

/* ---------- Botão de tela cheia do terminal ---------- */
.term-full-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.term-full-btn:hover {
  color: var(--purple-light);
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.12);
}
.term-full-btn i { width: 15px; height: 15px; }

/* ---------- Terminal em tela cheia ---------- */
.term.is-full {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: none;
  border: none;
  border-radius: 0;
  z-index: 200;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
.term.is-full:fullscreen { padding-top: 0; padding-bottom: 0; }
body.term-full-lock { overflow: hidden; }

/* conteúdo maior e mais "apresentável" em tela cheia */
.term.is-full .term-slide { padding: clamp(28px, 6vh, 80px) clamp(28px, 9vw, 160px); }
.term.is-full .slide-icon { width: clamp(56px, 7vw, 84px); height: clamp(56px, 7vw, 84px); }
.term.is-full .slide-icon svg { width: 50%; height: 50%; }
.term.is-full .slide-title { font-size: clamp(28px, 4.4vw, 52px); margin-bottom: 22px; }
.term.is-full .slide-body { font-size: clamp(16px, 2vw, 26px); max-width: 1000px; }
.term.is-full .slide-body .slide-list li { margin-bottom: clamp(10px, 1.6vh, 20px); }
.term.is-full .slide-open { font-size: clamp(12px, 1.3vw, 16px); margin-bottom: clamp(16px, 3vh, 34px); }

/* ============================================================
   Recursos novos: toast com ação, busca, prioridade, recorrência,
   pausado, ajustes, onboarding, drag por ponteiro, tema claro
   ============================================================ */

/* ---- Toast com botão de ação (Desfazer) ---- */
.toast { display: inline-flex; align-items: center; gap: 14px; }
.toast-action {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--purple-light);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.toast-action:hover { text-decoration: underline; }

/* ---- Caixa de busca (abas Hábitos e Tarefas) ---- */
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 6px 11px;
  color: var(--text-faint);
  transition: border-color 0.15s ease;
}
.search-box:focus-within { border-color: var(--purple); }
.search-box i { width: 14px; height: 14px; flex-shrink: 0; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 150px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-faint); }

/* ---- Prioridade e recorrência no card ---- */
.kanban-prio {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--prio, var(--purple-light));
  background: color-mix(in srgb, var(--prio, var(--purple)) 16%, transparent);
}
.kanban-card-top { display: flex; align-items: flex-start; gap: 8px; }
.kanban-recur { display: inline-grid; place-items: center; color: var(--text-faint); }
.kanban-recur svg { width: 13px; height: 13px; }

/* ---- Hábito pausado ---- */
.habit-card.paused { opacity: 0.62; }
.habit-card.paused::before { background: var(--text-faint); }
.paused-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* ---- Drag por ponteiro ---- */
.kanban-card { touch-action: pan-y; }
body.dragging-active { -webkit-user-select: none; user-select: none; cursor: grabbing; }
.kanban-card.dragging-hidden { display: none; }
.drag-clone {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  pointer-events: none;
  margin: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transform: rotate(1.5deg);
  opacity: 0.96;
}
.kanban-placeholder {
  border: 1.5px dashed var(--purple);
  background: color-mix(in srgb, var(--purple) 8%, transparent);
  border-radius: 10px;
  margin-bottom: 8px;
}

/* ---- Tela de Ajustes ---- */
.settings { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.set-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}
.set-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.set-card-head i { width: 17px; height: 17px; color: var(--purple-light); }
.set-card-head h3 { font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.set-row-label { font-size: 13.5px; color: var(--text-dim); }
.set-notify { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 4px; }

.set-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  flex-wrap: wrap;
}
.set-seg button {
  border: none;
  background: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.set-seg button.active { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 2px 10px var(--purple-glow); }

.set-email { font-size: 14px; font-weight: 700; margin-bottom: 12px; word-break: break-all; }
.set-inline { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.set-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
}
.set-input:focus { border-color: var(--purple); }
.set-btn { min-height: 40px; padding: 9px 14px; font-size: 13px; }
.set-btn.full { width: 100%; margin-top: 8px; }
.set-btn.on { color: var(--purple-light); border-color: var(--purple); }
.set-btn.danger { color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
.set-btn.danger:hover { background: rgba(248, 113, 113, 0.1); }
.set-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; margin-top: 8px; }

.set-collist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.set-col-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.set-col-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.set-col-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-col-row .icon-btn { width: 30px; height: 30px; }
.set-col-row .icon-btn svg { width: 15px; height: 15px; }
.set-col-row .icon-btn:disabled { opacity: 0.3; cursor: default; }

/* ---- Onboarding ---- */
.onboard { text-align: center; }
.onboard-logo {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 16px;
  color: var(--purple-light);
  background: color-mix(in srgb, var(--purple) 16%, transparent);
}
.onboard-logo svg { width: 28px; height: 28px; }
.onboard h2 { font-size: 20px; }
.onboard-sub { font-size: 13.5px; color: var(--text-dim); margin: 6px 0 18px; }
.onboard-list { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.onboard-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 13.5px; color: var(--text-dim); line-height: 1.4; }
.onboard-list li b { color: var(--text); }
.onboard-list li i { width: 18px; height: 18px; color: var(--purple-light); flex-shrink: 0; margin-top: 1px; }

/* ---- Link/linha extra da tela de login ---- */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 16px; }
.auth-row .remember-row { margin: 0; }
.auth-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--purple-light); padding: 0;
}
.auth-link:hover { text-decoration: underline; }

/* selects de prioridade/recorrência herdam o estilo de .field select (já existe) */

@media (max-width: 600px) {
  .set-row { gap: 8px; }

  /* cabeçalho das abas: título em cima, ações embaixo (sem cortar) */
  .tasks-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .tasks-actions { flex-wrap: wrap; gap: 8px; }
  /* busca ocupa a linha toda; botões dividem a linha seguinte */
  .tasks-actions .search-box { order: -1; flex: 1 1 100%; }
  .tasks-actions .search-box input { width: 100%; flex: 1; }
  .tasks-actions .btn-mini { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
}

/* ============================================================
   Pomodoro — botão na topbar + painel flutuante
   ============================================================ */
.pomo-btn { position: relative; }
.pomo-btn.running { color: var(--purple-light); }
.pomo-btn.running::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 35%, transparent);
  animation: pomo-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pomo-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
.pomo-pill {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  color: #fff;
  background: var(--purple);
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.3;
  box-shadow: 0 2px 8px var(--purple-glow);
  white-space: nowrap;
}

.pomo-panel {
  position: fixed;
  z-index: 60;
  top: calc(64px + var(--safe-top));
  right: calc(16px + var(--safe-right));
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  transform-origin: top right;
  animation: pomo-in 0.18s ease;
}
@keyframes pomo-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }

.pomo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pomo-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.pomo-title i { width: 16px; height: 16px; color: var(--purple-light); }
.pomo-head .icon-btn { width: 28px; height: 28px; }
.pomo-head .icon-btn i { width: 16px; height: 16px; }

.pomo-modes {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
.pomo-modes button {
  flex: 1;
  padding: 7px 4px;
  border: none;
  background: none;
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pomo-modes button:hover { color: var(--text); }
.pomo-modes button.active { background: var(--purple); color: #fff; }

.pomo-ring { position: relative; width: 180px; height: 180px; margin: 4px auto 16px; }
.pomo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomo-track { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.pomo-prog {
  fill: none;
  stroke: var(--purple);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s linear, stroke 0.25s ease;
  filter: drop-shadow(0 0 6px var(--purple-glow));
}
.pomo-panel[data-mode="short"] .pomo-prog,
.pomo-panel[data-mode="long"] .pomo-prog { stroke: #38bdf8; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5)); }
.pomo-panel[data-mode="short"] .pomo-modes button.active,
.pomo-panel[data-mode="long"] .pomo-modes button.active { background: #0ea5e9; }

.pomo-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pomo-time {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.pomo-mode-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }

.pomo-actions { display: flex; gap: 8px; align-items: center; }
.pomo-actions .btn-primary { flex: 1; }
.pomo-actions .btn-ghost {
  width: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pomo-actions .btn-ghost i { width: 17px; height: 17px; }

.pomo-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.pomo-foot i { width: 14px; height: 14px; color: var(--purple-light); }

/* no celular o painel vira uma folha que sobe de baixo */
@media (max-width: 600px) {
  .pomo-panel {
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(86px + var(--safe-bottom));
    transform: translateX(-50%);
    transform-origin: bottom center;
    width: min(340px, calc(100vw - 24px));
  }
  @keyframes pomo-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
}

/* ============================================================
   Engajamento: recap semanal, conquistas, visão do ano
   ============================================================ */

/* recap da semana */
.recap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.recap-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--surface-2); border-radius: 12px; min-width: 0; }
.recap-stat b { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.recap-stat span { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; }

/* conquistas */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ach-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: 12px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border);
  opacity: 0.5; transition: all 0.15s ease;
}
.ach-item.on { opacity: 1; border-color: color-mix(in srgb, #fbbf24 40%, transparent); background: color-mix(in srgb, #fbbf24 8%, var(--surface-2)); }
.ach-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-faint); }
.ach-item.on .ach-ico { background: color-mix(in srgb, #fbbf24 18%, transparent); color: #fbbf24; }
.ach-ico svg { width: 17px; height: 17px; }
.ach-name { font-size: 10.5px; font-weight: 700; color: var(--text-dim); line-height: 1.2; }
.ach-item.on .ach-name { color: var(--text); }
.ach-count { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; text-align: center; }

/* visão do ano (year in pixels) */
.dash-year { grid-column: 1 / -1; }
.year-grid-wrap { overflow-x: auto; padding-bottom: 4px; }
.year-grid { display: inline-flex; gap: 3px; }
.year-col { display: flex; flex-direction: column; gap: 3px; }
.year-cell {
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--cell-empty); border: 1px solid rgba(255,255,255,0.03);
  display: block;
}
.year-cell.future { visibility: hidden; }

@media (max-width: 600px) {
  .recap-grid { grid-template-columns: repeat(2, 1fr); }
  .year-cell { width: 8px; height: 8px; }
}

/* ============================================================
   Agenda Acadêmica
   ============================================================ */
.acad-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-bottom: 90px;
}
.acad-section { display: flex; flex-direction: column; gap: 12px; }
.acad-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.acad-section-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.acad-section-head h3 i { width: 17px; height: 17px; color: var(--purple-light); }
.acad-section-head .acad-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---- Grade semanal ---- */
.acad-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.acad-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  scroll-snap-align: start;
}
.acad-day.is-today { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple-glow); }
.acad-day-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.acad-day-name .acad-dow-num { color: var(--text-faint); font-weight: 600; }
.acad-day.is-today .acad-day-name { color: var(--purple-light); }
.acad-day-empty { font-size: 12px; color: var(--text-faint); padding: 6px 2px; }
.acad-block {
  --bc: var(--purple);
  text-align: left;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--bc);
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.acad-block:hover { border-color: var(--bc); }
.acad-block:active { transform: scale(0.985); }
.acad-block-code { font-size: 13px; font-weight: 700; color: var(--text); }
.acad-block-name {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acad-block-meta {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 5px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.acad-block-meta span { display: inline-flex; align-items: center; gap: 3px; }

/* ---- Cards de matérias ---- */
.subj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.subj-card {
  --sc: var(--purple);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.subj-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--sc);
}
.subj-card:hover { border-color: var(--sc); }
.subj-card-top { display: flex; align-items: center; gap: 8px; }
.subj-code {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--sc);
  border-radius: 6px;
  padding: 2px 7px;
}
.subj-turma {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  margin-left: auto;
}
.subj-name { font-size: 14px; font-weight: 600; margin-top: 9px; }
.subj-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ---- Listas (provas / trabalhos / anotações) ---- */
.acad-list { display: flex; flex-direction: column; gap: 8px; }
.acad-item {
  --ic: var(--purple);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ic);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.acad-item.is-done { opacity: 0.55; }
.acad-item-check {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  border: 1.8px solid var(--border-light);
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-top: 1px;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.acad-item-check.on { background: var(--ic); border-color: var(--ic); }
.acad-item-check i { width: 13px; height: 13px; }
.acad-item-body { flex: 1; min-width: 0; cursor: pointer; }
.acad-item-title { font-size: 14px; font-weight: 600; }
.acad-item.is-done .acad-item-title { text-decoration: line-through; }
.acad-item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-dim);
}
.acad-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
}
.acad-badge.exam { background: #ef4444; }
.acad-badge.assignment { background: #3b82f6; }
.acad-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-faint);
}
.acad-tag.subj { color: var(--ic); }
.acad-due-soon { color: #f59e0b; font-weight: 700; }
.acad-due-late { color: #ef4444; font-weight: 700; }
.acad-item-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; white-space: pre-wrap; line-height: 1.5; }

.acad-empty {
  font-size: 13px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

/* ---- Seletor de tipo (prova/trabalho/anotação): 3 colunas, sem pill móvel ---- */
.segmented.academic-kind { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.segmented.academic-kind .segmented-pill { display: none; }
.segmented.academic-kind button { border-radius: 10px; }
.segmented.academic-kind button.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 2px 14px var(--purple-glow);
}

/* ---- Editor de horários no modal de matéria ---- */
.slot-editor { display: flex; flex-direction: column; gap: 8px; }
.slot-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr auto;
  gap: 6px;
  align-items: center;
}
.slot-row select, .slot-row input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 8px 9px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.slot-row .slot-del {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}
.slot-row .slot-del:hover { color: #ef4444; }
.slot-row .slot-del i { width: 16px; height: 16px; }
.slot-empty { font-size: 12px; color: var(--text-faint); padding: 4px 0; }

/* Aulas e itens acadêmicos no calendário / dashboard (cor da matéria via --pc) */
.pill.klass { border-left: 2px solid var(--pc, var(--purple-light)); background: color-mix(in srgb, var(--pc, var(--purple)) 16%, var(--surface-2)); }
.pill.klass .st { color: var(--pc, var(--purple-light)); }
.pill.acad { border-left: 2px solid var(--pc, var(--purple-light)); background: color-mix(in srgb, var(--pc, var(--purple)) 14%, var(--surface-2)); }
.pill.acad .st { color: var(--pc, var(--purple-light)); font-style: normal; }
.cal-tg-ev.acad .tg-title { font-weight: 700; }
.cal-item.klass, .cal-item.acad { border-left-color: var(--pc, var(--purple-light)); }
.cal-item.klass .ci-status, .cal-item.acad .ci-status { color: var(--pc, var(--purple-light)); }
.dash-agenda-item.klass, .dash-agenda-item.exam, .dash-agenda-item.assignment { border-left: 3px solid var(--pc, var(--purple-light)); padding-left: 9px; }

/* ============================================================
   Command palette, badge offline, login Google
   ============================================================ */

/* badge de offline / sincronização */
.offline-badge {
  position: sticky;
  top: 0;
  z-index: 25;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #b45309, #92400e);
  padding: 6px calc(14px + var(--safe-right)) 6px calc(14px + var(--safe-left));
}

/* command palette */
.cmdk-overlay { align-items: flex-start; padding-top: 12vh; }
.cmdk {
  width: min(560px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.cmdk-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmdk-head i { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.cmdk-head input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-family: inherit; font-size: 16px; color: var(--text); }
.cmdk-head kbd { font-size: 10px; font-weight: 700; color: var(--text-faint); background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 6px; padding: 2px 6px; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: none; background: none; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer;
}
.cmdk-item i, .cmdk-item svg { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }
.cmdk-item.active, .cmdk-item:hover { background: var(--surface-2); }
.cmdk-item.active i, .cmdk-item.active svg { color: var(--purple-light); }

/* divisor "ou" e botão Google na tela de login */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }
.btn-google { gap: 10px; }
.btn-google svg { flex-shrink: 0; }

/* ---------- Pomodoro: ações do cabeçalho + edição de tempos ---------- */
.pomo-head-actions { display: flex; align-items: center; gap: 2px; }
.pomo-head-actions .icon-btn { width: 30px; height: 30px; }
.pomo-head-actions .icon-btn i { width: 16px; height: 16px; }
.pomo-edit-btn[aria-pressed="true"] { color: var(--purple-light); background: rgba(124, 58, 237, 0.12); }

.pomo-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  animation: pomo-in 0.16s ease;
}
.pomo-edit label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
}
.pomo-edit label i { font-style: normal; font-size: 10px; color: var(--text-faint); }
.pomo-edit input {
  width: 100%;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 7px 4px;
  -moz-appearance: textfield;
}
.pomo-edit input::-webkit-outer-spin-button,
.pomo-edit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pomo-edit input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }

/* ---------- Pomodoro: modo tela grande (modal grande, não fullscreen) ---------- */
.pomo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(5, 5, 9, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: pomo-fade 0.2s ease;
}
@keyframes pomo-fade { from { opacity: 0; } to { opacity: 1; } }
body.pomo-big-lock { overflow: hidden; }

.pomo-panel.big {
  position: fixed;
  z-index: 71;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-width: 92vw;
  max-height: 92vh;
  overflow-y: auto;
  padding: 30px 34px 26px;
  border-radius: 24px;
  animation: pomo-big-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes pomo-big-in { from { opacity: 0; transform: translate(-50%, -48%) scale(0.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.pomo-panel.big .pomo-title { font-size: 17px; }
.pomo-panel.big .pomo-modes { margin-bottom: 22px; }
.pomo-panel.big .pomo-modes button { padding: 11px 4px; font-size: 14px; }
.pomo-panel.big .pomo-ring { width: min(300px, 70vw); height: min(300px, 70vw); margin: 8px auto 24px; }
.pomo-panel.big .pomo-time { font-size: clamp(48px, 12vw, 72px); }
.pomo-panel.big .pomo-mode-label { font-size: 15px; }
.pomo-panel.big .pomo-track,
.pomo-panel.big .pomo-prog { stroke-width: 5.5; }
.pomo-panel.big .pomo-actions { gap: 10px; }
.pomo-panel.big .pomo-actions .btn { padding: 15px; font-size: 16px; }
.pomo-panel.big .pomo-actions .btn-ghost { width: 54px; }
.pomo-panel.big .pomo-foot { font-size: 13.5px; margin-top: 18px; }
.pomo-panel.big .pomo-edit { margin: 0 auto 18px; max-width: 420px; }
.pomo-panel.big .pomo-edit input { font-size: 22px; }

@media (max-width: 600px) {
  .pomo-panel.big {
    width: 94vw;
    top: 50%;
    bottom: auto;
    border-radius: 22px;
  }
  @keyframes pomo-big-in { from { opacity: 0; transform: translate(-50%, -46%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
}

/* ---- Card Acadêmico no dashboard ---- */
.dash-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0 8px;
}
.dash-academic .dash-list + .dash-sub { margin-top: 14px; }
.dash-task-when.late { color: #f87171; background: color-mix(in srgb, #f87171 14%, transparent); }
.dash-agenda-item.klass { border-left-color: var(--pc, #6366f1); }
