/* =========================================================
   Cofre — visual inspirado no macOS
   ========================================================= */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --sep: rgba(0, 0, 0, .08);
  --sep-strong: rgba(0, 0, 0, .14);
  --window: rgba(246, 246, 248, .78);
  --content: rgba(255, 255, 255, .72);
  --sidebar: rgba(236, 236, 240, .55);
  --card: rgba(255, 255, 255, .82);
  --card-hover: rgba(255, 255, 255, .95);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --glass: rgba(255, 255, 255, .52);
  --glass-border: rgba(255, 255, 255, .6);
  --menubar: rgba(255, 255, 255, .45);
  --shadow-window: 0 0 0 .5px rgba(0,0,0,.18), 0 30px 80px -10px rgba(0,0,0,.35), 0 12px 30px -8px rgba(0,0,0,.18);
  --shadow-card: 0 0 0 .5px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.05), 0 4px 14px -6px rgba(0,0,0,.08);

  --green: #28c840;
  --green-text: #1b9e31;
  --red: #ff3b30;
  --red-text: #e0352b;
  --yellow: #ffbd2e;
  --orange: #ff9500;

  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, .14);

  --r-window: 14px;
  --r-card: 14px;
  --r-ctl: 8px;
  --blur: saturate(180%) blur(40px);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

:root[data-theme="dark"] {
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --sep: rgba(255, 255, 255, .08);
  --sep-strong: rgba(255, 255, 255, .14);
  --window: rgba(30, 30, 34, .72);
  --content: rgba(28, 28, 32, .62);
  --sidebar: rgba(44, 44, 50, .45);
  --card: rgba(58, 58, 64, .55);
  --card-hover: rgba(70, 70, 78, .65);
  --fill: rgba(120, 120, 128, .24);
  --fill-2: rgba(120, 120, 128, .34);
  --glass: rgba(40, 40, 46, .5);
  --glass-border: rgba(255, 255, 255, .12);
  --menubar: rgba(20, 20, 24, .4);
  --shadow-window: 0 0 0 .5px rgba(255,255,255,.12), 0 30px 80px -10px rgba(0,0,0,.7), 0 12px 30px -8px rgba(0,0,0,.5);
  --shadow-card: 0 0 0 .5px rgba(255,255,255,.07), 0 4px 14px -6px rgba(0,0,0,.4);
  --green-text: #32d74b;
  --red-text: #ff6961;
}

/* Cores de destaque (igual Ajustes → Aparência do macOS) */
[data-accent="blue"]     { --accent: #007aff; --accent-soft: rgba(0,122,255,.16); }
[data-accent="purple"]   { --accent: #a550e0; --accent-soft: rgba(165,80,224,.16); }
[data-accent="pink"]     { --accent: #f0457d; --accent-soft: rgba(240,69,125,.16); }
[data-accent="red"]      { --accent: #ff3b30; --accent-soft: rgba(255,59,48,.16); }
[data-accent="orange"]   { --accent: #f58a07; --accent-soft: rgba(245,138,7,.16); }
[data-accent="yellow"]   { --accent: #e5aa00; --accent-soft: rgba(229,170,0,.18); }
[data-accent="green"]    { --accent: #28b440; --accent-soft: rgba(40,180,64,.16); }
[data-accent="graphite"] { --accent: #8e8e93; --accent-soft: rgba(142,142,147,.2); }

.c-blue{--c:#007aff}.c-purple{--c:#a550e0}.c-pink{--c:#f0457d}.c-red{--c:#ff3b30}
.c-orange{--c:#f58a07}.c-yellow{--c:#e5aa00}.c-green{--c:#28b440}.c-graphite{--c:#8e8e93}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: #0b0b10;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: default; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- Wallpaper ---------------- */
.wallpaper {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(160deg, #fbd27a 0%, #f6a04d 30%, #e0607e 58%, #6a5bd6 82%, #2a3a8f 100%);
}
.wallpaper i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75;
  animation: drift 28s ease-in-out infinite alternate;
}
.wallpaper i:nth-child(1) { width: 60vmax; height: 60vmax; left: -15vmax; top: -20vmax; background: #ffe29a; }
.wallpaper i:nth-child(2) { width: 50vmax; height: 50vmax; right: -12vmax; top: 5vmax; background: #ff7a6b; animation-delay: -8s; }
.wallpaper i:nth-child(3) { width: 55vmax; height: 55vmax; left: 15vmax; bottom: -30vmax; background: #6b6bff; animation-delay: -14s; }
.wallpaper i:nth-child(4) { width: 30vmax; height: 30vmax; right: 20vmax; bottom: -5vmax; background: #ffb36b; animation-delay: -20s; opacity: .5; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

#root { position: relative; z-index: 1; height: 100%; }

/* ---------------- Botões / controles ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: var(--r-ctl);
  background: var(--card); box-shadow: 0 0 0 .5px var(--sep-strong), 0 1px 1px rgba(0,0,0,.04);
  font-weight: 500; white-space: nowrap; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15), inset 0 .5px 0 rgba(255,255,255,.25); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.danger { color: var(--red-text); }
.btn.lg { height: 38px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .12s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

.seg {
  display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); position: relative; gap: 0;
}
.seg button {
  position: relative; z-index: 1; height: 24px; padding: 0 12px; border-radius: 7px;
  font-weight: 500; color: var(--text-2); transition: color .2s;
}
.seg button[aria-pressed="true"] { color: var(--text); background: var(--card-hover); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px var(--sep); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: rgba(110,110,118,.6); }
.seg.lg button { height: 30px; padding: 0 16px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-2); padding-left: 2px; }
.input {
  height: 36px; padding: 0 12px; border-radius: 9px; border: 0; width: 100%;
  background: var(--card); box-shadow: 0 0 0 .5px var(--sep-strong), inset 0 1px 2px rgba(0,0,0,.04);
  font-size: 14px; transition: box-shadow .15s;
}
.input:focus { outline: none; box-shadow: 0 0 0 .5px var(--accent), 0 0 0 4px var(--accent-soft); }
.input::placeholder { color: var(--text-3); }

/* ---------------- Tela de login (estilo lock screen) ---------------- */
.auth {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; gap: 28px; overflow-y: auto;
}
.lock-clock { text-align: center; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.25); user-select: none; }
.lock-clock .date { font-size: 18px; font-weight: 600; opacity: .9; }
.lock-clock .time { font-family: var(--font-display); font-size: clamp(64px, 12vw, 104px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.auth-card {
  width: 100%; max-width: 380px; padding: 28px; border-radius: 22px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 0 .5px var(--glass-border), 0 30px 60px -20px rgba(0,0,0,.4);
  animation: rise .6s var(--ease) both;
}
.auth-card .logo { display: block; width: 64px; height: 64px; margin: -60px auto 10px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.auth-card h1 { margin: 0; text-align: center; font-family: var(--font-display); font-size: 22px; letter-spacing: -.02em; }
.auth-card .sub { margin: 4px 0 18px; text-align: center; color: var(--text-2); }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .seg { width: 100%; margin-bottom: 16px; }
.auth-card .seg button { flex: 1; }
.auth-err { min-height: 18px; color: var(--red-text); font-size: 12px; text-align: center; font-weight: 500; }
.shake { animation: shake .45s; }
@keyframes shake { 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------------- Menu bar ---------------- */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 50;
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
  background: var(--menubar); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  color: var(--text); font-size: 13px; user-select: none;
}
.menubar .mb-item { height: 22px; padding: 0 9px; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; }
.menubar .mb-item:hover, .menubar .mb-item[aria-expanded="true"] { background: var(--fill-2); }
.menubar .brand { font-weight: 700; }
.menubar .brand img { width: 16px; height: 16px; }
.menubar .spacer { flex: 1; }
.menubar .mb-avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--c); }
.menubar svg { width: 15px; height: 15px; }

.menu {
  position: fixed; z-index: 60; min-width: 220px; padding: 5px; border-radius: 10px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 0 .5px var(--sep-strong), 0 12px 40px -8px rgba(0,0,0,.35);
  animation: pop .14s var(--ease);
}
:root[data-theme="dark"] .menu { background: rgba(40,40,46,.78); }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: 5px; text-align: left; }
.menu button:hover { background: var(--accent); color: #fff; }
.menu button kbd { margin-left: auto; font-family: var(--font); opacity: .55; font-size: 12px; }
.menu hr { border: 0; height: 1px; background: var(--sep-strong); margin: 5px 8px; }
.menu .menu-head { padding: 6px 10px 8px; }
.menu .menu-head b { display: block; }
.menu .menu-head span { color: var(--text-2); font-size: 12px; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } }

/* ---------------- Desktop + janela ---------------- */
.desktop { position: absolute; inset: 30px 0 0 0; padding: 20px 24px 108px; display: flex; justify-content: center; }
.window {
  width: 100%; max-width: 1200px; height: 100%;
  display: grid; grid-template-columns: 224px 1fr;
  border-radius: var(--r-window); overflow: hidden;
  background: var(--window); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-window);
  transition: transform .5s var(--ease), opacity .4s var(--ease), max-width .45s var(--ease);
  transform-origin: 50% 120%;
  translate: 0 0;
  animation: open .55s var(--ease) both;
}
@keyframes open { from { opacity: 0; transform: scale(.94) translateY(20px); } }
.window.glide { transition: transform .5s var(--ease), opacity .4s var(--ease), max-width .45s var(--ease), translate .45s var(--ease); }
.window.dragging { transition: none; box-shadow: var(--shadow-window), 0 40px 100px -20px rgba(0,0,0,.35); }
.window.dragging, .window.dragging * { user-select: none; }
.toolbar, .sidebar { touch-action: none; }
.window.minimized { transform: scale(.08) translateY(560%); opacity: 0; pointer-events: none; }
.desktop.zoomed { padding: 8px 8px 96px; }
.desktop.zoomed .window { max-width: 100%; }

.sidebar {
  background: var(--sidebar); border-right: .5px solid var(--sep);
  display: flex; flex-direction: column; padding: 14px 10px 12px; min-height: 0;
}
.traffic { display: flex; gap: 8px; padding: 2px 6px 18px; }
.traffic button {
  width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12);
}
.traffic .tl-close { background: #ff5f57; }
.traffic .tl-min { background: #febc2e; }
.traffic .tl-zoom { background: #28c840; }
.traffic svg { width: 8px; height: 8px; opacity: 0; color: rgba(0,0,0,.55); transition: opacity .1s; }
.traffic:hover svg { opacity: 1; }

.side-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 10px 10px 4px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav button {
  display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 7px;
  text-align: left; font-weight: 500; transition: background .12s;
}
.nav button svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.nav button:hover { background: var(--fill); }
.nav button[aria-current="page"] { background: var(--fill-2); }
.nav button .count { margin-left: auto; color: var(--text-3); font-size: 12px; font-weight: 500; }
.side-me {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  transition: background .12s; text-align: left;
}
.side-me:hover { background: var(--fill); }
.side-me b { display: block; font-size: 13px; }
.side-me span { color: var(--text-2); font-size: 11.5px; }

.avatar {
  width: var(--s, 32px); height: var(--s, 32px); border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: calc(var(--s, 32px) * .52); line-height: 1;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 55%, #fff), var(--c));
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3), 0 2px 6px -2px color-mix(in srgb, var(--c) 70%, transparent);
}

.avatar.photo { background: var(--fill); overflow: hidden; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.drop-avatar { position: relative; border-radius: 50%; cursor: pointer; transition: transform .2s var(--spring); }
.drop-avatar:hover { transform: scale(1.04); }
.drop-avatar .drop-hint {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.45); color: #fff; font-weight: 600; font-size: 13px; opacity: 0; transition: opacity .15s;
}
.drop-avatar.over .drop-hint { opacity: 1; }
.drop-avatar.over { box-shadow: 0 0 0 4px var(--accent); }
.drop-avatar.loading { opacity: .5; pointer-events: none; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.menubar .avatar { box-shadow: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--content); }
.toolbar {
  height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 22px;
  border-bottom: .5px solid var(--sep);
}
.toolbar h2 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.toolbar .sub { color: var(--text-2); font-size: 12px; margin-left: -4px; }
.toolbar .grow { flex: 1; }
.month-switch { display: inline-flex; align-items: center; gap: 2px; }
.month-switch .label { min-width: 118px; text-align: center; font-weight: 600; }
.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 8px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }
.search input { height: 28px; width: 180px; padding: 0 10px 0 28px; border-radius: 7px; border: 0; background: var(--fill); font-size: 13px; transition: width .25s var(--ease), box-shadow .15s; }
.search input:focus { outline: none; width: 230px; box-shadow: 0 0 0 3px var(--accent-soft); }

.content { flex: 1; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.content::-webkit-scrollbar { width: 10px; }
.content::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.view { animation: fade .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------------- Cards ---------------- */
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: 1.55fr 1fr; }
.card {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 16px;
  min-width: 0;
}
.card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 .grow { flex: 1; }
.card h3 .hint { font-weight: 500; color: var(--text-2); font-size: 12px; }
.stat .label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; font-size: 12px; }
.stat .dot { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; }
.stat .dot svg { width: 13px; height: 13px; }
.stat .value { margin-top: 10px; font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .foot { margin-top: 2px; color: var(--text-2); font-size: 12px; }
.pos { color: var(--green-text); }
.neg { color: var(--red-text); }
.bg-green { background: linear-gradient(180deg, #3ddc5a, #22b33a); }
.bg-red { background: linear-gradient(180deg, #ff6259, #e8352b); }
.bg-blue { background: linear-gradient(180deg, #4aa3ff, #0a6cf0); }
.bg-gold { background: linear-gradient(180deg, #ffd54a, #f29a00); }
.bg-accent { background: var(--accent); }

/* Gráfico de barras */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gl { stroke: var(--sep); stroke-width: 1; }
.chart .ax { fill: var(--text-3); font-size: 11px; }
.chart .ax.cur { fill: var(--text); font-weight: 600; }
.chart rect.b { transition: opacity .15s; }
.chart g.col:hover rect.b { opacity: .8; }
.chart rect.b { animation: grow .7s var(--ease) both; transform-box: fill-box; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.legend { display: flex; gap: 14px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }

/* Rosca de categorias */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { width: 120px; height: 120px; flex: none; }
.donut circle { transition: stroke-dasharray .8s var(--ease); }
.donut-center { font-family: var(--font-display); }
.cat-list { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cat-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.cat-row i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cat-row .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .v { display: none; }

/* Anel da meta (estilo Activity) */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { width: 112px; height: 112px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.ring .track { stroke: color-mix(in srgb, var(--green) 18%, transparent); }
.ring .prog { stroke: url(#ringGrad); transition: stroke-dashoffset 1.1s var(--ease); }
.ring-info .big { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.ring-info .lbl { color: var(--text-2); font-size: 12px; }

/* Listas de lançamentos */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-align: left; width: 100%;
  transition: background .12s;
}
.row:hover { background: var(--fill); }
.row .tile { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; background: var(--fill); flex: none; }
.row .tile.income { background: color-mix(in srgb, var(--green) 16%, transparent); }
.row .meta { flex: 1; min-width: 0; }
.row .meta b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta span { color: var(--text-2); font-size: 12px; }
.row .amt { font-weight: 600; font-size: 14px; white-space: nowrap; }
.day-head { display: flex; justify-content: space-between; padding: 16px 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.day-head:first-child { padding-top: 2px; }
.list-card { padding: 8px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .em { font-size: 44px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------------- Ranking ---------------- */
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.rank-head .title { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.rank-head .title span { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.podium {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px;
  max-width: 640px; margin: 18px auto 22px; padding-top: 26px;
}
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.pod .who { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; position: relative; min-width: 0; max-width: 100%; }
.pod .crown { position: absolute; top: -26px; font-size: 26px; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 6px rgba(0,0,0,.2)); }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
.pod .name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .handle { color: var(--text-2); font-size: 12px; margin-top: -4px; }
.pod .money { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.pod .block {
  width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: start center; padding-top: 12px;
  font-family: var(--font-display); font-weight: 900; font-size: 34px; color: rgba(255,255,255,.95);
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 24px -10px rgba(0,0,0,.35);
  animation: podium .9s var(--spring) both;
  transform-origin: bottom;
}
.pod.p1 .block { height: 150px; background: linear-gradient(180deg, #ffd85a, #f0a000); animation-delay: .35s; }
.pod.p2 .block { height: 112px; background: linear-gradient(180deg, #d9dde5, #9aa1ad); animation-delay: .15s; }
.pod.p3 .block { height: 86px;  background: linear-gradient(180deg, #f0b58a, #c4733e); animation-delay: .05s; }
.pod.empty-slot .block { background: var(--fill); color: var(--text-3); text-shadow: none; box-shadow: none; }
.pod.me .name::after { content: " • você"; color: var(--accent); font-weight: 600; }
@keyframes podium { from { transform: scaleY(0); opacity: 0; } }

.callout {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent-soft); font-weight: 500;
}
.callout .em { font-size: 22px; }
.callout b { font-weight: 700; }

.rank-row { display: grid; grid-template-columns: 32px auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.rank-row + .rank-row { border-top: .5px solid var(--sep); border-radius: 0; }
.rank-row.me { background: var(--accent-soft); border-radius: 10px; border-top-color: transparent; }
.rank-row.me + .rank-row { border-top-color: transparent; }
.rank-row .pos-n { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--text-2); text-align: center; }
.rank-row .who b { display: block; font-weight: 600; }
.rank-row .who span { color: var(--text-2); font-size: 12px; }
.rank-row .bar { height: 6px; border-radius: 6px; background: var(--fill); overflow: hidden; margin-top: 6px; }
.rank-row .bar i { display: block; height: 100%; border-radius: 6px; background: var(--c); transition: width .9s var(--ease); }
.rank-row .tot { text-align: right; font-weight: 700; font-size: 14px; }
.rank-row .tot span { display: block; font-weight: 500; color: var(--text-2); font-size: 11.5px; }

/* ---------------- Reserva ---------------- */
.i-vault { background: linear-gradient(180deg, #b07bff, #7b3fe4 55%, #2bc8a0); }
.bg-sol  { background: linear-gradient(135deg, #9945ff, #14f195); }
.bg-usdc { background: linear-gradient(180deg, #4b9bff, #2775ca); }
.bg-usdt { background: linear-gradient(180deg, #3fcfa4, #26a17b); }
.coin { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.card h3 .coin { width: 22px; height: 22px; font-size: 12px; }

.live { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(40,200,64,.6); animation: livePulse 2s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(40,200,64,0); } 100% { box-shadow: 0 0 0 0 rgba(40,200,64,0); } }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sav-hero { padding: 20px 22px; position: relative; overflow: hidden; }
.sav-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(153,69,255,.16), transparent 65%); pointer-events: none;
}
.sav-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; }
.sav-label { color: var(--text-2); font-weight: 600; font-size: 12.5px; }
.sav-total { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin-top: 2px; }
.sav-sub { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.sav-hero-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(180deg, #b07bff, #7b3fe4 55%, #2bc8a0); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px -8px rgba(123,63,228,.7); }
.sav-hero-icon svg { width: 28px; height: 28px; }
.split { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: var(--fill); margin-top: 18px; gap: 2px; position: relative; }
.split i { display: block; height: 100%; transition: width .9s var(--ease); }
.split i.w, .split-legend i.w { background: linear-gradient(90deg, #9945ff, #14f195); }
.split i.m, .split-legend i.m { background: var(--accent); }
.split-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--text-2); position: relative; }
.split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.split-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.split-legend b { color: var(--text); font-weight: 700; }

.addr-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--fill); font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--text-2); transition: background .12s; }
.addr-chip:hover { background: var(--fill-2); color: var(--text); }
.addr-chip svg { width: 12px; height: 12px; }
.assets { display: flex; flex-direction: column; }
.asset { display: flex; align-items: center; gap: 12px; padding: 11px 4px; }
.asset + .asset { border-top: .5px solid var(--sep); }
.asset .coin { width: 34px; height: 34px; font-size: 16px; }
.asset .meta { flex: 1; min-width: 0; }
.asset .meta b { display: block; font-weight: 700; }
.asset .meta span { color: var(--text-2); font-size: 12px; }
.asset .val { text-align: right; }
.asset .val b { display: block; font-weight: 700; font-size: 14px; }
.asset .val span { color: var(--text-2); font-size: 12px; }
.asset.zero { opacity: .5; }
.warn { padding: 10px 12px; border-radius: 10px; background: rgba(255,189,46,.16); color: var(--text); font-size: 12.5px; margin-bottom: 8px; }
.sav-foot, .sav-hint { color: var(--text-3); font-size: 11.5px; margin-top: 8px; }
.sav-hint { margin: 2px 10px 6px; }
.wallet-empty { text-align: center; padding: 10px 6px 4px; }
.wallet-empty .em { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: #fff; font-weight: 800; background: linear-gradient(135deg, #9945ff, #14f195); }
.wallet-empty > b { display: block; font-size: 15px; }
.wallet-empty p { color: var(--text-2); margin: 6px auto 14px; max-width: 340px; }
.wallet-empty small { display: block; color: var(--text-3); margin-top: 10px; font-size: 11.5px; }
.wallet-form { display: flex; gap: 8px; }
.wallet-form .input { flex: 1; min-width: 0; max-width: none !important; font-family: var(--mono); font-size: 12.5px; }
.safe-note { color: var(--text-2); font-size: 11.5px; }
.sav-row .del { opacity: 0; margin-left: -4px; transition: opacity .12s, background .12s; }
.sav-row:hover .del, .sav-row .del:focus-visible { opacity: 1; }
.sav-row .del.confirm { opacity: 1; background: var(--red); color: #fff; }

/* ---------------- Ajustes (System Settings) ---------------- */
.settings { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.settings .profile-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.settings .profile-hero b { font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.settings .profile-hero span { color: var(--text-2); }
.group-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 6px 12px; }
.group { background: var(--card); border-radius: 12px; box-shadow: var(--shadow-card); overflow: hidden; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 44px; }
.g-row + .g-row { border-top: .5px solid var(--sep); }
.g-row .lbl { flex: 1; font-weight: 500; }
.g-row .lbl small { display: block; color: var(--text-2); font-weight: 400; font-size: 12px; }
.g-row .input { height: 30px; max-width: 240px; font-size: 13px; }
.g-row.stack { flex-direction: column; align-items: stretch; }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 10px; font-size: 20px; display: grid; place-items: center; transition: background .12s, transform .12s; }
.emoji-grid button:hover { background: var(--fill); transform: scale(1.1); }
.emoji-grid button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.swatches { display: flex; gap: 10px; }
.swatches button { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); position: relative; transition: transform .15s var(--spring); }
.swatches button:hover { transform: scale(1.12); }
.swatches button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }

/* ---------------- Dock ---------------- */
.dock-wrap { position: fixed; left: 0; right: 0; bottom: 10px; z-index: 40; display: flex; justify-content: center; pointer-events: none; }
.dock {
  pointer-events: auto; display: flex; align-items: flex-end; gap: 4px; padding: 7px 8px;
  border-radius: 22px; height: 70px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 0 .5px var(--glass-border), 0 10px 40px -10px rgba(0,0,0,.4);
}
.dock .d-item { position: relative; display: flex; flex-direction: column; align-items: center; width: 56px; }
.dock .d-icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.12), 0 4px 10px -4px rgba(0,0,0,.4);
  transition: transform .2s var(--ease); transform-origin: bottom center; will-change: transform;
  position: relative; overflow: hidden;
}
.dock .d-icon::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 50%); }
.dock .d-icon svg { width: 26px; height: 26px; position: relative; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.dock .d-item.bounce .d-icon { animation: bounce .6s var(--ease); }
@keyframes bounce { 30% { transform: translateY(-18px); } 55% { transform: translateY(0); } 75% { transform: translateY(-6px); } }
.dock .d-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text); opacity: 0; margin-top: 3px; transition: opacity .2s; }
.dock .d-item.active .d-dot { opacity: .7; }
.dock .tip {
  position: absolute; bottom: calc(100% + 14px); padding: 4px 10px; border-radius: 7px; white-space: nowrap;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 0 .5px var(--sep-strong), 0 6px 16px -6px rgba(0,0,0,.3);
  font-size: 12.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .12s;
}
.dock .d-item:hover .tip { opacity: 1; }
.dock .d-sep { width: 1px; align-self: stretch; margin: 6px 6px 10px; background: var(--sep-strong); }
.dock .d-label { display: none; }

.i-home  { background: linear-gradient(180deg, #5ab0ff, #0a6cf0); }
.i-list  { background: linear-gradient(180deg, #4be06c, #1aa337); }
.i-trophy{ background: linear-gradient(180deg, #ffd54a, #f08a00); }
.i-gear  { background: linear-gradient(180deg, #a8acb4, #6b6f78); }
.i-add   { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); }
.i-search{ background: linear-gradient(180deg, #8a8aff, #5040e0); }

/* ---------------- Sheet (modal estilo macOS) ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.22);
  display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh;
  animation: dimIn .2s ease both;
}
.overlay.closing { animation: dimOut .2s ease both; }
@keyframes dimIn { from { background: rgba(0,0,0,0); } }
@keyframes dimOut { to { background: rgba(0,0,0,0); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  width: min(460px, calc(100vw - 24px)); max-height: 82vh; overflow-y: auto; border-radius: 16px; padding: 22px;
  background: rgba(246,246,248,.86); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-window);
  animation: sheetIn .38s var(--ease) both;
}
:root[data-theme="dark"] .sheet { background: rgba(38,38,44,.9); }
.overlay.closing .sheet { animation: sheetOut .2s ease both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-24px) scale(.97); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(-14px) scale(.98); } }
.sheet h2 { margin: 0 0 16px; font-family: var(--font-display); font-size: 17px; letter-spacing: -.01em; text-align: center; }
.sheet .seg { width: 100%; margin-bottom: 18px; }
.sheet .seg button { flex: 1; }
.sheet form { display: flex; flex-direction: column; gap: 14px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 6px; }
.sheet .actions .grow { flex: 1; }
.amount-input {
  border: 0; background: none; width: 100%; text-align: center; padding: 4px 0 2px;
  font-family: var(--font-display); font-size: 44px; font-weight: 800; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; caret-color: var(--accent);
}
.amount-input:focus { outline: none; }
.amount-input.income { color: var(--green-text); }
.amount-input.expense { color: var(--text); }
.amount-hint { text-align: center; color: var(--text-3); font-size: 12px; margin-top: -10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  height: 30px; padding: 0 11px; border-radius: 15px; background: var(--fill); font-weight: 500; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 5px; transition: background .12s, transform .1s;
}
.chips button:hover { background: var(--fill-2); }
.chips button:active { transform: scale(.96); }
.chips button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------------- Spotlight ---------------- */
.spot-overlay { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; padding-top: 18vh; background: rgba(0,0,0,.08); animation: dimIn .15s both; }
.spotlight {
  width: min(640px, calc(100vw - 24px)); border-radius: 18px; overflow: hidden; align-self: flex-start;
  background: rgba(250,250,252,.72); backdrop-filter: saturate(180%) blur(50px); -webkit-backdrop-filter: saturate(180%) blur(50px);
  box-shadow: 0 0 0 .5px var(--glass-border), 0 30px 80px -20px rgba(0,0,0,.5);
  animation: spotIn .25s var(--ease) both;
}
:root[data-theme="dark"] .spotlight { background: rgba(36,36,42,.75); }
@keyframes spotIn { from { opacity: 0; transform: scale(.96); } }
.spot-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 58px; }
.spot-in svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.spot-in input { flex: 1; border: 0; background: none; font-size: 22px; font-weight: 400; letter-spacing: -.01em; height: 100%; }
.spot-in input:focus { outline: none; }
.spot-res { border-top: .5px solid var(--sep-strong); padding: 6px; max-height: 340px; overflow-y: auto; }
.spot-res:empty { display: none; }
.spot-sec { font-size: 11.5px; font-weight: 600; color: var(--text-2); padding: 8px 10px 4px; }
.spot-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; text-align: left; }
.spot-item .ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 15px; color: #fff; flex: none; }
.spot-item .ic svg { width: 16px; height: 16px; }
.spot-item b { font-weight: 500; }
.spot-item span { color: var(--text-2); font-size: 12px; margin-left: auto; }
.spot-item[aria-selected="true"] { background: var(--accent); color: #fff; }
.spot-item[aria-selected="true"] span { color: rgba(255,255,255,.8); }
.spot-tip { padding: 8px 16px 12px; color: var(--text-3); font-size: 12px; border-top: .5px solid var(--sep); }
.spot-tip code { font-family: var(--mono); background: var(--fill); padding: 1px 5px; border-radius: 4px; color: var(--text-2); }

/* ---------------- Notificações ---------------- */
#toasts { position: fixed; top: 40px; right: 14px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; width: 340px; max-width: calc(100vw - 28px); display: flex; gap: 11px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 0 0 .5px var(--glass-border), 0 12px 32px -10px rgba(0,0,0,.35);
  animation: toastIn .45s var(--spring) both;
}
:root[data-theme="dark"] .toast { background: rgba(44,44,50,.78); }
.toast.out { animation: toastOut .3s var(--ease) both; }
.toast img { width: 34px; height: 34px; flex: none; }
.toast b { display: block; font-size: 13px; }
.toast span { color: var(--text-2); font-size: 12.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(110%); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(110%); } }

/* Confete */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Skeleton */
.sk { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* =========================================================
   MODO ESCURO — interface do macOS (wallpaper, menu bar, Dock,
   moldura da janela, menus, Spotlight e notificações)
   ========================================================= */
:root[data-theme="dark"] .wallpaper {
  background:
    radial-gradient(120% 80% at 50% 115%, #3a1a3f 0%, transparent 55%),
    linear-gradient(165deg, #0d1233 0%, #161049 38%, #22103a 70%, #08070f 100%);
}
:root[data-theme="dark"] .wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.55) 100%);
}
:root[data-theme="dark"] .wallpaper i { opacity: .5; filter: blur(90px); }
:root[data-theme="dark"] .wallpaper i:nth-child(1) { background: #3f4dff; opacity: .38; }
:root[data-theme="dark"] .wallpaper i:nth-child(2) { background: #c02c7a; opacity: .32; }
:root[data-theme="dark"] .wallpaper i:nth-child(3) { background: #ff7a3d; opacity: .22; }
:root[data-theme="dark"] .wallpaper i:nth-child(4) { background: #1fb6ff; opacity: .22; }

:root[data-theme="dark"] .menubar {
  background: rgba(16, 16, 22, .5);
  box-shadow: inset 0 -.5px 0 rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
}
:root[data-theme="dark"] .menubar .mb-item:hover,
:root[data-theme="dark"] .menubar .mb-item[aria-expanded="true"] { background: rgba(255,255,255,.16); }

:root[data-theme="dark"] .window {
  box-shadow:
    inset 0 0 0 .5px rgba(255,255,255,.16),
    0 0 0 1px rgba(0,0,0,.75),
    0 34px 90px -12px rgba(0,0,0,.85),
    0 14px 34px -10px rgba(0,0,0,.6);
}
:root[data-theme="dark"] .window.dragging { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.16), 0 0 0 1px rgba(0,0,0,.75), 0 50px 120px -10px rgba(0,0,0,.9); }

:root[data-theme="dark"] .dock {
  background: rgba(28, 28, 36, .42);
  box-shadow:
    inset 0 0 0 .5px rgba(255,255,255,.2),
    inset 0 1px 0 rgba(255,255,255,.1),
    0 0 0 .5px rgba(0,0,0,.6),
    0 16px 50px -12px rgba(0,0,0,.8);
}
:root[data-theme="dark"] .dock .d-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(0,0,0,.2), 0 6px 14px -4px rgba(0,0,0,.7); }
:root[data-theme="dark"] .dock .d-dot { background: #fff; }
:root[data-theme="dark"] .dock .d-sep { background: rgba(255,255,255,.16); }
:root[data-theme="dark"] .dock .tip,
:root[data-theme="dark"] .menu,
:root[data-theme="dark"] .toast,
:root[data-theme="dark"] .spotlight {
  background: rgba(30, 30, 38, .68);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.16), 0 0 0 .5px rgba(0,0,0,.7), 0 18px 50px -12px rgba(0,0,0,.75);
}
:root[data-theme="dark"] .spot-in input { color: #fff; }
:root[data-theme="dark"] .spot-res, :root[data-theme="dark"] .spot-tip { border-top-color: rgba(255,255,255,.1); }

/* ---------------- Responsivo ---------------- */
@media (max-width: 1060px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .menubar { display: none; }
  .desktop, .desktop.zoomed { inset: 0; padding: 0; }
  .window, :root[data-theme="dark"] .window { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; animation: none; translate: none !important; }
  .toolbar, .sidebar { touch-action: auto; }
  .sidebar { display: none; }
  .toolbar { padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; height: auto; flex-wrap: wrap; row-gap: 8px; }
  .toolbar h2 { font-size: 24px; width: 100%; }
  .toolbar .sub { display: none; }
  .toolbar .grow { display: none; }
  .search input, .search input:focus { width: 100%; }
  .search { flex: 1; }
  .content { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .stats { gap: 10px; }
  .stat .value { font-size: 20px; }
  .card { padding: 14px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .podium { gap: 8px; }
  .pod .money { font-size: 14px; }
  .pod .name { font-size: 13px; }
  .pod.p1 .block { height: 120px; } .pod.p2 .block { height: 92px; } .pod.p3 .block { height: 70px; }
  .emoji-grid { grid-template-columns: repeat(5, 1fr); }
  .dock-wrap { bottom: 0; }
  .dock {
    width: 100%; height: auto; border-radius: 0; justify-content: space-around; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -.5px 0 var(--sep-strong);
  }
  .dock { background: rgba(249,249,251,.9); }
  :root[data-theme="dark"] .dock { background: rgba(28,28,32,.9); box-shadow: 0 -.5px 0 rgba(255,255,255,.1); }
  .dock .d-item { width: auto; flex: 1; }
  .dock .d-icon { width: 30px; height: 30px; border-radius: 9px; transform: none !important; }
  .dock .d-icon svg { width: 17px; height: 17px; }
  .dock .d-sep, .dock .tip, .dock .d-dot, .dock .d-item.hide-m { display: none; }
  .dock .d-label { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-2); margin-top: 3px; }
  .dock .d-item.active .d-label { color: var(--accent); }
  .dock .d-item:not(.active):not(.d-add) .d-icon { filter: saturate(.15); opacity: .7; }
  .overlay { align-items: flex-end; padding-top: 0; }
  .sheet { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation-name: sheetUp; }
  .overlay.closing .sheet { animation-name: sheetDown; }
  #toasts { top: calc(env(safe-area-inset-top) + 8px); right: 8px; left: 8px; align-items: center; }
  .spot-overlay { padding-top: 10vh; }
  .rank-row { grid-template-columns: 26px auto 1fr auto; gap: 10px; padding: 10px 8px; }
  .sav-total { font-size: 32px; }
  .sav-row .del { opacity: 1; }
  .live span { display: none; }
  .wallet-form { flex-wrap: wrap; }
  .wallet-form .input { flex-basis: 100%; }
  .wallet-form .btn { flex: 1; height: 36px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
