/* =========================================
   Stripe Style Dashboard - Full Theme
   ========================================= */
:root {
    --primary-bg: #f7f9fc;
    --card-bg: #ffffff;
    --text-color: #334155;
    --subtext-color: #64748b;
    --accent-color: #635bff;
    /* Stripe Purple */
    --accent-hover: #4b45c3;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Fallback to standard fonts */
}

.content-wrapper {
    background-color: var(--primary-bg);
}

/* CARDS */
.stripe-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stripe-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* STATS CARDS */
.stripe-stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stripe-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bg-purple-light {
    background-color: #e0e7ff;
    color: var(--accent-color);
}

.bg-green-light {
    background-color: #dcfce7;
    color: var(--success-color);
}

.bg-yellow-light {
    background-color: #fef3c7;
    color: var(--warning-color);
}

.bg-red-light {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.stripe-stat-info h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.stripe-stat-info p {
    margin: 0;
    color: var(--subtext-color);
    font-size: 14px;
    font-weight: 500;
}

.stripe-stat-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--subtext-color);
    margin-bottom: 5px;
}

/* Stat Card Modifiers */
.stat-success {
    border-left: 4px solid var(--success-color);
}

.stat-success .stripe-stat-icon {
    color: var(--success-color);
    background: #dcfce7;
}

.stat-success .stripe-stat-value {
    color: #1e293b;
}

.stat-purple {
    border-left: 4px solid var(--accent-color);
}

.stat-purple .stripe-stat-icon {
    color: var(--accent-color);
    background: #e0e7ff;
}

.stat-purple .stripe-stat-value {
    color: #1e293b;
}

.stat-danger {
    border-left: 4px solid var(--danger-color);
}

.stat-danger .stripe-stat-icon {
    color: var(--danger-color);
    background: #fee2e2;
}

.stat-danger .stripe-stat-value {
    color: #1e293b;
}

.stat-warning {
    border-left: 4px solid var(--warning-color);
}

.stat-warning .stripe-stat-icon {
    color: var(--warning-color);
    background: #fef3c7;
}

.stat-warning .stripe-stat-value {
    color: #1e293b;
}

/* BUTTONS */
.btn-stripe {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-stripe:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-stripe-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-stripe-primary:hover {
    background-color: var(--accent-hover);
    color: white;
}

.btn-stripe-outline {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-color);
}

.btn-stripe-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: #f8fafc;
}

.btn-stripe-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-stripe-danger:hover {
    background-color: #dc2626;
    color: white;
}

.btn-stripe-success {
    background-color: var(--success-color);
    color: white;
}

.btn-stripe-success:hover {
    background-color: #059669;
    color: white;
}


/* TABLES */
.stripe-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.stripe-table thead th {
    background-color: #f8fafc;
    color: var(--subtext-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.stripe-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-color);
    font-size: 14px;
    vertical-align: middle;
}

.stripe-table tbody tr:hover {
    background-color: #f8fafc;
}

/* BADGES */
.stripe-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #075985;
}

/* HEADER & TITLES */
.dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--subtext-color);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* FORM STYLES */
.stripe-form-group label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}

.form-control,
.form-control-modern {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
    height: 42px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.form-control:focus,
.form-control-modern:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.input-group-addon {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

/* DARK MODE OVERRIDES FOR SPECIFIC MODULES (FIBER, INFRA) */
.stripe-card-dark {
    background: #1e293b;
    /* Slate 800 */
    border: 1px solid #334155;
    color: #f8fafc;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.stripe-table-dark thead th {
    background-color: #0f172a;
    /* Slate 900 */
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}

.stripe-table-dark tbody td {
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
}

.stripe-table-dark tbody tr:hover {
    background-color: #334155;
}

.form-control-dark {
    background-color: #0f172a;
    border: 1px solid #475569;
    color: #f1f5f9;
}

.form-control-dark:focus {
    background-color: #0f172a;
    border-color: var(--accent-color);
    color: white;
}

/* SIDEBAR MODERNIZATION */
.skin-blue .main-sidebar {
    background-color: #1a1f36;
    /* Dark Navy */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.skin-blue .sidebar-menu>li.header {
    background: transparent;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    padding-left: 20px;
}

.skin-blue .sidebar-menu>li>a {
    border-left: 3px solid transparent;
    color: #cbd5e1;
    padding: 12px 18px;
    font-weight: 500;
}

.skin-blue .sidebar-menu>li:hover>a,
.skin-blue .sidebar-menu>li.active>a {
    background: rgb(255 255 255 / 5%);
    border-left-color: var(--accent-color);
    color: #ffffff;
}

/* Sidebar Icons Glow */
.skin-blue .sidebar-menu>li>a>i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.skin-blue .sidebar-menu>li:hover>a>i,
.skin-blue .sidebar-menu>li.active>a>i {
    color: var(--accent-color);
    transform: scale(1.15);
    text-shadow: 0 0 8px rgba(99, 91, 255, 0.6);
}

.skin-blue .treeview-menu {
    background: #1e243d;
}

.skin-blue .treeview-menu>li>a {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 30px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.skin-blue .treeview-menu>li:hover>a {
    color: #ffffff;
    opacity: 1;
    transform: translateX(6px);
}

/* =========================================
   Global Data Flow Background
   ========================================= */
.data-flow-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: #f8fafc;
    /* Light Gray Base */
    pointer-events: none;
}

.data-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    height: 1px;
    width: 100%;
    transform: translateX(-100%);
    opacity: 0;
}

.data-line:nth-child(1) {
    top: 15%;
    animation: dataMove 8s infinite linear 0s;
}

.data-line:nth-child(2) {
    top: 35%;
    animation: dataMove 12s infinite linear 2s;
}

.data-line:nth-child(3) {
    top: 55%;
    animation: dataMove 7s infinite linear 1s;
}

.data-line:nth-child(4) {
    top: 75%;
    animation: dataMove 10s infinite linear 4s;
}

.data-line:nth-child(5) {
    top: 90%;
    animation: dataMove 15s infinite linear 3s;
}

@keyframes dataMove {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* =========================================
   Fiber Optic Effect (Header)
   ========================================= */
.fiber-optic-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, #a855f7, transparent);
    background-size: 200% 100%;
    animation: fiberFlow 3s linear infinite;
    z-index: 1050;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

@keyframes fiberFlow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* =========================================
   Brand Logo Style
   ========================================= */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.brand-logo img {
    filter: brightness(0) invert(1) drop-shadow(0 0 3px #00d4ff);
    transition: all 0.3s ease;
}

.brand-logo:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px #00d4ff);
    transform: scale(1.05);
}

/* =========================================
   Fintech Dropdown Menu (User Header)
   ========================================= */
.navbar-custom-menu>.navbar-nav>li.dropdown.user-menu>.dropdown-menu {
    border-radius: 12px !important;
    padding: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    width: 260px !important;
    left: auto !important;
    right: 0 !important;
    transform: translateY(10px);
    transition: all 0.2s ease-out;
    background-color: #ffffff !important;
    /* Force white background */
}

/* Override AdminLTE Blue Header */
/* Override AdminLTE Blue Header */
.navbar-nav>.user-menu>.dropdown-menu>li.user-header {
    /* Kept clean to allow default AdminLTE Blue or custom styles below */
    padding: 25px !important;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    height: auto !important;
    background-color: #ffffff !important;
    /* Force White Background */
}

.user-menu .user-header img {
    border: 3px solid var(--accent-color);
    /* Purple Border */
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.user-menu .user-header p {
    color: #1e293b !important;
    /* Dark text on white header */
    margin-top: 10px;
    font-weight: 600;
    font-size: 16px;
}

.user-menu .user-header small {
    display: block;
    color: #94a3b8 !important;
    font-size: 12px;
    font-weight: 400;
    margin-top: 4px;
}

.user-menu .user-body {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.user-menu .user-body a {
    color: var(--text-color) !important;
    padding: 10px 20px;
    display: block;
    transition: background 0.2s;
}

.user-menu .user-body a:hover {
    background: #f8fafc;
    color: var(--accent-color) !important;
}

.user-menu .user-footer {
    background: transparent !important;
    padding: 15px 20px !important;
}

.user-menu .user-footer .btn-flat {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--subtext-color);
    font-weight: 500;
}

.user-menu .user-footer .btn-flat:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* =========================================
   Modern Fintech Navbar (Dark)
   ========================================= */
.main-header {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    border-bottom: none;
    /* Removed separator */
}

.main-header .navbar {
    background-color: #0f172a !important;
    margin-left: 230px;
    border: none;
    min-height: 60px;
}

@media (max-width: 767px) {
    .main-header .navbar {
        margin-left: 0 !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* Toggle Button */
.main-header .sidebar-toggle {
    color: #cbd5e1 !important;
    padding: 18px 20px !important;
    font-size: 16px;
    border-right: none;
    /* Removed separator */
    transition: all 0.2s;
}

.main-header .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--accent-color) !important;
}

/* Navbar Menu Items */
.navbar-custom-menu>.navbar-nav>li>a {
    color: #cbd5e1 !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    height: 60px;
    border-left: none;
    /* Removed separator */
}

.navbar-custom-menu>.navbar-nav>li>a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--accent-color) !important;
}

/* User Name in Navbar */
.navbar-nav>.user-menu>.dropdown-toggle>span {
    font-weight: 500;
    color: #cbd5e1;
}

/* User Image in Navbar */
.navbar-nav>.user-menu>.dropdown-toggle>img {
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-right: 8px;
    width: 32px;
    height: 32px;
    margin-top: -6px;
    /* Vertical centering adjustment */
}

@media (max-width: 767px) {
    .navbar-nav>.user-menu>.dropdown-toggle {
        padding: 15px 12px !important;
    }
}

/* Logo Area Adjustment */
.main-header .logo {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-bottom: none;
    /* Removed separator */
    border-right: none;
    /* Removed separator */
    height: 60px !important;
    line-height: 58px !important;
    box-shadow: none;
}

/* Reset filter for white navbar logo */
.main-header .logo .logo-lg img,
.main-header .logo .logo-mini img {
    filter: none !important;
    height: 42px !important;
}

@media (max-width: 767px) {
    .main-header .navbar {
        margin-left: 0;
    }

    .main-header .logo {
        width: 100%;
        float: none;
    }
}

/* Responsive Header adjustment */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding-top: 20px !important;
    }

    .stripe-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .stripe-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

.header-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .dashboard-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center;
        margin-top: 10px !important;
    }

    .dashboard-header>div {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .header-tools,
    .action-toolbar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }

    .header-tools button,
    .header-tools a,
    .header-tools .btn-group,
    .action-toolbar button,
    .action-toolbar a,
    .action-toolbar .btn-group {
        width: 100% !important;
        display: block !important;
        margin: 4px 0 !important;
        padding: 12px 15px !important;
        font-size: 14px !important;
        float: none !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .header-tools .btn-group,
    .action-toolbar .btn-group {
        border: none !important;
    }

    .header-tools .btn-group .btn,
    .action-toolbar .btn-group .btn {
        width: 100% !important;
        border-radius: 6px !important;
        margin: 2px 0 !important;
        display: block !important;
        float: none !important;
    }

    /* Corrección de iconos y badges en header móvil */
    .navbar-custom-menu .navbar-nav>li>a {
        padding: 15px 10px !important;
    }

    .rate-badge {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin: 2px !important;
    }
}

/* Modal Footers Responsivity */
.modal-footer {
    flex-direction: column-reverse !important;
    gap: 10px !important;
}

.modal-footer>div,
.modal-footer>button {
    width: 100% !important;
    margin: 0 !important;
}

.modal-footer>div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Exclude DataTables Export Buttons from being 100% */
.dt-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.dt-buttons .dt-button,
.dt-buttons .btn-fintech-secondary {
    width: auto !important;
    flex: 1 1 20% !important;
    min-width: 60px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
}

.btn-fintech-report,
.btn-fintech-secondary:not(.dt-button),
.btn-fintech-success,
.btn-stripe {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
}

/* =========================================
   FIBER OPTIC SIDEBAR THEME
   ========================================= */

/* 1. Sidebar Background */
.main-sidebar,
.left-side {
    background-color: #0f172a !important;
    /* Deep Navy/Black */
    background-image: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-right: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    /* position: relative; Removed to fix layout stacking */
    overflow: hidden;
    /* For light effects */
}

/* 2. Fiber Optic Line (Vertical Animated Line) */
.main-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #6366f1, #818cf8, #6366f1, transparent);
    background-size: 100% 200%;
    animation: fiberFlow 3s linear infinite;
    box-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1;
    z-index: 100;
    opacity: 0.8;
    pointer-events: none;
    /* Fix: Allow clicks to pass through */
}

@keyframes fiberFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 200%;
    }
}

/* 3. Sidebar User Panel */
.user-panel {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.user-panel>.info>p {
    color: #f8fafc !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 4. Sidebar Menu Header */
.sidebar-menu>li.header {
    background-color: rgba(15, 23, 42, 0.9) !important;
    color: #94a3b8 !important;
    letter-spacing: 1px;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 5. Menu Items (Treeview) */
.sidebar-menu>li>a {
    color: #cbd5e1 !important;
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    /* overflow: hidden; Removed to prevent issues in mini mode */
    font-size: 12px !important;
    /* Reduced font size from 14px */
    padding: 10px 12px !important;
    /* Compact padding */
}

/* Hover Effect: Light Beam */
.sidebar-menu>li:hover>a,
.sidebar-menu>li.active>a {
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border-left-color: #6366f1;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.sidebar-menu>li>a:hover i,
.sidebar-menu>li.active>a i {
    color: #818cf8 !important;
    filter: drop-shadow(0 0 5px #6366f1);
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Submenu Items */
.sidebar-menu .treeview-menu {
    background-color: #0b1120 !important;
    /* Darker shade */
    padding-left: 0;
}

.treeview-menu>li>a {
    color: #94a3b8 !important;
    padding-left: 25px !important;
    /* Adjusted indentation */
    transition: color 0.2s;
    font-size: 12px !important;
    /* Reduced font size from 14px */
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.treeview-menu>li>a:hover {
    color: #818cf8 !important;
    background: rgba(255, 255, 255, 0.02);
}

.treeview-menu>li.active>a {
    color: #6366f1 !important;
    font-weight: 600;
}

.treeview-menu>li.active>a i {
    color: #6366f1;
}

/* 6. Fiber Optic "Beam" on Hover (Pseudo-element) */
.sidebar-menu>li>a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    /* Start off-screen */
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
    /* Fix: Allow clicks to pass through */
}

.sidebar-menu>li:hover>a::before {
    left: 150%;
    /* Move across */
    transition: left 0.6s ease;
}

/* 7. Icons */
.sidebar-menu>li>a>i {
    width: 20px;
    color: #64748b;
    /* Muted default */
}

/* 8. Active State Glow */
.sidebar-menu>li.active {
    box-shadow: inset 5px 0 10px -5px rgba(99, 102, 241, 0.3);
}

/* Fix for scrolling issues */
.main-sidebar {
    overflow: visible !important;
}

/* FIX: Stabilize Submenu in Collapsed Mode (V2 - High Z-Index & Bridge) */
@media (min-width: 768px) {

    /* 1. Ensure the LIST ITEM stays on top of content when hovered */
    .sidebar-collapse .sidebar-menu>li:hover {
        z-index: 10000 !important;
        overflow: visible !important;
    }

    /* 2. The Link itself needs to be stable */
    .sidebar-collapse .sidebar-menu>li {
        position: relative;
        overflow: visible !important;
    }

    /* 3. The Submenu: Positioned relative to LI, high Z-Index */
    .sidebar-collapse .sidebar-menu>li:hover>.treeview-menu {
        display: block !important;
        position: absolute;
        top: 0;
        left: 48px;
        /* Slight overlap with sidebar (50px) to prevent gaps */
        width: 260px;
        background-color: #0f172a !important;
        z-index: 10001 !important;
        /* Above everything */
        box-shadow: 6px 4px 12px rgba(0, 0, 0, 0.4);
        border-radius: 0 6px 6px 0;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 5px;
        padding-bottom: 5px;
    }

    /* 4. Invisible Bridge: Extends hit area to the right to catch fast mouse movements */
    .sidebar-collapse .sidebar-menu>li:hover::after {
        content: '';
        position: absolute;
        top: 0;
        right: -20px;
        /* Extend hover area 20px into the content */
        width: 30px;
        height: 100%;
        background: transparent;
        z-index: 10000;
    }
}

/* =========================================
   FIBER OPTIC STATS CARDS
   ========================================= */

/* Grid Layout for Equal Height - Simplified for Better Compatibility */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
}

.stats-grid>[class*='col-'] {
    display: flex;
    flex-direction: column;
}

.stats-grid>[class*='col-']>.stripe-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card Modernization */
/* Card Modernization */
.stripe-card {
    background: #ffffff !important;
    /* White Background */
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    color: #334155 !important;
    flex: 1;
    /* Fill available height in col */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Hover Effect */
/* Hover Effect */
.stripe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 15px rgba(99, 102, 241, 0.2) !important;
    border-color: #6366f1 !important;
}

/* Typography Updates */
/* Typography Updates */
.stripe-stat-title {
    color: #64748b !important;
    text-transform: uppercase;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stripe-stat-value {
    color: #1e293b !important;
    /* Dark text for values */
    text-shadow: none !important;
}

.stripe-stat-icon {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
}

/* Specific Card Styles (Neon Glows) */
/* Success (Ingresos) */
.stat-success {
    border-left: none !important;
    border-bottom: 2px solid #10b981 !important;
}

.stat-success:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

.stat-success .stripe-stat-icon {
    color: #10b981 !important;
}

/* Purple (Activos) */
.stat-purple {
    border-left: none !important;
    border-bottom: 2px solid #818cf8 !important;
}

.stat-purple:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(129, 140, 248, 0.4) !important;
}

.stat-purple .stripe-stat-icon {
    color: #818cf8 !important;
}

/* Danger (Cortados) */
.stat-danger {
    border-left: none !important;
    border-bottom: 2px solid #ef4444 !important;
}

.stat-danger:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

.stat-danger .stripe-stat-icon {
    color: #ef4444 !important;
}

/* Warning (Recaudacion) */
.stat-warning {
    border-left: none !important;
    border-bottom: 2px solid #f59e0b !important;
}

.stat-warning:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.4) !important;
}

.stat-warning .stripe-stat-icon {
    color: #f59e0b !important;
}

/* Responsive Stacking */
@media (max-width: 767px) {
    .stats-grid {
        display: block;
        /* Stack properly on mobile */
    }

    .stripe-card {
        margin-bottom: 15px !important;
    }
}

/* =========================================
   TecnoLink Client Dashboard Enhancements
   ========================================= */

/* Responsive Video Container */
.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border: none;
}

/* News Carousel Styles */
.news-carousel {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
}

.news-item {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: #f8fafc;
}

.news-date {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 5px;
    padding: 2px 8px;
    background: #eef2ff;
    border-radius: 4px;
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-content {
    font-size: 14px;
    color: var(--subtext-color);
    line-height: 1.6;
}

/* Dashboard Cards (Client Specific) */
.client-stat-card {
    border: none;
    border-radius: 16px;
    color: white;
    padding: 25px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.client-stat-card:hover {
    transform: translateY(-5px);
}

.card-mesh {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.client-stat-card {
    position: relative;
    padding: 25px;
    border-radius: 16px;
    color: white;
    margin-bottom: 25px;
    overflow: hidden;
    min-height: 160px;
    /* Standardize Height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    background-size: 200% auto;
    animation: fiberFlow 5s infinite linear;
}

.client-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.client-stat-card.bg-premium-blue {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #6366f1 100%);
    background-size: 200% auto;
}

.client-stat-card.bg-premium-green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #10b981 100%);
    background-size: 200% auto;
}

.client-stat-card.bg-premium-red {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
    background-size: 200% auto;
}

.client-stat-card.bg-premium-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
    background-size: 200% auto;
}

.client-stat-card h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    z-index: 2;
}

.client-stat-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 5px 0 0 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.client-stat-card i {
    position: absolute;
    font-size: 70px;
    right: -10px;
    bottom: -10px;
    opacity: 0.15;
    z-index: 1;
}

@keyframes fiberFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .client-stat-card h3 {
        font-size: 24px;
    }

    .news-title {
        font-size: 14px;
    }

    .news-content {
        font-size: 13px;
    }

    .table-responsive {
        border: none !important;
    }
}

/* =========================================
   Fiber Optic Button Effects
   ========================================= */
.btn-fiber {
    background-size: 200% auto;
    color: white !important;
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fiberFlow 4s linear infinite;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Variación Azul/Primary (IPTV/Solicitudes) */
.btn-fiber-primary {
    background: linear-gradient(90deg, #635bff, #818cf8, #635bff);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(99, 91, 255, 0.3);
}

/* Variación Púrpura (Pagos) */
.btn-fiber-purple {
    background: linear-gradient(90deg, #6366f1, #a855f7, #6366f1);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

/* Variación Verde (Aprobaciones) */
.btn-fiber-success {
    background: linear-gradient(90deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Variación Roja (Eliminaciones/Rechazos) */
.btn-fiber-danger {
    background: linear-gradient(90deg, #ef4444, #f87171, #ef4444);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Variación Naranja (Advertencias/Acciones Manuales) */
.btn-fiber-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Variación Outline (Sutil con efecto al hover) */
.btn-fiber-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b !important;
    animation: none;
    box-shadow: none;
}

.btn-fiber-outline:hover {
    border-color: #635bff;
    color: #635bff !important;
    background: rgba(99, 91, 255, 0.05);
}

.btn-fiber:hover {
    transform: translateY(-3px) scale(1.02);
    background-position: right center;
    color: white !important;
}

.btn-fiber-primary:hover {
    box-shadow: 0 8px 25px rgba(99, 91, 255, 0.5);
}

.btn-fiber-purple:hover {
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6);
}

.btn-fiber-success:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-fiber-danger:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-fiber-warning:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-fiber::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.btn-fiber:hover::after {
    opacity: 0.4;
    left: 0;
    top: 0;
}

@keyframes fiberFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Global Fix for DataTables Buttons - Force XS size */

/* Global Fix for DataTables Buttons - Force XS size & Fiber Effect Defaults */
.dt-button,
.buttons-copy,
.buttons-excel,
.buttons-csv,
.buttons-pdf,
.buttons-print {
    padding: 2px 8px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    border-radius: 4px !important;
    margin-right: 5px !important;
    border: none !important;
    color: white !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Flex container for Search + Buttons */
.dt-top-container {
    display: flex;
    justify-content: flex-end;
    /* Alinear a la derecha */
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

/* Ensure filter and buttons don't float incorrectly inside flex */
.dt-top-container .dataTables_filter {
    float: none !important;
    text-align: right;
    margin: 0 !important;
}

.dt-top-container .dt-buttons {
    float: none !important;
    margin: 0 !important;
    display: flex;
}

/* Default Colors if JS class fails */
.buttons-copy {
    background-color: #64748b !important;
}

/* Slate */
.buttons-excel {
    background-color: #10b981 !important;
}

/* Emerald */
.buttons-csv {
    background-color: #6366f1 !important;
}

/* Indigo */
.buttons-pdf {
    background-color: #ef4444 !important;
}

/* Red */
.buttons-print {
    background-color: #f59e0b !important;
}

/* Amber */

/* Hover Effects */
.dt-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    opacity: 0.9;
}

.client-stat-card.bg-premium-purple {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #6366f1 100%);
    background-size: 200% auto;
}