/* ============================================================
   DOPAMINA — Sistema Gameficado
   Tema: Neon dopamina (roxo / rosa / ciano) sobre noite profunda
   Mobile-first, PWA-ready
   ============================================================ */

:root {
  --bg-0: #07071a;
  --bg-1: #0d0d24;
  --bg-2: #14143a;
  --bg-card: rgba(20, 20, 58, 0.78);
  --bg-card-solid: #14143a;
  --border: rgba(168, 85, 247, 0.25);
  --border-strong: rgba(168, 85, 247, 0.55);

  --neon-pink: #f472b6;
  --neon-purple: #a855f7;
  --neon-cyan: #22d3ee;
  --neon-amber: #fbbf24;
  --neon-green: #34d399;
  --neon-red: #f87171;

  --txt-1: #f5f3ff;
  --txt-2: #c4b5fd;
  --txt-3: #8b87b8;
  --txt-mute: #6b6b8c;

  --grad-main: linear-gradient(135deg, #f472b6 0%, #a855f7 50%, #6366f1 100%);
  --grad-vault: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  --grad-mission: linear-gradient(135deg, #f87171 0%, #a855f7 100%);
  --grad-sticker: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
  --grad-dice: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
  --grad-paper: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);

  --shadow-neon: 0 0 24px rgba(168, 85, 247, 0.35), 0 0 60px rgba(244, 114, 182, 0.15);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, #1e1b4b 0%, #07071a 60%, #000 100%);
  background-attachment: fixed;
  color: var(--txt-1);
  line-height: 1.4;
  font-size: 16px;
  padding-top: var(--safe-top);
  padding-bottom: calc(80px + var(--safe-bot));
  min-height: 100vh;
  overflow-x: hidden;
}

/* Stars / particles ambient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(244, 114, 182, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(34, 211, 238, 0.25), transparent),
    radial-gradient(2px 2px at 40% 80%, rgba(168, 85, 247, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(251, 191, 36, 0.2), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: var(--safe-top);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(7, 7, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 18px;
}
.app-header .brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(168,85,247,0.6)); }
.app-header .brand .title {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.app-header .spacer { flex: 1; }
.app-header .day-points {
  font-size: 12px;
  color: var(--txt-2);
  text-align: right;
}
.app-header .day-points strong {
  display: block;
  font-size: 20px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ===== Main / Views ===== */
main {
  position: relative;
  z-index: 1;
  padding: 18px 16px 24px;
  max-width: 720px;
  margin: 0 auto;
}
.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card.glow { box-shadow: var(--shadow-card), var(--shadow-neon); border-color: var(--border-strong); }
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--txt-2);
  margin-bottom: 12px;
  font-weight: 700;
}
.card-title img { width: 24px; height: 24px; }

/* ===== Hero Dashboard ===== */
.hero {
  position: relative;
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 20%, rgba(244,114,182,0.25), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(34,211,238,0.2), transparent 50%),
    linear-gradient(160deg, #1e1b4b 0%, #0d0d24 100%);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  margin-bottom: 16px;
}
.hero .brain-bg {
  position: absolute;
  right: -30px;
  top: -20px;
  width: 220px;
  opacity: 0.18;
  pointer-events: none;
}
.hero h1 {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hero .big-points {
  font-size: 56px;
  font-weight: 900;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: -2px;
}
.hero .points-suffix { font-size: 18px; color: var(--txt-2); margin-left: 6px; }
.hero .conversion {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero .chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--txt-2);
}
.hero .chip strong { color: var(--txt-1); margin-left: 4px; }

/* Stat row */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.stat .label { font-size: 11px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 1px; }
.stat .val { font-size: 22px; font-weight: 800; margin-top: 4px; }
.stat .sub { font-size: 11px; color: var(--txt-mute); margin-top: 2px; }
.stat.pink .val { color: var(--neon-pink); }
.stat.cyan .val { color: var(--neon-cyan); }
.stat.amber .val { color: var(--neon-amber); }
.stat.purple .val { color: var(--neon-purple); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--txt-1);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--grad-main);
  border: none;
  color: white;
  box-shadow: 0 4px 20px rgba(168,85,247,0.45);
}
.btn.secondary { background: rgba(168, 85, 247, 0.18); border-color: var(--border-strong); }
.btn.danger { background: rgba(248, 113, 113, 0.18); border-color: rgba(248,113,113,0.45); color: var(--neon-red); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.full { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Forms ===== */
input, select, textarea {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--txt-1);
  font-size: 15px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}
label { display: block; font-size: 12px; color: var(--txt-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.form-row { display: grid; gap: 10px; margin-bottom: 10px; }
.form-row.two { grid-template-columns: 1fr 1fr; }

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* number of items adjusted dynamically — current: 6 */
  background: rgba(7, 7, 26, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + var(--safe-bot));
  z-index: 100;
}
.bottom-nav button {
  background: none;
  border: none;
  color: var(--txt-3);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.bottom-nav button img { width: 22px; height: 22px; opacity: 0.65; transition: opacity 0.2s, filter 0.2s; }
.bottom-nav button.active { color: var(--neon-pink); background: rgba(244,114,182,0.12); }
.bottom-nav button.active img { opacity: 1; filter: drop-shadow(0 0 6px rgba(244,114,182,0.65)); }

/* ===== Missions ===== */
.filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--txt-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill.active { background: var(--grad-main); border: none; color: white; }

.mission-list { display: flex; flex-direction: column; gap: 8px; }
.mission-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.15s;
}
.mission-item.done { opacity: 0.45; text-decoration: line-through; }
.mission-item .check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: transparent;
}
.mission-item.done .check {
  background: var(--grad-main);
  border-color: transparent;
  color: white;
}
.mission-item .meta { flex: 1; min-width: 0; }
.mission-item .name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mission-item .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.mission-item .tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(168,85,247,0.18);
  color: var(--txt-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mission-item .tag.prio-Alta, .mission-item .tag.prio-URGENTE { background: rgba(248,113,113,0.22); color: #fca5a5; }
.mission-item .tag.prio-Média { background: rgba(251,191,36,0.2); color: #fcd34d; }
.mission-item .tag.prio-Baixa { background: rgba(34,211,238,0.18); color: #67e8f9; }
.mission-item .tag.prio-Evidência { background: rgba(244,114,182,0.18); color: #fbcfe8; }
.mission-item .tag.prio-Stand-By { background: rgba(107,114,128,0.25); color: #d1d5db; }
.mission-item .pts {
  font-weight: 800;
  color: var(--neon-amber);
  font-size: 14px;
}

/* ===== Vault ===== */
.vault-pie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.vault-slice {
  border-radius: var(--radius);
  padding: 14px;
  color: white;
  position: relative;
  overflow: hidden;
}
.vault-slice .pct { font-size: 11px; opacity: 0.85; letter-spacing: 1px; text-transform: uppercase; }
.vault-slice .name { font-size: 14px; font-weight: 700; margin-top: 2px; }
.vault-slice .val { font-size: 22px; font-weight: 900; margin-top: 8px; }
.vault-slice .sub { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.vault-slice.daily   { background: linear-gradient(135deg, #6366f1, #1e3a8a); }
.vault-slice.charity { background: linear-gradient(135deg, #34d399, #065f46); }
.vault-slice.super   { background: linear-gradient(135deg, #f472b6, #831843); }
.vault-slice.reserve { background: linear-gradient(135deg, #fbbf24, #92400e); }

/* ===== Stickers ===== */
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sheet {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.sheet img { width: 48px; height: 48px; }
.sheet .qty { font-size: 28px; font-weight: 900; color: var(--neon-amber); }
.sheet .name { font-size: 12px; color: var(--txt-2); }
.sheet .controls { display: flex; gap: 6px; margin-top: 8px; }
.sheet .controls button { flex: 1; }

/* ===== Roleta / Random Multiplier ===== */
.roleta-wrap { text-align: center; padding: 22px 12px; }
.roleta-display {
  font-size: 72px;
  font-weight: 900;
  background: var(--grad-dice);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -2px;
  line-height: 1;
  margin: 16px 0 4px;
  min-height: 84px;
  transition: filter 0.1s;
}
.roleta-display.spinning { filter: blur(2px); }
.roleta-sub { color: var(--txt-2); font-size: 13px; margin-bottom: 16px; }
.roleta-history {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.roleta-history span {
  background: rgba(168,85,247,0.18);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--txt-2);
}

/* ===== Papel / Diário ===== */
.day-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.day-row .date { font-size: 13px; color: var(--txt-2); font-weight: 600; }
.day-row .pts { font-size: 18px; font-weight: 800; color: var(--neon-amber); }
.day-row .br { font-size: 11px; color: var(--neon-green); display: block; text-align: right; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--safe-bot));
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-1);
  box-shadow: 0 8px 32px rgba(168,85,247,0.4);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.celebrate {
  background: var(--grad-main);
  border: none;
  color: white;
}

/* ===== Empty state ===== */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--txt-3);
}
.empty img { width: 80px; opacity: 0.45; margin-bottom: 10px; }

/* ===== Confetti particles ===== */
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(-200px) rotate(360deg); opacity: 0; }
}
.particle {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 150;
  animation: floatUp 1.4s ease-out forwards;
}

/* ===== Settings ===== */
details.setting-group { margin-bottom: 10px; }
details.setting-group summary {
  cursor: pointer;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  font-weight: 600;
}
details.setting-group summary::-webkit-details-marker { display: none; }
details.setting-group[open] summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom-color: transparent; }
details.setting-group .content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px;
}

/* ===== Goal bar ===== */
.goal-card { position: relative; overflow: hidden; }
.goal-card.maxed {
  border-color: var(--neon-green);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.4), var(--shadow-card);
}
.goal-card.maxed::after {
  content: '🎉 META BATIDA';
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--neon-green), #059669);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.goal-bar {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(.22,.61,.36,1);
  position: relative;
  animation: gradientShift 3s ease-in-out infinite;
}
.goal-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.2s linear infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== Sync badge ===== */
.sync-badge {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--txt-3);
  cursor: pointer;
  margin-left: 8px;
  font-family: inherit;
  transition: all 0.2s;
}
.sync-badge.synced { color: var(--neon-green); border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); }
.sync-badge.syncing { color: var(--neon-cyan); border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.1); }
.sync-badge.sync { color: var(--neon-purple); }
.sync-badge.offline { color: var(--txt-mute); }

/* ===== FAB ===== */
.fab {
  position: fixed;
  right: 20px;
  bottom: calc(80px + var(--safe-bot));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-main);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(168,85,247,0.5);
  z-index: 95;
  transition: transform 0.25s cubic-bezier(.22,.61,.36,1), box-shadow 0.2s;
  font-family: inherit;
}
.fab:active { transform: scale(0.92); }
.fab.open { transform: rotate(45deg); }

.fab-menu {
  position: fixed;
  right: 20px;
  bottom: calc(150px + var(--safe-bot));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 94;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transform-origin: bottom right;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(.22,.61,.36,1);
}
.fab-menu.open { pointer-events: auto; opacity: 1; transform: translateY(0) scale(1); }
.fab-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 10px 16px 10px 12px;
  color: var(--txt-1);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.fab-menu button .emoji { font-size: 20px; }
.fab-menu button:active { transform: scale(0.96); }

/* ===== Command Palette ===== */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 400;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
}
.cmd-overlay.show { display: flex; animation: fadeIn 0.15s; }
.cmd-palette {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), var(--shadow-neon);
  overflow: hidden;
}
#cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 20px;
  font-size: 16px;
  color: var(--txt-1);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
#cmd-input:focus { box-shadow: none; outline: none; }
.cmd-results {
  max-height: 50vh;
  overflow-y: auto;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-size: 14px;
}
.cmd-item.active { background: rgba(168,85,247,0.18); border-left-color: var(--neon-purple); }
.cmd-item .ico { font-size: 20px; flex-shrink: 0; }
.cmd-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item .badge { font-size: 10px; padding: 2px 6px; background: rgba(255,255,255,0.08); border-radius: 4px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 0.5px; }
.cmd-hint { padding: 10px 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--txt-mute); text-align: center; }

/* ===== Timer bar (sticky bottom above nav) ===== */
.timer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(70px + var(--safe-bot));
  background: linear-gradient(135deg, #1e1b4b, #4c1d95);
  border-top: 1px solid var(--neon-pink);
  border-bottom: 1px solid var(--neon-purple);
  z-index: 90;
  box-shadow: 0 -8px 30px rgba(244,114,182,0.25);
  transition: transform 0.3s;
}
.timer-bar.hidden { transform: translateY(120%); }
.timer-bar-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.timer-bar-time {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 76px;
}
.timer-bar-info { flex: 1; min-width: 0; }
.timer-bar-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timer-bar-target { font-size: 10px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 1px; }
.timer-bar-actions { display: flex; gap: 4px; }
.timer-bar-actions .btn { padding: 6px 10px; min-width: auto; }
.timer-bar-progress {
  height: 4px;
  background: rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.timer-bar-progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  width: 0%;
  transition: width 0.5s;
}
.timer-bar-progress > div.over {
  background: linear-gradient(90deg, var(--neon-red), #b91c1c);
  width: 100% !important;
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.mission-timer-btn, .mission-sub-btn {
  background: rgba(168,85,247,0.18) !important;
  border-color: var(--border-strong) !important;
  font-size: 16px !important;
  padding: 4px 10px !important;
}

.mission-wrap {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}
.mission-wrap .mission-item { touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; }
.swipe-actions {
  position: absolute;
  right: 4px;
  top: 4px;
  height: calc(100% - 8px);
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 1;
}
.swipe-actions .btn { padding: 8px 10px; font-size: 12px; }

/* ===== Header level / XP ===== */
.hdr-level {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-left: 12px;
  padding: 4px 10px 4px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.15s;
}
.hdr-level:active { background: rgba(168,85,247,0.18); }
.hdr-level-icon {
  font-size: 22px;
  line-height: 1;
}
.hdr-level-info { min-width: 0; }
.hdr-level-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--txt-2);
  line-height: 1.1;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.hdr-level-bar {
  width: 60px;
  height: 4px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  margin-top: 3px;
  overflow: hidden;
}
.hdr-level-bar > div {
  height: 100%;
  background: var(--grad-main);
  border-radius: 999px;
  transition: width 0.4s;
  width: 0;
}

/* Modal de detalhe de nível */
.lvl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.lvl-row.unlocked { background: rgba(168,85,247,0.10); }
.lvl-row.locked { opacity: 0.4; }
.lvl-row.current { background: var(--grad-main); }
.lvl-row.current * { color: white !important; }
.sub-panel {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -10px;
  padding: 10px 12px;
}
.sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.sub-row.done .name { text-decoration: line-through; opacity: 0.5; }
.sub-row .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.sub-row.done .check { background: var(--grad-main); border-color: transparent; color: white; }
.sub-row .name { flex: 1; font-size: 13px; }
.sub-row .sub-input { flex: 1; }
.sub-add { padding-top: 8px; border-top: 1px dashed var(--border); }

/* ===== Drawer (More menu) ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  transition: opacity 0.25s;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #14143a 0%, #0d0d24 100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--border-strong);
  border-bottom: none;
  padding: 14px 16px calc(20px + var(--safe-bot));
  z-index: 260;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.55);
  max-height: 80vh;
  overflow-y: auto;
}
.drawer.show { transform: translateY(0); }
.drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 12px;
}
.drawer-title {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--txt-3);
  text-align: center;
  margin-bottom: 12px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--txt-1);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
  transition: background 0.15s, transform 0.1s;
}
.drawer-item:active { transform: scale(0.98); background: rgba(168,85,247,0.18); }
.drawer-item .emoji { font-size: 26px; }
.drawer-item strong { font-size: 14px; display: block; }
.drawer-item small { font-size: 11px; color: var(--txt-3); display: block; margin-top: 2px; }

/* ===== Operations ===== */
.op-card { transition: border-color 0.3s; }
.op-card.completed { border-color: var(--neon-green); box-shadow: 0 0 24px rgba(52,211,153,0.25), var(--shadow-card); }
.op-card.completed::after {
  content: '✓ COMPLETA';
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--neon-green);
  color: #042f1c;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.op-card { position: relative; }
.ataque-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  margin-bottom: 4px;
}
.ataque-row.done { opacity: 0.5; }
.ataque-row.done .name { text-decoration: line-through; }
.ataque-row .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  color: transparent;
}
.ataque-row.done .check {
  background: var(--grad-main);
  border-color: transparent;
  color: white;
}
.ataque-row .name { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ataque-row .pts { font-size: 12px; font-weight: 800; color: var(--neon-amber); }

/* ===== Notes / Mood picker ===== */
.note-card { position: relative; }
.mood-pick {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 0;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  font-family: inherit;
}
.mood-pick:active { transform: scale(0.95); }
.mood-pick.active {
  background: rgba(168,85,247,0.22);
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px rgba(168,85,247,0.4);
}

/* ===== Roles ===== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.role-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--role-color, var(--neon-purple));
}
.role-card .icon { font-size: 28px; margin-bottom: 6px; }
.role-card .name { font-weight: 700; font-size: 14px; color: var(--txt-1); }
.role-card .pts { font-size: 24px; font-weight: 900; color: var(--role-color, var(--neon-purple)); margin-top: 6px; }
.role-card .sub { font-size: 11px; color: var(--txt-mute); margin-top: 2px; }
.role-card .bar {
  margin-top: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.role-card .bar > div {
  height: 100%;
  background: var(--role-color, var(--neon-purple));
  transition: width 0.4s;
}

/* ===== Achievements ===== */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ach-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  position: relative;
  transition: transform 0.15s;
}
.ach-card.locked { opacity: 0.35; filter: saturate(0.3); }
.ach-card .icon { font-size: 42px; line-height: 1; margin-bottom: 6px; }
.ach-card .name { font-weight: 700; font-size: 13px; color: var(--txt-1); }
.ach-card .desc { font-size: 11px; color: var(--txt-3); margin-top: 4px; line-height: 1.3; }
.ach-card.unlocked::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  background: var(--grad-main);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}

/* ===== Templates Super-Missão ===== */
.tpl-grid { display: flex; flex-direction: column; gap: 8px; }
.tpl-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.tpl-card:hover { background: rgba(168,85,247,0.10); border-color: var(--border-strong); }
.tpl-card:active { transform: scale(0.99); }
.tpl-icon { font-size: 28px; flex-shrink: 0; }
.tpl-info { flex: 1; min-width: 0; }
.tpl-name { font-weight: 700; font-size: 14px; }
.tpl-meta { font-size: 11px; color: var(--txt-3); margin-top: 2px; }
.tpl-desc { font-size: 12px; color: var(--txt-2); margin-top: 4px; }
.tpl-use { flex-shrink: 0; }

/* ===== Super-missões ===== */
.super-card { position: relative; }
.super-card.completed {
  border-color: var(--neon-green);
  background: linear-gradient(135deg, rgba(52,211,153,0.08), var(--bg-card));
}
.super-card.completed::after {
  content: '✓ COMPLETA';
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--neon-green);
  color: #042f1c;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}

/* ===== Time Bank ===== */
.time-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.tb-credit {
  background: rgba(34,211,238,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tb-credit .tb-icon { font-size: 28px; }
.tb-credit .tb-name { font-size: 11px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 1px; }
.tb-credit .tb-mins { font-size: 18px; font-weight: 800; color: var(--neon-cyan); }
.tb-credit .btn { width: 100%; }

.tb-spend-row {
  display: grid;
  grid-template-columns: 40px 1fr 70px auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.tb-spend-row .tb-icon { font-size: 22px; text-align: center; }
.tb-spend-row .tb-name { font-size: 13px; font-weight: 600; }
.tb-spend-row .tb-cost { font-size: 10px; color: var(--txt-3); }
.tb-spend-row .tb-qty { width: 100%; padding: 6px 8px; font-size: 12px; }
.tb-spend-row .btn { font-size: 11px; padding: 5px 8px; }

/* ===== Modo Apresentação ===== */
body.presentation-mode .hero .big-points,
body.presentation-mode .chip strong,
body.presentation-mode .stat-grid .stat.cyan .val,
body.presentation-mode .vault-slice .val,
body.presentation-mode .day-row .br,
body.presentation-mode .role-card .sub,
body.presentation-mode #vault-total,
body.presentation-mode #rewards-balance,
body.presentation-mode .role-card .pts,
body.presentation-mode .pts:not(.tag),
body.presentation-mode #calc-current,
body.presentation-mode #calc-missing,
body.presentation-mode #calc-target,
body.presentation-mode .ataque-row .pts {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
body.presentation-mode .hero .big-points:hover,
body.presentation-mode .vault-slice:hover .val,
body.presentation-mode .stat:hover .val { filter: blur(0); transition: filter 0.3s; }

/* Keyboard styling */
kbd {
  background: rgba(168,85,247,0.18);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-pink);
  letter-spacing: 0;
}

/* ===== Quote card ===== */
.quote-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(244,114,182,0.12), rgba(168,85,247,0.08));
  border: 1px solid var(--border);
  border-left: 4px solid var(--neon-pink);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.quote-icon { font-size: 28px; flex-shrink: 0; }
.quote-content { flex: 1; min-width: 0; }
.quote-text {
  font-size: 14px;
  font-style: italic;
  color: var(--txt-1);
  line-height: 1.4;
  transition: opacity 0.2s;
}
.quote-author {
  font-size: 11px;
  color: var(--txt-3);
  margin-top: 4px;
  font-weight: 600;
}

/* ===== Log ===== */
.log-row {
  display: grid;
  grid-template-columns: 50px 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.log-time { font-size: 11px; color: var(--txt-mute); font-variant-numeric: tabular-nums; }
.log-icon { font-size: 18px; }
.log-msg { color: var(--txt-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-pts { font-size: 12px; font-weight: 700; color: var(--neon-amber); }
.log-pts:not([data-positive]) { color: var(--neon-amber); }

/* ===== Onboarding ===== */
.onboarding {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.onboarding.show { display: flex; animation: fadeIn 0.3s; }
.ob-card {
  background: linear-gradient(135deg, #14143a, #1e1b4b);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 30px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(168,85,247,0.4);
}
.ob-progress {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.ob-progress #ob-progress-dots {
  display: flex;
  gap: 6px;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.ob-dot.active {
  background: var(--neon-pink);
  width: 24px;
  border-radius: 4px;
}
.ob-content { text-align: center; min-height: 200px; }
.ob-icon { font-size: 64px; line-height: 1; margin-bottom: 16px; }
.ob-title {
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.ob-body {
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.6;
  padding: 0 8px;
}
.ob-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  gap: 12px;
}
.ob-actions .btn.primary { flex: 1; }

/* ===== Hábitos ===== */
.habit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--habit-color, #34d399);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: background 0.2s;
}
.habit-card.done {
  background: linear-gradient(90deg, rgba(52,211,153,0.18), var(--bg-card));
  border-left-color: var(--neon-green);
}
.habit-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.habit-info { flex: 1; min-width: 0; }
.habit-name { font-weight: 700; font-size: 15px; }
.habit-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--txt-3);
  margin-top: 4px;
  flex-wrap: wrap;
}
.habit-week {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.habit-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
}
.habit-dot.done { background: var(--habit-color, var(--neon-green)); box-shadow: 0 0 4px var(--habit-color, var(--neon-green)); }
.habit-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.habit-actions .habit-check {
  min-width: 44px;
  height: 44px;
  font-size: 22px;
  border-radius: 50%;
  padding: 0;
}
.habit-actions .habit-check:disabled {
  background: var(--neon-green);
  opacity: 1;
}

/* ===== Calendário mensal ===== */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  font-size: 10px;
  text-align: center;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
  padding: 4px;
}
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell:not(.empty):hover { transform: scale(1.05); border-color: var(--border-strong); }
.cal-cell.today {
  border-color: var(--neon-pink);
  box-shadow: 0 0 8px rgba(244,114,182,0.4);
}
.cal-cell.intensity-1 { background: rgba(168,85,247,0.20); }
.cal-cell.intensity-2 { background: rgba(168,85,247,0.45); }
.cal-cell.intensity-3 { background: rgba(168,85,247,0.70); }
.cal-cell.intensity-4 { background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); }
.cal-day { font-size: 13px; font-weight: 700; color: var(--txt-1); }
.cal-pts { font-size: 9px; color: var(--txt-2); margin-top: 1px; }
.cal-cell.intensity-3 .cal-day, .cal-cell.intensity-4 .cal-day,
.cal-cell.intensity-3 .cal-pts, .cal-cell.intensity-4 .cal-pts { color: white; }
.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  font-size: 10px;
  color: var(--txt-3);
  margin-top: 10px;
}

/* ===== Modo Foco (Pomodoro full-screen) ===== */
.focus-fullscreen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #000 100%);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  flex-direction: column;
}
.focus-fullscreen.show { display: flex; animation: fadeIn 0.35s; }
.focus-fullscreen[data-phase="break"] { background: radial-gradient(circle at 50% 50%, #064e3b 0%, #000 100%); }
.focus-fullscreen[data-phase="longBreak"] { background: radial-gradient(circle at 50% 50%, #1e3a8a 0%, #000 100%); }
.focus-content { text-align: center; position: relative; }
.focus-phase {
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 800;
  color: var(--neon-pink);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.focus-fullscreen[data-phase="break"] .focus-phase { color: var(--neon-green); }
.focus-fullscreen[data-phase="longBreak"] .focus-phase { color: var(--neon-cyan); }
.focus-clock {
  font-size: clamp(72px, 22vw, 180px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 0.9;
  letter-spacing: -4px;
}
.focus-fullscreen[data-phase="break"] .focus-clock { background: linear-gradient(135deg, var(--neon-green), #059669); -webkit-background-clip: text; background-clip: text; }
.focus-fullscreen[data-phase="longBreak"] .focus-clock { background: linear-gradient(135deg, var(--neon-cyan), #1d4ed8); -webkit-background-clip: text; background-clip: text; }
.focus-cycle {
  font-size: 14px;
  color: var(--txt-3);
  margin: 14px 0 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.focus-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.focus-progress-ring {
  position: absolute;
  inset: -40px;
  pointer-events: none;
  z-index: -1;
}
.focus-progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.focus-progress-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 4;
}
.focus-progress-fill {
  fill: none;
  stroke: var(--neon-pink);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s linear;
}
.focus-fullscreen[data-phase="break"] .focus-progress-fill { stroke: var(--neon-green); }
.focus-fullscreen[data-phase="longBreak"] .focus-progress-fill { stroke: var(--neon-cyan); }

/* ===== Weekday/Stats bars ===== */
.weekday-bars { display: flex; flex-direction: column; gap: 6px; }
.wd-row {
  display: grid;
  grid-template-columns: 40px 1fr 70px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.wd-name { color: var(--txt-2); font-weight: 600; }
.wd-bar {
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.wd-bar > div {
  height: 100%;
  background: var(--grad-main);
  border-radius: 999px;
  transition: width 0.4s;
}
.wd-val { color: var(--txt-3); font-size: 11px; text-align: right; }

/* ===== Heatmap (90 dias) ===== */
.heatmap {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 3px;
  margin-bottom: 10px;
}
.hm-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: transform 0.1s;
  border: 1px solid rgba(255,255,255,0.03);
}
.hm-cell[data-intensity="1"] { background: rgba(168,85,247,0.20); }
.hm-cell[data-intensity="2"] { background: rgba(168,85,247,0.45); }
.hm-cell[data-intensity="3"] { background: rgba(168,85,247,0.70); }
.hm-cell[data-intensity="4"] { background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); box-shadow: 0 0 6px rgba(244,114,182,0.5); }
.hm-cell:hover { transform: scale(1.2); z-index: 1; position: relative; }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  font-size: 10px;
  color: var(--txt-3);
}
.hm-key {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--c, transparent);
}

/* ===== Chart (bar chart) ===== */
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 120px;
  padding: 12px 0;
  margin-top: 8px;
}
.chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 0.4s;
}
.chart .bar.empty { background: rgba(255,255,255,0.06); }
.chart .bar .label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--txt-mute);
  white-space: nowrap;
}
.chart-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--txt-3);
  margin-top: 24px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s; }
.modal-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), var(--shadow-neon);
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.modal-field label {
  font-size: 11px;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  display: block;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions .btn { min-width: 100px; }

/* ===== Responsive tweaks ===== */
@media (min-width: 600px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .vault-pie { grid-template-columns: repeat(4, 1fr); }
  .sheet-grid { grid-template-columns: repeat(3, 1fr); }
}
