:root {
  --bg-body: #020617;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-card: #0f172a;
  --bg-input: #020617;
  --border-subtle: #1e293b;
  --border-input: #334155;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --indigo: #4f46e5;
  --indigo-hover: #6366f1;
  --indigo-soft: rgba(99, 102, 241, 0.15);
  --emerald: #34d399;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --emerald-border: rgba(16, 185, 129, 0.32);
  --rose: #fb7185;
  --rose-bg: rgba(244, 63, 94, 0.14);
  --rose-border: rgba(244, 63, 94, 0.35);
  --amber: #fbbf24;
  --amber-bg: rgba(120, 53, 15, 0.22);
  --amber-border: rgba(245, 158, 11, 0.32);
  --sky: #38bdf8;
  --violet: #a78bfa;
  --fuchsia: #e879f9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  flex: 1;
}

.tab-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Tarjetas y superficies */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-title-upper {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  padding: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  background: transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--indigo);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--indigo-hover);
}

.btn-secondary {
  border-color: var(--border-input);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
  background: #1e293b;
}

.btn-sky {
  background: #0284c7;
  color: #ffffff;
}

.btn-sky:hover:not(:disabled) {
  background: #0ea5e9;
}

.btn-emerald {
  background: #059669;
  color: #ffffff;
}

.btn-emerald:hover:not(:disabled) {
  background: #10b981;
}

.btn-emerald-outline {
  border-color: var(--emerald-border);
  background: var(--emerald-bg);
  color: #a7f3d0;
}

.btn-rose-outline {
  border-color: var(--rose-border);
  background: var(--rose-bg);
  color: #fecdd3;
}

/* Inputs y selects */
.input,
.select {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: #ffffff;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: var(--indigo-hover);
}

.input::placeholder {
  color: var(--text-dim);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-emerald {
  background: var(--emerald-bg);
  color: #6ee7b7;
}

.badge-rose {
  background: var(--rose-bg);
  color: #fda4af;
}

.badge-sky {
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
}

.badge-violet {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
}

.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }
.text-amber { color: var(--amber); }
.text-sky { color: var(--sky); }
.text-violet { color: var(--violet); }
.text-fuchsia { color: var(--fuchsia); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.tabular { font-variant-numeric: tabular-nums; }
