/* BIOCOMB — Mercado de Biocombustibles — design tokens
   Paleta derivada del isologo BIOCOMB (navy + verde + ámbar). */

:root,
.theme-dark {
  --bg: #06294D;
  --bg-soft: #092F56;
  --surface: #0F3860;
  --surface-2: #13416D;
  --surface-hover: #16497A;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #F3F6F5;
  --text-secondary: #A7BACB;
  --text-tertiary: #6D8298;
  --green: #6FB25C;
  --green-strong: #93D17E;
  --amber: #F0A52E;
  --amber-strong: #FFC15C;
  --up: #6FB25C;
  --down: #E2604F;
  --focus: #F0A52E;
  --shadow: 0 12px 32px rgba(1, 10, 22, 0.45);
  --overlay: rgba(2, 12, 24, 0.6);
}

.theme-light {
  --bg: #F5F7F6;
  --bg-soft: #EEF1EF;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-hover: #EFF3F1;
  --border: rgba(4, 27, 51, 0.10);
  --border-strong: rgba(4, 27, 51, 0.20);
  --text: #04182E;
  --text-secondary: #4C6178;
  --text-tertiary: #7C8CA0;
  --green: #3E8A32;
  --green-strong: #2E6D25;
  --amber: #B97612;
  --amber-strong: #935E0C;
  --up: #3E8A32;
  --down: #C0392B;
  --focus: #B97612;
  --shadow: 0 12px 28px rgba(4, 27, 51, 0.10);
  --overlay: rgba(4, 27, 51, 0.4);
}

:root {
  --font-display: 'Space Grotesk', system-ui, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
}

* { box-sizing: border-box; }

.app {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag-green { color: var(--green-strong); border-color: rgba(111,178,92,0.35); background: rgba(111,178,92,0.10); }
.tag-amber { color: var(--amber-strong); border-color: rgba(240,165,46,0.35); background: rgba(240,165,46,0.12); }

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--surface-hover); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #04182E;
}
.btn-primary:hover { background: var(--amber-strong); border-color: var(--amber-strong); }

.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: var(--surface-hover); }

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

.flash-up { animation: flashUp 900ms ease-out; }
.flash-down { animation: flashDown 900ms ease-out; }
@keyframes flashUp {
  0% { background: rgba(111,178,92,0.28); }
  100% { background: transparent; }
}
@keyframes flashDown {
  0% { background: rgba(226,96,79,0.28); }
  100% { background: transparent; }
}

.pulse-dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--green);
  box-shadow: 0 0 0 0 rgba(111,178,92,0.6);
  animation: pulseDot 1.8s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(111,178,92,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(111,178,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,178,92,0); }
}

.fade-in { animation: fadeIn 420ms ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

input, select {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
}
::placeholder { color: var(--text-tertiary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
