/* ===== Cuido Energía · tokens de diseño ===== */
:root {
  --sun-1: #FFC21A; --sun-2: #FF9500; --sun-3: #FF6B00; --accent: #FF7A00;
  --grad: linear-gradient(135deg, #FFB01F 0%, #FF8A00 45%, #FF5C00 100%);
  --glow: 0 8px 30px -8px rgba(255, 122, 0, .55);
  --ok: #22C55E; --danger: #EF4444; --warn: #F5A524; --info: #3B82F6;
  --s2: #F5A524; --s3: #9CA3AF; --s4: #60A5FA;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side-w: 248px;
}

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0D0F; --side: #111114; --surface: #17171B; --surface-2: #1D1D22; --surface-3: #26262C;
  --line: rgba(255, 255, 255, .06); --line-2: rgba(255, 255, 255, .11);
  --text: #F5F5F4; --text-2: #9B9BA4; --text-3: #6B6B74;
  --input: #121215; --hover: rgba(255, 255, 255, .045);
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 12px 32px -14px rgba(0, 0, 0, .65);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .75);
  --overlay: rgba(4, 4, 6, .66);
  --ok-bg: rgba(34, 197, 94, .13); --danger-bg: rgba(239, 68, 68, .13); --warn-bg: rgba(245, 165, 36, .13); --info-bg: rgba(59, 130, 246, .14); --accent-bg: rgba(255, 122, 0, .14);
  --ok-t: #4ADE80; --danger-t: #F87171; --warn-t: #FBBF24; --info-t: #93C5FD; --accent-t: #FFA94D;
}

:root[data-theme="light"], .force-light {
  color-scheme: light;
  --bg: #F2F2F2; --side: #FAFAFA; --surface: #FFFFFF; --surface-2: #F7F7F7; --surface-3: #ECECEC;
  --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .13);
  --text: #0B0B0C; --text-2: #5C5C64; --text-3: #8E8E96;
  --input: #FFFFFF; --hover: rgba(0, 0, 0, .04);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px -16px rgba(0, 0, 0, .18);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .3);
  --overlay: rgba(20, 20, 24, .45);
  --ok-bg: rgba(34, 197, 94, .13); --danger-bg: rgba(239, 68, 68, .11); --warn-bg: rgba(245, 165, 36, .16); --info-bg: rgba(59, 130, 246, .11); --accent-bg: rgba(255, 122, 0, .12);
  --ok-t: #15803D; --danger-t: #B91C1C; --warn-t: #B45309; --info-t: #1D4ED8; --accent-t: #C2570A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, p { margin: 0; }
h1:focus, h2:focus { outline: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
::selection { background: rgba(255, 122, 0, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
kbd {
  font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--text-2);
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; line-height: 18px;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ===== sol (logo) ===== */
.sun-tile {
  --s: 40px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); flex: none;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: 0 6px 20px -8px rgba(255, 122, 0, .5);
}
.force-light .sun-tile, :root[data-theme="light"] .sun-tile { background: #fff; }
.sun {
  position: relative; display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #FF6B00 0%, #FF9500 35%, #FFC21A 60%, rgba(255, 194, 26, 0) 72%);
}
.sun-tile .sun { width: 88%; height: 88%; }
.sun .eye {
  position: absolute; bottom: 31%; width: 7%; height: 7%; border-radius: 50%; background: #0B0B0C;
}
.sun .eye:nth-child(1) { left: 39%; }
.sun .eye:nth-child(2) { right: 39%; }
.sun-tile .sun .eye { width: 8%; height: 8%; bottom: 30%; }
.sun--breathe { animation: breathe 5.2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); filter: brightness(1) saturate(1); }
  50% { transform: scale(1.07); filter: brightness(1.12) saturate(1.1); }
}
.sun-hero { --s: 240px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); }
.sun-hero .sun { width: 100%; height: 100%; }
.sun-halo {
  position: absolute; inset: -30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 122, 0, .38) 0%, rgba(255, 122, 0, .12) 40%, rgba(255, 122, 0, 0) 70%);
  animation: halo 5.2s ease-in-out infinite;
}
@keyframes halo { 0%, 100% { opacity: .75; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.1); } }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand__txt small { font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; white-space: nowrap; }
.wm { height: 21px; width: auto; display: block; object-fit: contain; object-position: left; }
.wm--for-light { display: none; }
:root[data-theme="light"] .wm--for-dark { display: none; }
:root[data-theme="light"] .wm--for-light { display: block; }
.force-light .wm--for-dark { display: none; }
.force-light .wm--for-light { display: block; }
.brand-full { display: block; width: auto; }

/* ===== animaciones comunes ===== */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 100% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } }
.rise { animation: rise .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 65ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
