/* ============================================================
   shared/styles.css — SUITE2.0
   Sistema de temas: Modo Oscuro (dark) y Modo Claro (light)
   Incluido desde menu.php para que aplique en todo el sistema.
   ============================================================ */

/* ── MODO CLARO — Variables base (default) ───────────────── */
:root {
    /* Brand */
    --sa-primary: #2563eb;
    --sa-secondary: #1e40af;
    --sa-accent: #3b82f6;
    --sa-coral: #f97316;

    /* Colores de estado */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Superficies — MODO CLARO */
    --bg-main: #f0f4f8;
    --surface-primary: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-hover: #e8f0fe;
    --border-color: rgba(37, 99, 235, 0.2);

    /* Texto — MODO CLARO */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Sombras */
    --shadow-primary: 0 10px 25px rgba(37, 99, 235, 0.12);
    --shadow-secondary: 0 4px 15px rgba(37, 99, 235, 0.08);
    --glow-effect: 0 0 30px rgba(37, 99, 235, 0.15);

    /* Modal */
    --modal-bg: #ffffff;
    --modal-header: #f8fafc;
    --modal-border: #dee2e6;
    --modal-close-filter: invert(0);
}

/* ── MODO CLARO EXPLÍCITO (Fuerza la sobreescritura) ────────── */
html[data-theme="light"] {
    --bg-main: #f0f4f8;
    --surface-primary: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-hover: #e8f0fe;
    --border-color: rgba(37, 99, 235, 0.2);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --shadow-primary: 0 10px 25px rgba(37, 99, 235, 0.12);
    --shadow-secondary: 0 4px 15px rgba(37, 99, 235, 0.08);
    --glow-effect: 0 0 30px rgba(37, 99, 235, 0.15);

    --modal-bg: #ffffff;
    --modal-header: #f8fafc;
    --modal-border: #dee2e6;
    --modal-close-filter: invert(0);
}

/* ── MODO OSCURO — Variables ─────────────────────────────── */
html[data-theme="dark"] {
    --bg-main: #020617;
    --surface-primary: rgba(37, 99, 235, 0.08);
    --surface-secondary: rgba(37, 99, 235, 0.05);
    --surface-hover: rgba(37, 99, 235, 0.12);
    --border-color: rgba(37, 99, 235, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.7);
    --text-muted: rgba(248, 250, 252, 0.5);

    --shadow-primary: 0 10px 25px rgba(37, 99, 235, 0.15);
    --shadow-secondary: 0 4px 15px rgba(37, 99, 235, 0.1);
    --glow-effect: 0 0 30px rgba(37, 99, 235, 0.3);

    --modal-bg: #0f172a;
    --modal-header: rgba(37, 99, 235, 0.08);
    --modal-border: rgba(37, 99, 235, 0.15);
    --modal-close-filter: invert(1);
}

/* ── APLICAR TRANSICIÓN SUAVE ────────────────────────────── */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.2s ease !important;
}

/* Excepciones: animaciones no deben tener transition override */
.skeleton-cell,
.recargar-btn {
    transition: background-color 0.3s ease, opacity 0.3s ease !important;
}

/* ── BODY ───────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background-color: var(--bg-main) !important;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.07) 0%, transparent 50%) !important;
    background-attachment: fixed !important;
    color: var(--text-primary) !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
}

html[data-theme="dark"] body {
    background-color: #020617 !important;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.10) 0%, transparent 50%) !important;
}

html[data-theme="light"] body {
    background-color: #f0f4f8 !important;
    color: #1e293b !important;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.07) 0%, transparent 50%) !important;
}

/* ── NAVBAR — Siempre azul oscuro en ambos modos ────────── */
.navbar {
    backdrop-filter: blur(20px) !important;
    background: rgba(37, 99, 235, 0.92) !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.3) !important;
    box-shadow: var(--shadow-secondary) !important;
    padding: 0.5rem 0 !important;
    min-height: 60px !important;
    position: relative !important;
    z-index: 1030 !important;
}

.navbar-brand {
    color: white !important;
    font-weight: 800 !important;
    font-size: 1.3rem !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem !important;
}

.navbar-brand:hover {
    color: var(--sa-coral) !important;
}

.navbar-brand i {
    color: var(--sa-coral) !important;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 600 !important;
    padding: 0.5rem 0.8rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    margin: 0 0.1rem !important;
    font-size: 0.9rem !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--sa-coral) !important;
    transform: translateY(-1px) !important;
}

.navbar-nav .nav-link i {
    margin-right: 0.4rem !important;
    font-size: 0.85rem !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    padding: 0.3rem 0.5rem !important;
}

/* Dropdown navegar siempre con fondo oscuro */
.dropdown-menu {
    background: #0f172a !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-primary) !important;
    padding: 0.5rem !important;
    margin-top: 0.3rem !important;
}

.dropdown-item {
    color: #f8fafc !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.8rem !important;
    margin-bottom: 0.1rem !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
}

.dropdown-item:hover {
    background: rgba(37, 99, 235, 0.15) !important;
    color: var(--sa-accent) !important;
}

.dropdown-item i {
    color: var(--sa-accent) !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(37, 99, 235, 0.97) !important;
        border-radius: 12px !important;
        margin-top: 0.5rem !important;
        padding: 0.8rem !important;
    }

    .navbar-nav {
        gap: 0.3rem !important;
    }
}

/* ── BOTÓN TOGGLE TEMA ───────────────────────────────────── */
#btnToggleTheme {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 0.3rem 0.7rem !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: background 0.3s ease, transform 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

#btnToggleTheme:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: scale(1.05) !important;
}

/* ── SALDO USUARIO ──────────────────────────────────────── */
#header-user-balance {
    background: rgba(255, 255, 255, 0.12) !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 700 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 0.9rem !important;
}

/* ── CARDS ──────────────────────────────────────────────── */
.card {
    background: var(--surface-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
}

.card-header {
    background: var(--surface-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.card-body {
    color: var(--text-primary) !important;
}

.card-stats {
    background: var(--surface-primary) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-secondary) !important;
    transition: all 0.3s ease !important;
}

.card-stats:hover {
    border-color: var(--sa-primary) !important;
    box-shadow: var(--shadow-primary) !important;
    transform: translateY(-8px) !important;
}

/* ── Clase especial para cards de cuentas (dark-card) ────── */
.bg-dark-card {
    background: var(--surface-primary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="light"] .bg-dark-card {
    background: #ffffff !important;
    color: #1e293b !important;
}

html[data-theme="dark"] .bg-dark-card {
    background: rgba(15, 23, 42, 0.9) !important;
}

.bg-dark-header {
    background: var(--surface-secondary) !important;
}

html[data-theme="dark"] .bg-dark-header {
    background: rgba(2, 6, 23, 0.7) !important;
}

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--surface-primary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--sa-primary), var(--sa-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── TEXTO GENERAL ───────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

p,
span,
div,
label,
small {
    color: var(--text-primary) !important;
}

/* ── TABLAS ─────────────────────────────────────────────── */
.table {
    color: var(--text-primary) !important;
}

.table thead th {
    background: linear-gradient(135deg, var(--sa-primary), var(--sa-accent)) !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 1rem !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody td {
    background: var(--surface-secondary) !important;
    border-color: var(--border-color) !important;
    padding: 0.75rem 1rem !important;
    vertical-align: middle;
    color: var(--text-primary) !important;
}

.table-striped tbody tr:nth-of-type(odd) td {
    background: var(--surface-hover) !important;
}

.table-hover tbody tr:hover td {
    background: var(--surface-hover) !important;
    transition: all 0.2s ease;
}

.table-responsive {
    background: var(--surface-primary) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-secondary) !important;
}

/* Filas coloreadas */
.table-success td {
    background: linear-gradient(135deg, var(--success), #059669) !important;
    color: white !important;
}

.table-danger td {
    background: linear-gradient(135deg, var(--danger), #dc2626) !important;
    color: white !important;
}

.table-info td {
    background: linear-gradient(135deg, var(--info), #0284c7) !important;
    color: white !important;
}

.table-warning td {
    background: linear-gradient(135deg, var(--warning), #d97706) !important;
    color: white !important;
}

.table-secondary td {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    color: white !important;
}

/* Tabla dark explícita (vistaProductos rows, modo claro override) */
html:not([data-theme="dark"]) .table-dark td,
html:not([data-theme="dark"]) .table-dark th {
    background: #343a40 !important;
    color: #f8fafc !important;
}

/* ── BADGES DE ESTADO ───────────────────────────────────── */
.badge {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    width: max-content;
    display: inline-block;
    text-align: center;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.badge.bg-orange {
    background-color: #fd7e14 !important;
    color: white !important;
}

.text-orange-glow {
    color: #fd7e14 !important;
    text-shadow: 0 0 5px rgba(253, 126, 20, 0.3);
}

.badge.bg-primary {
    background-color: #0d6efd !important;
    color: white !important;
}

/* ── FECHAS ─────────────────────────────────────────────── */
.fecha-vencida {
    color: #dc3545;
    font-weight: bold;
}

.fecha-proxima {
    color: #ffc107;
    font-weight: bold;
}

/* ── FILTRO DE CATEGORÍAS ───────────────────────────────── */
.category-filter-container {
    position: relative;
    background-color: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 35px;
    margin-bottom: 15px;
}

.category-scroller,
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    min-height: 112px;
    max-height: 112px;
    scroll-behavior: smooth;
    gap: 8px 6px;
    padding: 2px 4px 2px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--sa-primary) transparent;
}

.category-scroller::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
    width: 6px;
}

.category-scroller::-webkit-scrollbar-thumb,
.category-tabs::-webkit-scrollbar-thumb {
    background-color: var(--sa-primary);
    border-radius: 4px;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--surface-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.82rem;
    white-space: nowrap;
    margin-bottom: 3px;
}

.category-tab:hover {
    background: var(--surface-hover);
    border-color: var(--sa-primary);
}

.category-tab.active {
    background: var(--sa-primary);
    color: white;
    border-color: var(--sa-primary);
    font-weight: 600;
}

.category-count {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0px 5px;
    font-size: 0.7rem;
    margin-left: 5px;
    min-width: 18px;
    text-align: center;
    color: inherit;
}

.category-count.no-disponible {
    background-color: rgba(220, 53, 69, 0.35);
}

.category-count.pocas-disponibles {
    background-color: rgba(255, 193, 7, 0.35);
}

.category-count.buen-stock {
    background-color: rgba(40, 167, 69, 0.35);
    font-weight: bold;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.scroll-arrow:hover {
    background: var(--sa-primary);
    color: white;
}

.scroll-left {
    left: 5px;
}

.scroll-right {
    right: 5px;
}

/* ── FORMULARIOS ────────────────────────────────────────── */
.form-control,
.form-select {
    background: var(--surface-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.form-control:focus,
.form-select:focus {
    background: var(--surface-hover) !important;
    border-color: var(--sa-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-select option {
    background: var(--surface-primary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .form-select option {
    background: #0f172a !important;
}

.form-label {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.input-group-text {
    background: var(--surface-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.form-check-label {
    color: var(--text-primary) !important;
}

.form-check-input {
    background-color: var(--surface-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Inputs con clase bg-dark en modo claro */
html:not([data-theme="dark"]) .bg-dark.form-control,
html:not([data-theme="dark"]) .bg-dark.form-select,
html:not([data-theme="dark"]) input.bg-dark,
html:not([data-theme="dark"]) textarea.bg-dark,
html:not([data-theme="dark"]) select.bg-dark {
    background: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
}

html:not([data-theme="dark"]) .text-white.form-control,
html:not([data-theme="dark"]) .text-white.form-select {
    color: var(--text-primary) !important;
}

/* ── MODALES — UNIVERSAL DARK/LIGHT ─────────────────────── */
.modal-content {
    background: var(--modal-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: 16px !important;
}

.modal-header {
    background: var(--modal-header) !important;
    border-bottom: 1px solid var(--modal-border) !important;
    color: var(--text-primary) !important;
}

.modal-footer {
    background: var(--modal-header) !important;
    border-top: 1px solid var(--modal-border) !important;
    color: var(--text-primary) !important;
}

.modal-body {
    color: var(--text-primary) !important;
}

.modal-title {
    color: var(--text-primary) !important;
}

/* btn-close adaptado al tema */
.btn-close {
    filter: var(--modal-close-filter) !important;
}

html:not([data-theme="dark"]) .btn-close-white {
    filter: invert(0) !important;
}

html[data-theme="dark"] .btn-close-white {
    filter: invert(1) !important;
}

/* ── ALERTAS DENTRO DE MODALES ───────────────────────────── */
.alert-info {
    background-color: rgba(6, 182, 212, 0.12) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .alert-info {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #e0f2fe !important;
}

.alert-secondary {
    background-color: var(--surface-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: var(--text-primary) !important;
}

/* ── BOTONES ─────────────────────────────────────────────── */
.btn {
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-secondary) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sa-primary), var(--sa-accent)) !important;
    border: none !important;
    color: white !important;
}

.btn-orange {
    background-color: #fd7e14;
    color: white;
}

.btn-orange:hover {
    background-color: #e76b00;
    color: white;
}

.btn-orange.active {
    background-color: #e76b00 !important;
    color: white !important;
}

/* btn-outline en modo claro */
html:not([data-theme="dark"]) .btn-outline-secondary {
    color: #475569 !important;
    border-color: #94a3b8 !important;
}

html:not([data-theme="dark"]) .btn-outline-secondary:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

html:not([data-theme="dark"]) .btn-outline-light {
    color: #475569 !important;
    border-color: #94a3b8 !important;
}

html:not([data-theme="dark"]) .btn-outline-light:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* ── BOTÓN RECARGAR ─────────────────────────────────────── */
.recargar-btn {
    display: flex !important;
    align-items: center;
    color: white !important;
    background: linear-gradient(135deg, var(--success), #059669) !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.8rem !important;
    font-weight: 600 !important;
    animation: pulseGreen 2s infinite !important;
    border: none !important;
    font-size: 0.85rem !important;
}

.recargar-btn:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px) scale(1.02) !important;
    color: white !important;
}

@keyframes pulseGreen {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* ── FILTROS CONTAINER ───────────────────────────────────── */
.filtros-container {
    background: var(--surface-primary) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-secondary) !important;
}

/* ── SWEETALERT2 — Responde al tema ─────────────────────── */
html[data-theme="dark"] .swal2-popup {
    background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
    color: white !important;
    border-radius: 15px !important;
}

html[data-theme="dark"] .swal2-title {
    color: white !important;
    font-weight: 600 !important;
}

html:not([data-theme="dark"]) .swal2-popup {
    background: #ffffff !important;
    color: #1e293b !important;
    border-radius: 15px !important;
}

html:not([data-theme="dark"]) .swal2-title {
    color: #1e293b !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: white !important;
}

.swal2-cancel {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: white !important;
}

/* ── SKELETON LOADING ────────────────────────────────────── */
.skeleton-row td {
    border-radius: 6px;
}

.skeleton-cell {
    height: 20px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-secondary) 25%, var(--surface-hover) 50%, var(--surface-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── PAGINACIÓN ─────────────────────────────────────────── */
.pagination-container .btn {
    min-width: 38px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── NOTIFICACIONES TOAST ───────────────────────────────── */
.notificacion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    opacity: 0.95;
    box-shadow: var(--shadow-primary);
    transition: opacity 0.3s ease;
}

.notificacion-success {
    background-color: var(--success);
}

.notificacion-error {
    background-color: var(--danger);
}

.notificacion.fadeOut {
    opacity: 0;
}

/* ── ANIMACIONES DE TABLA ───────────────────────────────── */
@keyframes highlightRow {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(16, 185, 129, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

.fila-actualizada {
    animation: highlightRow 2s ease;
}

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb-item a {
    color: var(--sa-primary) !important;
}

.breadcrumb-item.active {
    color: var(--text-muted) !important;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--text-muted) !important;
}

/* ── SCROLLBARS ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--sa-primary), var(--sa-accent));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--sa-secondary), var(--sa-primary));
}

/* ── FONDOS ESPECIALES DE SPOTIFY/YOUTUBE ────────────────── */
/* card-header bg-success en modo claro mantiene texto blanco */
.card-header.bg-success,
.card-header[class*="bg-success"] {
    color: white !important;
}

.card-header.bg-success *,
.card-header[class*="bg-success"] * {
    color: white !important;
}

/* ── TEXT-WHITE en modo claro → texto oscuro excepto en navbar/modal-header dark ── */
html:not([data-theme="dark"]) .text-white:not(.navbar *):not(.modal-header.bg-success *):not(.btn):not(.badge):not(.card-header.bg-success *) {
    color: var(--text-primary) !important;
}

/* Código preformateado */
code {
    background: var(--surface-secondary) !important;
    color: #e879f9 !important;
    border-radius: 4px;
    padding: 2px 6px;
}

html:not([data-theme="dark"]) code {
    color: #7c3aed !important;
}

/* ── RECARGAR BTN en menú (animación bounce) ─────────────── */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}