/* ============================================================
   SATÉLITE AUTOMOTRIZ — Design System v2
   Navy dark theme · Plus Jakarta Sans + Syne
   Based on premium dashboard example
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Syne:wght@600;700;800&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --navy: #0d1f3c;
  --navy2: #111d35;
  --navy3: #162d52;
  --card: #131f38;
  --card2: #1a2a45;
  --blue: #1a56db;
  --blue-l: #3b82f6;
  --accent: #f59e0b;
  --accent2: #fbbf24;
  --green: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --teal: #2dd4bf;
  --text: #f0f4ff;
  --muted: #7c8db5;
  --border: rgba(255, 255, 255, 0.07);
  --border-l: rgba(255, 255, 255, 0.12);
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: 0.2s ease;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Syne', sans-serif;

  /* Aliases for compatibility */
  --bg-base: var(--navy);
  --bg-surface: var(--navy2);
  --bg-elevated: var(--card2);
  --bg-card: var(--card);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(13, 31, 60, 0.85);
  --border-light: var(--border-l);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --text-muted: #4a5568;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-soft: rgba(26, 86, 219, 0.2);
  --success: var(--green);
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: var(--accent);
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: var(--red);
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: var(--teal);
  --info-soft: rgba(45, 212, 191, 0.15);
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--blue-l);
  text-decoration: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
}

input,
select,
textarea {
  font-family: var(--font);
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--card2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   LOGIN — Dos paneles (navy + blanco)
════════════════════════════════════════════════════════════ */
.login-screen {
  display: grid;
  grid-template-columns: 1fr 480px;
  height: 100vh;
  overflow: hidden;
}

.lp-left {
  position: relative;
  background: linear-gradient(145deg, #0d1f3c 0%, #0a1628 40%, #0f2040 70%, #1a3a6e 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px 52px;
}

.lp-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 600px;
  opacity: 0.15;
  /* Aumentado para mayor visibilidad */
  pointer-events: none;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lp-bg-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.lp-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.lp-c1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.18) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.lp-c2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

.lp-c3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.12) 0%, transparent 70%);
  top: 40%;
  left: 30%;
}

.lp-dot-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.lp-cars-strip {
  position: absolute;
  bottom: 130px;
  left: 0;
  right: 0;
  height: 36px;
  overflow: hidden;
  opacity: 0.12;
  pointer-events: none;
}

.lp-cars-track {
  display: flex;
  gap: 24px;
  align-items: center;
  animation: lpScrollCars 30s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.lp-car-mark {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: white;
}

.lp-car-sep {
  color: rgba(255, 255, 255, 0.4);
}

.lp-left-top {
  position: relative;
  z-index: 2;
}

.lp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--blue-l));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(26, 86, 219, 0.4);
  flex-shrink: 0;
  animation: lpIconPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.lp-brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.2;
}

.lp-brand-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.lp-left-center {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 24px;
  width: fit-content;
  opacity: 0;
  animation: lpSlideUp 0.7s 0.3s ease forwards;
}

.lp-badge-dot {
  width: 7px;
  height: 7px;
  background: #f59e0b;
  border-radius: 50%;
  box-shadow: 0 0 8px #f59e0b;
  animation: lpPulseDot 2s infinite;
}

.lp-badge-text {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fbbf24;
}

.lp-hero-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 420px;
  margin-bottom: 36px;
  opacity: 0;
  animation: lpSlideUp 0.7s 0.5s ease forwards;
}

.lp-brands-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
  opacity: 0;
  animation: lpSlideUp 0.7s 0.65s ease forwards;
}

.lp-brands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
  animation: lpSlideUp 0.7s 0.78s ease forwards;
}

.lp-brand-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.25s;
  cursor: default;
}

.lp-brand-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  transform: translateY(-1px);
}

.lp-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 32px;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation: lpSlideUp 0.7s 0.9s ease forwards;
}

.lp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lp-stat-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
}

.lp-stat-num span {
  color: #f59e0b;
}

.lp-stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.33);
}

.lp-stat-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
}

.lp-right {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 48px;
  position: relative;
  overflow: hidden;
  animation: lpPanelIn 0.7s 0.1s ease both;
}

.lp-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a56db, #3b82f6, #f59e0b);
}

.lp-right::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.04) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.lp-form-wrap {
  position: relative;
  z-index: 1;
}

.lp-form-brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.lp-mini-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0d1f3c, #162d52);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-mini-brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: #0d1f3c;
}

.lp-mini-version {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.lp-form-heading {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.85rem;
  color: #1a2332;
  line-height: 1.15;
  margin-bottom: 6px;
}

.lp-form-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.6;
}

.lp-field {
  margin-bottom: 18px;
}

.lp-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a2332;
  margin-bottom: 7px;
}

.lp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lp-input-icon {
  position: absolute;
  left: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition: color 0.25s;
  pointer-events: none;
  z-index: 1;
}

.lp-input-wrap:focus-within .lp-input-icon {
  color: #1a56db;
}

.lp-field input {
  width: 100%;
  background: #f0f2f5;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 13px 42px 13px 42px;
  font-family: var(--font);
  font-size: 0.91rem;
  color: #1a2332;
  outline: none;
  transition: all 0.25s;
}

.lp-field input::placeholder {
  color: #94a3b8;
}

.lp-field input:focus {
  border-color: #1a56db;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.08);
}

.lp-toggle-pass {
  position: absolute;
  right: 13px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}

.lp-toggle-pass:hover {
  color: #1a56db;
}

.lp-error {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  color: #dc2626;
  font-size: 0.85rem;
}

.lp-btn-main {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #0d1f3c 0%, #1a56db 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(13, 31, 60, 0.25);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.lp-btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a56db 0%, #0d1f3c 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.lp-btn-main:hover::before {
  opacity: 1;
}

.lp-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(13, 31, 60, 0.35);
}

.lp-btn-main:active {
  transform: translateY(0);
}

.lp-btn-main .btn-text,
.lp-btn-main .btn-spinner {
  position: relative;
  z-index: 1;
}

.lp-btn-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.lp-btn-main:hover .lp-btn-arrow {
  transform: translateX(4px);
}

.lp-btn-main:disabled {
  opacity: 0.7;
  pointer-events: none;
}

.lp-form-footer {
  margin-top: 28px;
  text-align: center;
}

.lp-footer-copy {
  font-size: 0.67rem;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .lp-left {
    display: none;
  }

  .lp-right {
    padding: 40px 28px;
  }
}

@media (max-width: 480px) {
  .lp-right {
    padding: 32px 20px;
  }

  .lp-form-heading {
    font-size: 1.5rem;
  }
}

/* ════════════════════════════════════════════════════════════
   APP LAYOUT
════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition);
  z-index: 100;
}

.sidebar::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.1) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  border-radius: 50%;
  pointer-events: none;
}

.sidebar-header {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--blue-l));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.35);
}

.sidebar-logo-icon svg {
  display: block;
}

.sidebar-brand {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-brand-sub {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 8px 6px;
  opacity: 0.6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-item.active {
  background: rgba(26, 86, 219, 0.2);
  color: var(--text);
  border: 1px solid rgba(26, 86, 219, 0.3);
}

.nav-item.active .nav-icon-svg {
  color: var(--blue-l);
}

.nav-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.nav-icon-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--navy);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-details {
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
}

/* ── Main wrapper ───────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--navy);
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(13, 31, 60, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 1rem;
  flex-shrink: 0;
  z-index: 50;
  position: sticky;
  top: 0;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.hamburger:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.topbar-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Topbar user bar ────────────────────────────────────── */
.topbar-user-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.topbar-icon-btn:hover {
  border-color: rgba(26, 86, 219, 0.4);
  color: var(--blue-l);
}

.topbar-btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-l);
  margin: 0 0.35rem;
  flex-shrink: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: default;
  transition: var(--transition);
}

.topbar-user:hover {
  background: var(--bg-hover);
}

.topbar-avatar {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.75rem !important;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.topbar-user-role {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Page content ───────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   KPI CARDS
════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: cardIn 0.5s ease both;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

/* Borde superior coloreado */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

/* Glow de fondo */
.kpi-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  top: -40px;
  right: -30px;
  pointer-events: none;
}

/* Colores por tipo */
.kpi-blue::before {
  background: linear-gradient(90deg, var(--blue), var(--blue-l));
}

.kpi-green::before {
  background: linear-gradient(90deg, #059669, var(--green));
}

.kpi-amber::before {
  background: linear-gradient(90deg, #d97706, var(--accent));
}

.kpi-red::before {
  background: linear-gradient(90deg, #dc2626, var(--red));
}

.kpi-purple::before {
  background: linear-gradient(90deg, #7c3aed, var(--purple));
}

.kpi-teal::before {
  background: linear-gradient(90deg, #0d9488, var(--teal));
}

.kpi-blue::after {
  background: radial-gradient(circle, rgba(26, 86, 219, 0.1) 0%, transparent 70%);
}

.kpi-green::after {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

.kpi-amber::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

.kpi-red::after {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

.kpi-purple::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

.kpi-teal::after {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, transparent 70%);
}

/* Icono dentro de KPI */
.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  font-size: 1rem;
}

.kpi-blue .kpi-icon {
  background: rgba(26, 86, 219, 0.2);
}

.kpi-green .kpi-icon {
  background: rgba(16, 185, 129, 0.2);
}

.kpi-amber .kpi-icon {
  background: rgba(245, 158, 11, 0.2);
}

.kpi-red .kpi-icon {
  background: rgba(239, 68, 68, 0.2);
}

.kpi-purple .kpi-icon {
  background: rgba(139, 92, 246, 0.2);
}

.kpi-teal .kpi-icon {
  background: rgba(45, 212, 191, 0.2);
}

.kpi-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.kpi-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.kpi-sub {
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

/* Staggered animation */
.kpi-card:nth-child(1) {
  animation-delay: 0.05s;
}

.kpi-card:nth-child(2) {
  animation-delay: 0.10s;
}

.kpi-card:nth-child(3) {
  animation-delay: 0.15s;
}

.kpi-card:nth-child(4) {
  animation-delay: 0.20s;
}

.kpi-card:nth-child(5) {
  animation-delay: 0.25s;
}

.kpi-card:nth-child(6) {
  animation-delay: 0.30s;
}

/* ════════════════════════════════════════════════════════════
   PANELS / CARDS
════════════════════════════════════════════════════════════ */
.card,
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: cardIn 0.5s 0.2s ease both;
}

.card {
  padding: 18px 20px;
}

.card-header,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.card .card-header {
  padding: 0 0 12px;
  margin-bottom: 14px;
}

.card-title,
.panel-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.panel-action {
  font-size: 0.7rem;
  color: var(--blue-l);
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition);
  background: none;
  border: none;
}

.panel-action:hover {
  color: var(--accent);
}

.panel-body {
  padding: 20px;
}

/* Grids */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

/* ════════════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════════════ */
.table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: rgba(26, 86, 219, 0.5);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.search-box::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c8db5' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 10px 20px;
  text-align: left;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table td {
  padding: 11px 20px;
  font-size: 0.8rem;
  color: var(--text);
  vertical-align: middle;
}

.data-table td.text-muted {
  color: var(--muted);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

/* ════════════════════════════════════════════════════════════
   BADGES / CHIPS
════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-success,
.chip.verde {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-warning,
.chip.amarillo {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent2);
}

.badge-danger,
.chip.rojo {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge-info {
  background: rgba(45, 212, 191, 0.15);
  color: var(--teal);
}

.badge-accent {
  background: rgba(26, 86, 219, 0.2);
  color: var(--blue-l);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover {
  background: #1648c0;
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.4);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: var(--accent);
  color: var(--navy);
}

.btn-warning:hover {
  background: #d97706;
}

.btn-ghost {
  background: var(--card2);
  color: var(--muted);
  border-color: var(--border-l);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--border-l);
  color: var(--text);
}

.btn-danger-soft:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

/* ════════════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.form-input,
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.82rem;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(26, 86, 219, 0.5);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-group select option {
  background: var(--card2);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-section {
  margin-bottom: 1.25rem;
}

.form-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-l);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s ease;
}

.modal-box.modal-sm {
  max-width: 420px;
}

.modal-box.modal-lg {
  max-width: 860px;
}

.modal-box.modal-xl {
  max-width: 1080px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   ALERTS
════════════════════════════════════════════════════════════ */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border-left: 3px solid;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
  color: #f87171;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--green);
  color: #34d399;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--accent);
  color: var(--accent2);
}

.alert-info {
  background: rgba(45, 212, 191, 0.1);
  border-color: var(--teal);
  color: var(--teal);
}

/* Error en login */
.lp-error {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  color: #dc2626;
  font-size: 0.85rem;
}

/* ════════════════════════════════════════════════════════════
   TOASTS
════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--card2);
  border: 1px solid var(--border-l);
  box-shadow: var(--shadow);
  min-width: 240px;
  max-width: 360px;
  animation: slideInRight 0.3s ease;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.4);
}

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-msg {
  font-size: 0.82rem;
  color: var(--text);
  flex: 1;
}

/* ════════════════════════════════════════════════════════════
   LOADING
════════════════════════════════════════════════════════════ */
.loading-spinner-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--muted);
  gap: 1rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-l);
  border-top-color: var(--blue-l);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ════════════════════════════════════════════════════════════
   FINANCIERO — Amortización
════════════════════════════════════════════════════════════ */
.amort-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  background: var(--card2);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.amort-item label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.amort-item strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ════════════════════════════════════════════════════════════
   MOBILE OVERLAY
════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ════════════════════════════════════════════════════════════
   MODO CLARO
════════════════════════════════════════════════════════════ */
body.light-mode {
  --navy: #f1f4f9;
  --navy2: #ffffff;
  --navy3: #e8edf5;
  --card: #ffffff;
  --card2: #f8fafc;
  --text: #1a2332;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --border-l: rgba(0, 0, 0, 0.12);
}

body.light-mode .topbar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar::before {
  background: radial-gradient(circle, rgba(26, 86, 219, 0.06) 0%, transparent 70%);
}

body.light-mode .search-box input {
  background: #f1f4f9;
}

body.light-mode .data-table thead th {
  background: #f8fafc;
}

body.light-mode .nav-item.active {
  background: rgba(26, 86, 219, 0.1);
  border-color: rgba(26, 86, 219, 0.2);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --sidebar-w: 260px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-user-info {
    display: none;
  }
}

@media (max-width: 600px) {
  .page-content {
    padding: 16px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    position: absolute;
    bottom: 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }
}

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lpSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lpPanelIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes lpIconPop {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes lpPulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

@keyframes lpScrollCars {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes lpSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.page-enter {
  animation: cardIn 0.3s ease;
}

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-icon {
  width: 44px;
  height: 44px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.4rem;
}

.empty-state h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.empty-state p {
  font-size: 0.8rem;
}

/* ── Misc utilities ─────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.8rem;
}

.util-pos {
  color: var(--green);
  font-weight: 600;
}

.util-neg {
  color: var(--red);
  font-weight: 600;
}

.sep {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* Status bars (dashboard inventario) */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-label {
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 500;
  min-width: 100px;
}

.status-bar-wrap {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.status-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.status-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}
 / *    % %  P r i n t   S t y l e s   ( A d d e d   f o r   K a r d e x   v i s i b i l i t y )    % %  * / 
 @ m e d i a   p r i n t   { 
     / *   H i d e   s i d e b a r ,   t o p b a r ,   a c t i o n s   a n d   n o n - p r i n t a b l e   e l e m e n t s   * / 
     . s i d e b a r ,   . t o p b a r ,   . h e a d e r - a c t i o n s ,   . t o a s t - c o n t a i n e r ,   . m o d a l - o v e r l a y ,   . l p - l e f t ,   . l p - r i g h t   { 
         d i s p l a y :   n o n e   ! i m p o r t a n t ; 
     } 
 
     / *   R e s e t   m a i n   c o n t a i n e r   l a y o u t   f o r   p r i n t   * / 
     b o d y   { 
         b a c k g r o u n d :   w h i t e   ! i m p o r t a n t ; 
         c o l o r :   b l a c k   ! i m p o r t a n t ; 
     } 
 
     . m a i n - w r a p p e r   { 
         m a r g i n :   0   ! i m p o r t a n t ; 
         p a d d i n g :   0   ! i m p o r t a n t ; 
         w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
         p o s i t i o n :   s t a t i c   ! i m p o r t a n t ; 
         t r a n s f o r m :   n o n e   ! i m p o r t a n t ; 
     } 
 
     . p a g e - c o n t e n t   { 
         m a r g i n :   0   ! i m p o r t a n t ; 
         p a d d i n g :   1 0 p x   ! i m p o r t a n t ; 
         b a c k g r o u n d :   w h i t e   ! i m p o r t a n t ; 
         b o x - s h a d o w :   n o n e   ! i m p o r t a n t ; 
         h e i g h t :   a u t o   ! i m p o r t a n t ; 
         o v e r f l o w :   v i s i b l e   ! i m p o r t a n t ; 
     } 
 
     . c a r d   { 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         b o x - s h a d o w :   n o n e   ! i m p o r t a n t ; 
         b o r d e r :   n o n e   ! i m p o r t a n t ; 
         p a d d i n g :   0   ! i m p o r t a n t ; 
         m a r g i n :   0   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   { 
         b o r d e r - c o l l a p s e :   c o l l a p s e   ! i m p o r t a n t ; 
         w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         c o l o r :   b l a c k   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   t h ,   . t a b l e   t d   { 
         c o l o r :   b l a c k   ! i m p o r t a n t ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # c c c   ! i m p o r t a n t ; 
         p a d d i n g :   8 p x   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 1 p x   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   t f o o t   t d   { 
         b o r d e r - t o p :   2 p x   s o l i d   # 0 0 0   ! i m p o r t a n t ; 
         b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ; 
         c o l o r :   b l a c k   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 2 p x   ! i m p o r t a n t ; 
     } 
 
     / *   K e e p   b a d g e   v i s u a l   d i s t i n c t i o n   i n   p r i n t   b u t   r e m o v e   b a c k g r o u n d   * / 
     . b a d g e   { 
         b o r d e r :   1 p x   s o l i d   # 9 9 9   ! i m p o r t a n t ; 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         c o l o r :   b l a c k   ! i m p o r t a n t ; 
         p a d d i n g :   2 p x   6 p x   ! i m p o r t a n t ; 
     } 
 
     . t e x t - r i g h t   { 
         t e x t - a l i g n :   r i g h t   ! i m p o r t a n t ; 
     } 
 } 
  
 
 / *    % %  M e m b r e t e   y   d e t a l l e s   d e   i m p r e s i  n   a v a n z a d o s    % %  * / 
 @ m e d i a   p r i n t   { 
     @ p a g e   { 
         m a r g i n :   1 . 5 c m ; 
         s i z e :   a u t o ; 
     } 
 
     / *   R e s e t e a r   t a m a  o   d e   f u e n t e   p a r a   l e g i b i l i d a d   e x c e l e n t e   e n   p a p e l   * / 
     b o d y   { 
         b a c k g r o u n d :   w h i t e   ! i m p o r t a n t ; 
         c o l o r :   # 1 a 2 3 3 2   ! i m p o r t a n t ; 
         f o n t - f a m i l y :   ' P l u s   J a k a r t a   S a n s ' ,   A r i a l ,   s a n s - s e r i f   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 1 p t   ! i m p o r t a n t ; 
     } 
 
     / *   O c u l t a r   e l e m e n t o s   i r r e l e v a n t e s   * / 
     . s i d e b a r ,   . t o p b a r ,   . h e a d e r - a c t i o n s ,   . t o a s t - c o n t a i n e r ,   . m o d a l - o v e r l a y ,   . l p - l e f t ,   . l p - r i g h t ,   . p a g e - h e a d e r   { 
         d i s p l a y :   n o n e   ! i m p o r t a n t ; 
     } 
 
     / *   M o s t r a r   l a   c a b e c e r a   m e m b r e t a d a   * / 
     # p r i n t - h e a d e r   { 
         d i s p l a y :   b l o c k   ! i m p o r t a n t ; 
     } 
 
     / *   R e s e t   l a y o u t   g e n e r a l   * / 
     . m a i n - w r a p p e r   { 
         m a r g i n :   0   ! i m p o r t a n t ; 
         p a d d i n g :   0   ! i m p o r t a n t ; 
         w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
     } 
 
     . p a g e - c o n t e n t   { 
         m a r g i n :   0   ! i m p o r t a n t ; 
         p a d d i n g :   0   ! i m p o r t a n t ; 
         b a c k g r o u n d :   w h i t e   ! i m p o r t a n t ; 
     } 
 
     . c a r d   { 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         b o x - s h a d o w :   n o n e   ! i m p o r t a n t ; 
         b o r d e r :   n o n e   ! i m p o r t a n t ; 
         p a d d i n g :   0   ! i m p o r t a n t ; 
     } 
 
     / *   E s t i l i z a r   l a   t a b l a   p a r a   i m p r e s i  n   e l e g a n t e   * / 
     . t a b l e   { 
         b o r d e r - c o l l a p s e :   c o l l a p s e   ! i m p o r t a n t ; 
         w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
         m a r g i n - t o p :   2 0 p x   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   t h   { 
         b a c k g r o u n d - c o l o r :   # f 8 f a f c   ! i m p o r t a n t ; 
         c o l o r :   # 4 7 5 5 6 9   ! i m p o r t a n t ; 
         b o r d e r - b o t t o m :   2 p x   s o l i d   # c b d 5 e 1   ! i m p o r t a n t ; 
         f o n t - w e i g h t :   6 0 0   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 0 p t   ! i m p o r t a n t ; 
         t e x t - t r a n s f o r m :   u p p e r c a s e   ! i m p o r t a n t ; 
         l e t t e r - s p a c i n g :   0 . 0 5 e m   ! i m p o r t a n t ; 
         p a d d i n g :   1 0 p x   8 p x   ! i m p o r t a n t ; 
         t e x t - a l i g n :   l e f t   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   t h . t e x t - r i g h t ,   . t a b l e   t d . t e x t - r i g h t   { 
         t e x t - a l i g n :   r i g h t   ! i m p o r t a n t ; 
     } 
 
     . t a b l e   t d   { 
         p a d d i n g :   8 p x   ! i m p o r t a n t ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 0 p t   ! i m p o r t a n t ; 
         c o l o r :   # 1 e 2 9 3 b   ! i m p o r t a n t ; 
     } 
 
     / *   F i l a s   a l t e r n a s   t e n u e s   o p c i o n a l   * / 
     . t a b l e   t b o d y   t r : n t h - c h i l d ( e v e n )   { 
         b a c k g r o u n d - c o l o r :   # f d f d f d   ! i m p o r t a n t ; 
     } 
 
     / *   T f o o t   p a r a   t o t a l e s   f i r m e s   * / 
     . t a b l e   t f o o t   { 
         d i s p l a y :   t a b l e - r o w - g r o u p   ! i m p o r t a n t ;   / *   F o r z a   p a g e - b r e a k   i f   n e e d e d   * / 
     } 
 
     . t a b l e   t f o o t   t d   { 
         b o r d e r - t o p :   2 p x   s o l i d   # 9 4 a 3 b 8   ! i m p o r t a n t ; 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         f o n t - s i z e :   1 1 p t   ! i m p o r t a n t ; 
         p a d d i n g - t o p :   1 5 p x   ! i m p o r t a n t ; 
     } 
 
     / *   B a d g e s   e s t i l o   f l a t   m i n i m a l i s t a   * / 
     . b a d g e   { 
         b o r d e r :   1 p x   s o l i d   # c b d 5 e 1   ! i m p o r t a n t ; 
         b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ; 
         c o l o r :   # 4 7 5 5 6 9   ! i m p o r t a n t ; 
         p a d d i n g :   2 p x   6 p x   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   4 p x   ! i m p o r t a n t ; 
         f o n t - s i z e :   8 . 5 p t   ! i m p o r t a n t ; 
     } 
 
     / *   F o r z a r   c o l o r e s   d e   t r a n s a c c i o n e s   e n   i m p r e s i  n   * / 
     t d [ s t y l e * = ' c o l o r : v a r ( - - d a n g e r ) ' ] ,   
     t d [ s t y l e * = ' c o l o r : v a r ( - - s u c c e s s ) ' ]   { 
             c o l o r :   # 0 0 0   ! i m p o r t a n t ;   / *   E n   p a p e l   m i n i m a l i s t a ,   e s   m e j o r   e l   n e g r o   o   g r i s   o s c u r o   p a r a   l e c t u r a   d e   m o n t o s   o   d e j a r l o   c o m o   v i e n e   * / 
             f o n t - w e i g h t :   6 0 0   ! i m p o r t a n t ; 
     } 
 } 
  
 
/* -- ESTILOS DE IMPRESIN FORZADOS -- */
@media print {
  @page { margin: 1cm; size: auto; }
  
  /* Reset Fondo e Textos */
  body, html, .app, .main-wrapper, .page-content {
      background: white !important;
      color: black !important;
      margin: 0 !important;
      padding: 0 !important;
      height: auto !important;
      overflow: visible !important;
  }
  
  /* Ocultar Elementos UI */
  .sidebar, .sidebar-overlay, .topbar, .header-actions, .toast-container, .modal-overlay, .lp-left, .lp-right, .page-header {
      display: none !important;
  }

  /* Tabla Simple */
  .table { width: 100% !important; border-collapse: collapse !important; margin-top: 20px !important; }
  .table th { background: #f0f0f0 !important; color: #000 !important; font-size: 11px !important; padding: 6px !important; border-bottom: 2px solid #ccc !important; }
  .table td { color: #000 !important; font-size: 11px !important; padding: 6px !important; border-bottom: 1px solid #ddd !important; }
  .table tfoot td { font-weight: bold !important; border-top: 2px solid #000 !important; }
  
  /* Etiquetas Texto */
  .badge { background: transparent !important; color: #000 !important; border: 1px solid #ccc !important; padding: 2px 4px !important; }
  td[style*='color:var(--danger)'], td[style*='color:var(--success)'] { color: #000 !important; font-weight: bold !important; }
  
  #print-header { display: block !important; }
}
