/* GOAT — tema claro e botão de tema (2026-11-08). Carrega depois de redesign.css.
   O escuro é o tema por omissão; o claro só se aplica com html[data-theme="light"] (theme.js e boot.js).
   Palete GOAT, claro: fundo Silver Mist #E4E4E4, texto Void Eclipse #0B0B0B, Abyss Blue #2B3B79.
   Os contrastes de texto são os da palete (todos >= 4,5:1). */

/* ---------- botão de tema: o mesmo botão redondo de antes (sol no escuro, lua no claro) ---------- */
.theme-btn { border-radius: 50%; }
.theme-btn svg.i { width: 20px; height: 20px; }
.theme-btn.spin-in svg { animation: theme-spin .5s var(--spring); }
@keyframes theme-spin { from { transform: rotate(-90deg) scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .theme-btn.spin-in svg { animation: none; } }

/* ---------- tema claro ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #E4E4E4;
  --text: #0B0B0B;
  --text-2: rgba(11, 11, 11, .80);
  --text-3: #545A69;
  --sky: #2B3B79;
  --indigo: #3A4FA0;
  --brand: #2B3B79;
  --brand-hover: #22306A;
  --brand-active: #1A2556;
  --on-brand: #E4E4E4;
  --success: #1D7347;
  --warning: #865D00;
  --error: #B02A2F;
  --focus-ring: #2B3B79;
  --focus-bg: #0B0B0B;
  --focus-fg: #E4E4E4;
  --ink-1: #F4F4F5;
  --ink-2: #FFFFFF;
  --ink-3: #ECEDF1;
  --line: rgba(11, 11, 11, .09);
  --line-2: #C3C6CF;
  --abyss-lo: #D3D9EE;
  --hover: rgba(11, 11, 11, .05);
  --pressed: rgba(11, 11, 11, .10);
  --selected: rgba(11, 11, 11, .06);
  --hairline: var(--line);
  --glass: rgba(255, 255, 255, .78);
  --glass-strong: rgba(255, 255, 255, .97);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  --glass-border: linear-gradient(180deg, rgba(11, 11, 11, .10), rgba(11, 11, 11, .05));
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(120% 70% at 15% -10%, rgba(43, 59, 121, .16), transparent 60%),
    radial-gradient(90% 60% at 85% -15%, rgba(58, 79, 160, .12), transparent 60%),
    var(--bg);
}
html[data-theme="light"] body::after { opacity: .035 !important; background-image: radial-gradient(rgba(11, 11, 11, .5) .5px, transparent .6px); }
html[data-theme="light"] #aurora { opacity: .22; }

html[data-theme="light"] header.top { background: rgba(228, 228, 228, .72); }
html[data-theme="light"] nav.tabs-nav { background: rgba(255, 255, 255, .6); }
html[data-theme="light"] nav.tabs-nav a.on,
html[data-theme="light"] nav.tabs-nav a.on:hover { color: var(--on-brand); }
html:not(.motion)[data-theme="light"] nav.tabs-nav a.on { color: var(--on-brand); }
@media (max-width: 720px) {
  html[data-theme="light"] header.top { background: rgba(228, 228, 228, .94); }
  html[data-theme="light"] nav.tabs-nav { background: rgba(244, 244, 245, .94); }
}

/* Painéis brancos sobre o Silver Mist, com uma sombra suave em vez do contorno de vidro. */
html[data-theme="light"] .card,
html[data-theme="light"] .toast { background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(247, 247, 248, .92)); box-shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 14px 34px -20px rgba(30, 40, 80, .28); }
html[data-theme="light"] dialog { background: linear-gradient(180deg, #FFFFFF, #F4F4F5); box-shadow: 0 30px 80px -30px rgba(20, 30, 70, .45); }
html[data-theme="light"] dialog::backdrop { background: rgba(11, 11, 11, .32); }
html[data-theme="light"] .card::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(43, 59, 121, .07), transparent 60%); }
html[data-theme="light"] a.product:hover,
html[data-theme="light"] a.product:focus-visible { background: linear-gradient(180deg, #FFFFFF, #F4F4F5); }
html[data-theme="light"] a.product:focus-visible .muted,
html[data-theme="light"] a.product:focus-visible .stats { color: var(--text-3); }

/* Os ícones das apps ficam em azul-escuro com o símbolo claro, como no escuro. */
html[data-theme="light"] .product-ico,
html[data-theme="light"] .dev-ico,
html[data-theme="light"] .pl-ico,
html[data-theme="light"] .empty .big-ico,
html[data-theme="light"] .install-head .dev-ico,
html[data-theme="light"] a.product:focus-visible .product-ico { background: linear-gradient(160deg, #3A4FA0, #22306A); color: #E4E4E4; border-color: rgba(43, 59, 121, .4); }
html[data-theme="light"] .pl-ico.m3u { background: linear-gradient(160deg, #2F4290, #18204A); color: #E4E4E4; }
html[data-theme="light"] .avatar { background: linear-gradient(135deg, #3A4FA0, #22306A); color: #E4E4E4; }

/* Campos e controlos. */
html[data-theme="light"] input:hover,
html[data-theme="light"] select:hover,
html[data-theme="light"] textarea:hover,
html[data-theme="light"] .code-box:hover { background-color: #F7F7F9; }
html[data-theme="light"] input:focus-visible,
html[data-theme="light"] select:focus-visible,
html[data-theme="light"] textarea:focus-visible,
html[data-theme="light"] .code-box:focus { box-shadow: 0 0 0 4px rgba(43, 59, 121, .16); background-color: #FFFFFF; }
html[data-theme="light"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0B0B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
html[data-theme="light"] select option { background: #FFFFFF; color: #0B0B0B; }
html[data-theme="light"] .lang-pick select,
html[data-theme="light"] .seg { background-color: rgba(255, 255, 255, .6); }
html[data-theme="light"] .switch span::after { background: #FFFFFF; box-shadow: 0 1px 3px rgba(11, 11, 11, .3); }
html[data-theme="light"] .switch input:checked + span::after { background: #FFFFFF; }
html[data-theme="light"] .btn.primary { box-shadow: 0 10px 24px -14px rgba(43, 59, 121, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }

/* Listas, etiquetas, avisos. */
html[data-theme="light"] #list > .pl:hover,
html[data-theme="light"] .org-row:hover,
html[data-theme="light"] .app-row:hover,
html[data-theme="light"] .dev:hover { background: rgba(11, 11, 11, .035); }
html[data-theme="light"] .badge { background: rgba(11, 11, 11, .05); }
html[data-theme="light"] .badge.st-new { background: rgba(43, 59, 121, .12); }
html[data-theme="light"] .badge.st-fixed { background: rgba(29, 115, 71, .12); }
html[data-theme="light"] .alert { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .alert.err { background: rgba(176, 42, 47, .08); }
html[data-theme="light"] .result-ico { background: rgba(29, 115, 71, .12); }
html[data-theme="light"] .install-app { background: rgba(244, 244, 245, .8); }
html[data-theme="light"] .install-app:hover { border-color: rgba(43, 59, 121, .25); }
html[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(11, 11, 11, .04), rgba(43, 59, 121, .09), rgba(11, 11, 11, .04)); background-size: 200% 100%; }
html[data-theme="light"] .pl-status.ok .dot::after { border-color: var(--success); }
html[data-theme="light"] .gd-item:hover,
html[data-theme="light"] .gd-item:focus-visible { background: rgba(11, 11, 11, .07); }
html[data-theme="light"] .wp-item.on .wp-thumb { border-color: var(--brand); }
html[data-theme="light"] .adm-log { background: rgba(11, 11, 11, .05); }
html[data-theme="light"] .app-row.dragging,
html[data-theme="light"] .org-row.dragging { box-shadow: inset 0 0 0 1px rgba(11, 11, 11, .12), 0 10px 24px -14px rgba(20, 30, 70, .4); }

/* página de entrada (claro): cartões das apps como os outros cartões; pontos do topo visíveis no fundo claro */
html[data-theme="light"] .lp-app { background: var(--ink-2); }
html[data-theme="light"] .lp-dev { box-shadow: 0 24px 60px rgba(11, 11, 11, .28), 0 0 0 1px rgba(11, 11, 11, .10); }
html[data-theme="light"] .lp-glow { opacity: .5; }
