/* ====================================================
   PC-Doctor Pro - Sistema Profesional de Diagnóstico
   Diseño Premium Dark Mode & Light Mode + Responsive
   ==================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Mode Definitions (Variables) ---- */
:root, [data-theme="dark"] {
    --bg-body:        #060b18;
    --bg-sidebar:     #080e1e;
    --bg-navbar:      rgba(8,14,30,0.85);
    --bg-card:        #111827;
    --bg-card-alt:    #0d1526;
    --bg-hover:       #1a2540;
    --bg-input:       #0a111f;
    --border-color:   rgba(255,255,255,0.08);
    --border-light:   rgba(255,255,255,0.04);
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --primary:        #3b82f6;
    --primary-light:  rgba(59,130,246,0.12);
    --success:        #10b981;
    --success-light:  rgba(16,185,129,0.12);
    --warning:        #f59e0b;
    --warning-light:  rgba(245,158,11,0.12);
    --danger:         #ef4444;
    --danger-light:   rgba(239,68,68,0.12);
    --info:           #06b6d4;
    --info-light:     rgba(6,182,212,0.12);
    --accent:         #8b5cf6;
    --accent-light:   rgba(139,92,246,0.12);
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      20px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:      0 10px 40px rgba(0,0,0,0.5);
    --transition:     all 0.22s cubic-bezier(0.4,0,0.2,1);
    --sidebar-width:  260px;
    --order-code-bg:  rgba(59,130,246,0.12);
    --order-code-text:#60a5fa;
    --dropdown-bg:    #111827;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-body:        #f1f5f9;
    --bg-sidebar:     #ffffff;
    --bg-navbar:      rgba(255,255,255,0.95);
    --bg-card:        #ffffff;
    --bg-card-alt:    #f8fafc;
    --bg-hover:       #f1f5f9;
    --bg-input:       #ffffff;
    --border-color:   #cbd5e1;
    --border-light:   #e2e8f0;
    --text-primary:   #0f172a;
    --text-secondary: #334155;
    --text-muted:     #64748b;
    --primary:        #2563eb;
    --primary-light:  rgba(37,99,235,0.1);
    --success:        #059669;
    --success-light:  rgba(5,150,105,0.1);
    --warning:        #d97706;
    --warning-light:  rgba(217,119,6,0.1);
    --danger:         #dc2626;
    --danger-light:   rgba(220,38,38,0.1);
    --info:           #0284c7;
    --info-light:     rgba(2,132,199,0.1);
    --accent:         #7c3aed;
    --accent-light:   rgba(124,58,237,0.1);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg:      0 10px 30px rgba(0,0,0,0.1);
    --order-code-bg:  #dbeafe;
    --order-code-text:#1e40af;
    --dropdown-bg:    #ffffff;
}

/* Base Overrides para compatibilidad de texto y fondos */
[data-theme="light"] .text-white {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-secondary {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-dark-card {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-primary) !important;
}

/* ---- Reset y Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; opacity: 0.4; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================
   LAYOUT APP
   ============================================ */
.app-wrapper {
    display: flex;
    flex: 1;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    min-height: 68px;
    flex-shrink: 0;
}

.sidebar-brand img {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Section Labels */
.sidebar-section-label {
    padding: 1.2rem 1.4rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0.5rem 0.75rem;
    margin: 0;
    flex: 1;
}

.sidebar-menu li { margin-bottom: 2px; }

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.sidebar-menu li a .menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
    flex-shrink: 0;
    background: transparent;
}

.sidebar-menu li a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-menu li a:hover .menu-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-menu li a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.sidebar-menu li a.active .menu-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Botón hamburguesa / toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 300;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.sidebar-toggle:hover { color: white; background: var(--primary); }

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    backdrop-filter: blur(2px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ============================================
   TOP NAVBAR
   ============================================ */
.top-navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.75rem;
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.top-navbar .page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

/* Botón de cambio de tema Claro / Oscuro */
.theme-toggle-btn {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50px;
    padding: 0.4rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   CONTENT BODY
   ============================================ */
.content-body {
    padding: 1.75rem;
    flex: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card-dark:hover { border-color: var(--border-color); }

.card-header-dark {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card-alt) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title-dark {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   STAT CARDS (DASHBOARD)
   ============================================ */
.stat-card {
    padding: 1.4rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.15;
}

.stat-card.stat-primary::before { background: var(--primary); }
.stat-card.stat-success::before { background: var(--success); }
.stat-card.stat-warning::before { background: var(--warning); }
.stat-card.stat-info::before    { background: var(--info); }
.stat-card.stat-danger::before  { background: var(--danger); }

.stat-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-icon-wrap.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-wrap.success { background: var(--success-light); color: var(--success); }
.stat-icon-wrap.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon-wrap.info    { background: var(--info-light);    color: var(--info); }
.stat-icon-wrap.danger  { background: var(--danger-light);  color: var(--danger); }

.stat-info .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-info .stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   TABLES
   ============================================ */
.table-dark-custom {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
    margin: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bg-card) !important;
}

.table-dark-custom thead th {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-muted) !important;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.85rem 1.1rem;
    white-space: nowrap;
}

.table-dark-custom tbody td {
    background-color: var(--bg-card) !important;
    padding: 0.9rem 1.1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light) !important;
    font-size: 0.875rem;
    color: var(--text-primary) !important;
}

.table-dark-custom tbody tr:hover td {
    background-color: var(--bg-hover) !important;
}

.table-dark-custom tbody tr:last-child td {
    border-bottom: none !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59,130,246,0.45);
    color: #ffffff !important;
}

.btn-primary-custom:active { transform: translateY(0); }

/* ============================================
   FORMS
   ============================================ */
.form-control-dark,
.form-select-dark {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: var(--transition);
    width: 100%;
}

.form-control-dark:focus,
.form-select-dark:focus {
    background: var(--bg-input) !important;
    border-color: var(--primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none;
}

.form-control-dark::placeholder { color: var(--text-muted); }

.form-label-dark {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

/* ============================================
   MODALES
   ============================================ */
.modal-content-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lg);
}

.modal-header-dark {
    background: var(--bg-card-alt) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.1rem 1.4rem;
}

.modal-footer-dark {
    background: var(--bg-card-alt) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1rem 1.4rem;
}

[data-theme="light"] .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(0) !important;
}

/* ============================================
   BADGES (High Contrast Dark & Light)
   ============================================ */
.badge-status {
    padding: 0.3em 0.75em;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Dark Mode Badges */
[data-theme="dark"] .badge-status.ingresado       { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
[data-theme="dark"] .badge-status.en-diagnostico  { background: rgba(6,182,212,0.15);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.3);  }
[data-theme="dark"] .badge-status.pend-aprobacion { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
[data-theme="dark"] .badge-status.en-reparacion   { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
[data-theme="dark"] .badge-status.listo           { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
[data-theme="dark"] .badge-status.entregado       { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
[data-theme="dark"] .badge-status.cancelado       { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3);  }

/* Light Mode Badges (High Contrast) */
[data-theme="light"] .badge-status.ingresado       { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
[data-theme="light"] .badge-status.en-diagnostico  { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
[data-theme="light"] .badge-status.pend-aprobacion { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
[data-theme="light"] .badge-status.en-reparacion   { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
[data-theme="light"] .badge-status.listo           { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
[data-theme="light"] .badge-status.entregado       { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
[data-theme="light"] .badge-status.cancelado       { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #060b18 0%, #0f172a 40%, #0d1a3a 100%);
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
}

[data-theme="light"] .login-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #dbeafe 100%);
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

/* ============================================
   BREADCRUMB / PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-title h4 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.page-header-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   PIPELINE FILTER PILLS
   ============================================ */
.pipeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.25rem;
}

.pipeline-filters .filter-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    background: var(--bg-card);
}

.pipeline-filters .filter-pill:hover,
.pipeline-filters .filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
}

/* ============================================
   FLASH ALERTS
   ============================================ */
.flash-alert {
    border-radius: var(--radius-sm);
    border: 1px solid;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   WORKBENCH (MESA TÉCNICA)
   ============================================ */
.workbench-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.workbench-header {
    padding: 0.9rem 1.25rem;
    background: var(--bg-card-alt);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.workbench-header-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.totals-panel {
    background: var(--bg-card-alt);
    border-top: 1px solid var(--border-color);
    padding: 1.1rem 1.25rem;
}

/* ============================================
   ALERTS (Bootstrap overrides)
   ============================================ */
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
[data-theme="dark"] .alert-info    { background: rgba(6,182,212,0.12);  border-color: rgba(6,182,212,0.3);  color: #67e8f9; }

[data-theme="light"] .alert-success { background: #d1fae5; border-color: #6ee7b7; color: #047857; }
[data-theme="light"] .alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
[data-theme="light"] .alert-warning { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
[data-theme="light"] .alert-info    { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }

/* ============================================
   UTILITIES & CODES
   ============================================ */
.text-xs  { font-size: 0.7rem; }
.text-sm  { font-size: 0.8rem; }
.text-md  { font-size: 0.875rem; }

.order-code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--order-code-text);
    background: var(--order-code-bg);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.badge-stock-low {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2em 0.6em;
    border-radius: 50px;
}

.badge-stock-ok {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2em 0.6em;
    border-radius: 50px;
}

.equipo-type-pill {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

.dropdown-menu-dark {
    background-color: var(--dropdown-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="light"] .dropdown-menu-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: var(--shadow-lg) !important;
}

[data-theme="light"] .dropdown-menu-dark .dropdown-item {
    color: #334155 !important;
}

[data-theme="light"] .dropdown-menu-dark .dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* ============================================
   RESPONSIVE - TABLET (max 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.4);
    }

    .sidebar-overlay.open { display: block; }

    .sidebar-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .top-navbar {
        padding-left: 4rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max 640px)
   ============================================ */
@media (max-width: 640px) {
    .content-body { padding: 1rem; }

    .top-navbar { padding: 0 1rem 0 4rem; }

    .stat-card { padding: 1rem; }
    .stat-info .stat-value { font-size: 1.4rem; }

    .page-header { margin-bottom: 1rem; }
    .page-header h4 { font-size: 1rem; }

    .card-header-dark { padding: 0.9rem 1rem; flex-direction: column; align-items: flex-start; }

    .table-responsive { overflow-x: auto; }

    .btn-primary-custom { font-size: 0.8rem; padding: 0.5rem 1rem; }

    .login-card { padding: 1.75rem 1.25rem; }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.35s ease both;
}

.fade-in-up-1 { animation-delay: 0.05s; }
.fade-in-up-2 { animation-delay: 0.1s;  }
.fade-in-up-3 { animation-delay: 0.15s; }
.fade-in-up-4 { animation-delay: 0.2s;  }

.stat-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--warning-light);
    border-top-color: var(--warning);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
