/* Dashboard Spectacle Design System */
:root {
    --dash-primary: #6366f1;
    --dash-primary-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --dash-success: #10b981;
    --dash-success-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --dash-warning: #f59e0b;
    --dash-warning-grad: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --dash-danger: #ef4444;
    --dash-danger-grad: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --dash-info: #06b6d4;
    --dash-info-grad: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --dash-indigo: #8b5cf6;
    --dash-indigo-grad: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --card-border-radius: 20px;
}

/* ===== ApexCharts Tooltip - Dark Mode ===== */
[data-bs-theme="dark"] .apexcharts-tooltip {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .apexcharts-tooltip-title {
    background: rgba(30, 41, 59, 0.9) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
    color: #e2e8f0 !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip-text,
[data-bs-theme="dark"] .apexcharts-tooltip-text-y-label,
[data-bs-theme="dark"] .apexcharts-tooltip-text-y-value {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip-series-group {
    background: transparent !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip .apexcharts-tooltip-marker {
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}

/* ===== ApexCharts Tooltip - Light Mode ===== */
.apexcharts-tooltip {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.apexcharts-tooltip-title {
    background: #f8fafc !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.apexcharts-tooltip-text,
.apexcharts-tooltip-text-y-label,
.apexcharts-tooltip-text-y-value {
    color: #334155 !important;
}

/* ===== ApexCharts Toolbar ===== */
[data-bs-theme="dark"] .apexcharts-menu {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .apexcharts-menu-item:hover {
    background: #334155 !important;
}


[data-bs-theme="dark"] .card-modern {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.card-modern {
    background: #ffffff;
    border-radius: var(--card-border-radius);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.stat-widget {
    position: relative;
    overflow: hidden;
    color: white;
    border-radius: 16px;
    padding: 1.1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.stat-widget:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.stat-widget .icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    font-size: 5rem;
    opacity: 0.08;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.stat-widget:hover .icon-bg {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.15);
    opacity: 0.22;
}


.table-modern thead th {
    background: rgba(0, 0, 0, 0.015);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    font-weight: 800;
    border-bottom: 2px solid rgba(0, 0, 0, 0.03);
    color: #64748b;
    padding: 1.25rem 1rem;
}

[data-bs-theme="dark"] .table-modern thead th {
    background: rgba(255, 255, 255, 0.02);
    color: #94a3b8;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Dark Mode Text Visibility Fixes */
[data-bs-theme="dark"] .text-dark {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .table-modern tbody td {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .pagination .page-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Form Controls & Global Visibility */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .card-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] table:not(.table-modern) tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .table thead th {
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .small,
[data-bs-theme="dark"] small {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background: var(--dash-primary);
    border-color: var(--dash-primary);
    color: #fff;
}

/* Premium Buttons */
.btn-white {
    background: #ffffff !important;
    color: #1e293b !important;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .btn-white {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .btn-white:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.hover-bg-light:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

[data-bs-theme="dark"] .hover-bg-light:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.text-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Fixes */
.app-wrapper {
    background-color: var(--bs-body-bg);
}

/* Sidebar Machu Picchu Premium - Controlled via layout.php and custom.css */
.app-sidebar,
.sidebar-brand {
    z-index: 1040 !important;
}

.sidebar-wrapper {
    background: transparent !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 60px) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-wrapper::-webkit-scrollbar {
    width: 4px;
}

.sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.8rem 1rem !important;
    display: flex !important;
    align-items: center !important;
}

.sidebar-brand .brand-link {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    text-decoration: none !important;
}

.sidebar-brand .brand-text {
    margin-left: 12px !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    color: #fff !important;
}

.nav-sidebar .nav-link {
    border-radius: 0.5rem;
    margin: 2px 10px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    display: flex !important;
    align-items: center !important;
    width: 100%;
}

/* Sidebar submenu arrow aligned to far right */
.sidebar-menu .nav-link p,
.nav-sidebar .nav-link p,
.nav-treeview .nav-link p {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 !important;
    margin: 0 !important;
    width: 100% !important;
}

.sidebar-menu .nav-link p i.right,
.sidebar-menu .nav-link p i.fa-angle-right,
.sidebar-menu .nav-link p i.fa-angle-left,
.nav-sidebar .nav-link p i.right,
.nav-sidebar .nav-link p i.fa-angle-right,
.nav-sidebar .nav-link p i.fa-angle-left,
.nav-treeview .nav-link p i.right,
.nav-treeview .nav-link p i.fa-angle-right,
.nav-treeview .nav-link p i.fa-angle-left {
    margin-left: auto !important;
    float: none !important;
    position: static !important;
    right: auto !important;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(3px);
}

.nav-sidebar .nav-link.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Welcome Banner Professional */
.welcome-banner {
    background: rgba(var(--bs-tertiary-bg-rgb), 1) !important;
    /* solid background to prevent see-through */
    backdrop-filter: blur(15px);
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* AdminLTE 4 Small Box - EXACT Structure from User Screenshot */
.small-box {
    border-radius: 0.75rem !important;
    position: relative;
    display: block;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.small-box>.inner {
    padding: 1.25rem;
}

.small-box h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    padding: 0;
}

.small-box p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.small-box .small-box-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    z-index: 0;
    font-size: 4.5rem;
    color: rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease-in-out;
}

.small-box:hover .small-box-icon {
    transform: scale(1.1);
}

.small-box>.small-box-footer {
    position: relative;
    text-align: center;
    padding: 4px 0;
    display: block;
    z-index: 10;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.small-box>.small-box-footer:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #fff !important;
}

/* Fix for warning box text color */
.text-bg-warning .small-box-footer {
    color: rgba(0, 0, 0, 0.7) !important;
}

.text-bg-warning .small-box-footer:hover {
    color: #000 !important;
}

/* Info Box Enhancements */
.info-box {
    border-radius: 0.75rem !important;
    background: rgba(var(--bs-tertiary-bg-rgb), 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.info-box-icon {
    border-radius: 0.6rem !important;
}

/* Progress bar fix */
.progress {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Font Awesome 6 global font family */
.fas,
.fa-solid,
.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fab,
.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

/* Premium Plan Cards - Spectacular Design */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    padding: 2.5rem 1.5rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    color: #fff !important;
    text-align: center;
}

.plan-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.plan-card.active-plan {
    border: 2px solid #0d6efd !important;
    box-shadow: 0 0 30px rgba(13, 110, 253, 0.2);
}

.plan-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.plan-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif !important;
}

.plan-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fw-black {
    font-weight: 900 !important;
}

.plan-price {
    margin-bottom: 2rem;
}

.plan-price .currency {
    font-size: 1.5rem;
    font-weight: 400;
    vertical-align: super;
}

.plan-price .amount {
    font-size: 3.5rem;
    font-weight: 900;
}

.plan-price .period {
    opacity: 0.5;
    font-size: 0.9rem;
}

.plan-features-list {
    text-align: left;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0;
}

.plan-features-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.plan-features-list li i {
    color: #10b981;
    margin-top: 4px;
}

.plan-card .btn-buy {
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
}

.plan-card .btn-buy:hover {
    background: #f8fafc;
    transform: scale(1.05);
}

/* Specific Plan Colors */
.plan-inicia .plan-title {
    background: linear-gradient(to bottom, #fff, #64748b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-micro .plan-title {
    background: linear-gradient(to bottom, #60a5fa, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-emprende .plan-title {
    background: linear-gradient(to bottom, #fbbf24, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-profesional .plan-title {
    background: linear-gradient(to bottom, #a78bfa, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Preloader - Full screen centered overlay */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 9999;
    background-color: #0f172a;
    transition: height 200ms linear;
    overflow: hidden;
}

/* ========================================
   Sale/Order Detail View - Enhanced Styles 
   ======================================== */

/* Main order card */
[data-bs-theme="dark"] .card.card-dark {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .card.card-dark>.card-header {
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .card.card-dark .card-header .card-title {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Inner cards within order view */
[data-bs-theme="dark"] .card.card-dark .card.pt-2 {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Tables inside order view */
[data-bs-theme="dark"] .card.card-dark .table {
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .card.card-dark .table thead th,
[data-bs-theme="dark"] .card.card-dark .table .thead-dark th {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #c7d2fe !important;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.65rem 0.75rem !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    white-space: nowrap;
}

[data-bs-theme="dark"] .card.card-dark .table tbody td {
    background: rgba(255, 255, 255, 0.02);
    color: #e2e8f0 !important;
    padding: 0.6rem 0.75rem !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    font-size: 0.88rem;
    vertical-align: middle;
}

[data-bs-theme="dark"] .card.card-dark .table-striped tbody tr:nth-of-type(odd) td {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .card.card-dark .table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.06);
}

[data-bs-theme="dark"] .card.card-dark .table tfoot th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #e2e8f0 !important;
    padding: 0.6rem 0.75rem !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    font-size: 0.9rem;
}

/* Section labels (Comprobante, Productos, Pagos, Entrega) */
[data-bs-theme="dark"] .card.card-dark label[for] {
    color: #a5b4fc;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    border-left: 3px solid #6366f1;
}

[data-bs-theme="dark"] .card.card-dark label i {
    color: #818cf8;
}

/* Status badges */
[data-bs-theme="dark"] .card.card-dark .badge,
[data-bs-theme="dark"] .card.card-dark .btn-xs {
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Accordion / Details sections */
[data-bs-theme="dark"] .card.card-dark .accordion-button,
[data-bs-theme="dark"] .card.card-dark .btn[data-bs-toggle="collapse"] {
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* Jumbotron / Empty states */
[data-bs-theme="dark"] .card.card-dark .jumbotron {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
}

[data-bs-theme="dark"] .card.card-dark .jumbotron h5 {
    color: #94a3b8 !important;
    font-size: 0.9rem;
}

/* Payment status icons */
[data-bs-theme="dark"] .card.card-dark td .fas.fa-check-circle {
    color: #10b981;
}

/* Total row emphasis */
[data-bs-theme="dark"] .card.card-dark .table tfoot tr:last-child th {
    font-size: 1rem;
    font-weight: 800;
    color: #fff !important;
}

/* ========================================
   AdminLTE 3 → 4 Color Compatibility
   These classes don't exist in AdminLTE 4 
   ======================================== */

/* Olive / Verde oliva - Usuarios */
.bg-olive {
    background: linear-gradient(135deg, #558b2f, #7cb342) !important;
    color: #fff !important;
}

/* Purple / Violeta - Gestión Empresarial */
.bg-purple {
    background: linear-gradient(135deg, #7b1fa2, #ab47bc) !important;
    color: #fff !important;
}

/* Navy / Azul marino - Botones y badges */
.bg-navy {
    background: linear-gradient(135deg, #1a237e, #3949ab) !important;
    color: #fff !important;
}

/* Maroon / Granate - Cierres y alertas */
.bg-maroon {
    background: linear-gradient(135deg, #880e4f, #c2185b) !important;
    color: #fff !important;
}


/* Progress bars for custom colors */
.progress-bar.bg-purple {
    background: linear-gradient(90deg, #7b1fa2, #ab47bc) !important;
}

.progress-bar.bg-navy {
    background: linear-gradient(90deg, #1a237e, #3949ab) !important;
}

.progress-bar.bg-maroon {
    background: linear-gradient(90deg, #880e4f, #c2185b) !important;
}

/* Buttons with custom colors */
.btn.bg-navy,
.btn.bg-olive,
.btn.bg-maroon,
.btn.bg-purple {
    color: #fff !important;
    border: none;
    transition: all 0.25s ease;
}

.btn.bg-navy:hover,
.btn.bg-olive:hover,
.btn.bg-maroon:hover,
.btn.bg-purple:hover {
    filter: brightness(1.15);
}

/* Badges with custom colors */
.badge.bg-navy,
.badge.bg-purple,
.badge.bg-maroon {
    color: #fff !important;
}

/* Info / Azul cielo - Productos */

.info-box.bg-info {
    background: linear-gradient(135deg, #0288d1, #03a9f4) !important;
    color: #fff !important;
}

/* Orange / Naranja - Depósitos */
.bg-orange {
    background: linear-gradient(135deg, #e65100, #ff9800) !important;
    color: #fff !important;
}

/* Red / Rojo - Ventas */
.info-box.bg-red,
.bg-red {
    background: linear-gradient(135deg, #c62828, #ef5350) !important;
    color: #fff !important;
}

/* Green / Verde - Clientes */
.info-box.bg-green,
.bg-green {
    background: linear-gradient(135deg, #2e7d32, #66bb6a) !important;
    color: #fff !important;
}

/* Blue / Azul - Métodos de pago */
.info-box.bg-blue,
.bg-blue {
    background: linear-gradient(135deg, #1565c0, #42a5f5) !important;
    color: #fff !important;
}

/* Success / Verde éxito */
.info-box.bg-success {
    background: linear-gradient(135deg, #1b5e20, #4caf50) !important;
    color: #fff !important;
}

/* Ensure text inside info-boxes stays white */
.bg-olive .info-box-text,
.bg-olive .info-box-number,
.info-box.bg-info .info-box-text,
.info-box.bg-info .info-box-number,
.bg-orange .info-box-text,
.bg-orange .info-box-number,
.bg-red .info-box-text,
.bg-red .info-box-number,
.bg-green .info-box-text,
.bg-green .info-box-number,
.bg-blue .info-box-text,
.bg-blue .info-box-number,
.bg-success .info-box-text,
.bg-success .info-box-number,
.bg-purple .info-box-text,
.bg-purple .info-box-number,
.bg-navy .info-box-text,
.bg-navy .info-box-number,
.bg-maroon .info-box-text,
.bg-maroon .info-box-number {
    color: #fff !important;
}

/* Info-box icon on colored backgrounds */
.bg-olive .info-box-icon,
.info-box.bg-info .info-box-icon,
.bg-orange .info-box-icon,
.bg-red .info-box-icon,
.bg-green .info-box-icon,
.bg-blue .info-box-icon,
.bg-success .info-box-icon,
.bg-purple .info-box-icon,
.bg-navy .info-box-icon,
.bg-maroon .info-box-icon {
    background: rgba(0, 0, 0, 0.12);
    color: #fff;
    border-radius: 0;
}

/* Remove underline from all links globally */
.content-wrapper a,
.info-box a,
.card a,
.product-title,
.product-info a {
    text-decoration: none !important;
}

.content-wrapper a:hover,
.info-box a:hover,
.card a:hover {
    text-decoration: none !important;
}

/* ========================================
   Blog / Novedades - Premium Card Design
   ======================================== */

.blog-news-list {
    padding: 0;
}

.blog-news-item {
    display: flex;
    align-items: stretch;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    cursor: pointer;
    color: inherit;
    gap: 0.85rem;
}

.blog-news-item:last-child {
    border-bottom: none;
}

.blog-news-item:hover {
    background: rgba(102, 126, 234, 0.04);
    transform: translateX(4px);
}

[data-bs-theme="dark"] .blog-news-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .blog-news-item:hover {
    background: rgba(102, 126, 234, 0.08);
}

.blog-news-thumb {
    position: relative;
    width: 80px;
    min-width: 80px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-news-item:hover .blog-news-thumb img {
    transform: scale(1.1);
}

.blog-news-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-news-item:hover .blog-news-overlay {
    opacity: 1;
}

.blog-news-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.3;
    backdrop-filter: blur(4px);
}

.blog-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.blog-news-title {
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: #1e293b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .blog-news-title {
    color: #e2e8f0;
}

.blog-news-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

[data-bs-theme="dark"] .blog-news-desc {
    color: #94a3b8;
}

.blog-news-read {
    font-size: 0.7rem;
    font-weight: 600;
    color: #667eea;
    margin-top: 4px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.25s ease;
}

.blog-news-item:hover .blog-news-read {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Premium Edit/Form View Styles
   Auto-targets: card-warning, card-primary,
   card-danger, card-success patterns
   ======================================== */

/* --- Card Container --- */
.card.card-warning,
.card.card-primary,
.card.card-danger,
.card.card-success {
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08) !important;
}

/* --- Card Headers with Gradients --- */
.card.card-warning>.card-header {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%) !important;
    color: #fff !important;
    padding: 1.25rem 1.75rem !important;
    border-bottom: none !important;
}

.card.card-primary>.card-header {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%) !important;
    color: #fff !important;
    padding: 1.25rem 1.75rem !important;
    border-bottom: none !important;
}

.card.card-danger>.card-header {
    background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
    color: #fff !important;
    padding: 1.25rem 1.75rem !important;
    border-bottom: none !important;
}

.card.card-success>.card-header {
    background: linear-gradient(135deg, #064e3b, #10b981) !important;
    color: #fff !important;
    padding: 1.25rem 1.75rem !important;
    border-bottom: none !important;
}

/* --- Header Text --- */
.card.card-warning>.card-header .card-title,
.card.card-warning>.card-header .card-title b,
.card.card-warning>.card-header .card-title-no,
.card.card-warning>.card-header .card-title-no b,
.card.card-warning>.card-header a,
.card.card-primary>.card-header .card-title,
.card.card-primary>.card-header .card-title b,
.card.card-primary>.card-header .card-title-no,
.card.card-primary>.card-header .card-title-no b,
.card.card-primary>.card-header a,
.card.card-danger>.card-header .card-title,
.card.card-danger>.card-header .card-title b,
.card.card-danger>.card-header a,
.card.card-success>.card-header .card-title,
.card.card-success>.card-header .card-title b,
.card.card-success>.card-header a {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: -0.2px !important;
}

/* Back button in header */
.card.card-warning>.card-header .btn.bg-navy,
.card.card-primary>.card-header .btn.bg-navy {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 0.4rem 0.75rem !important;
    transition: all 0.25s !important;
}

.card.card-warning>.card-header .btn.bg-navy:hover,
.card.card-primary>.card-header .btn.bg-navy:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* --- Card Body --- */
.card.card-warning>.card-body,
.card.card-primary>.card-body,
.card.card-danger>.card-body,
.card.card-success>.card-body,
.card.card-warning>form>.card-body,
.card.card-primary>form>.card-body,
.card.card-danger>form>.card-body,
.card.card-success>form>.card-body {
    padding: 2rem !important;
}

/* --- Form Labels --- */
.card.card-warning .form-group label,
.card.card-warning .form-group .col-form-label,
.card.card-warning .control-label,
.card.card-primary .form-group label,
.card.card-primary .form-group .col-form-label,
.card.card-primary .control-label,
.card.card-danger .form-group label,
.card.card-success .form-group label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
}

/* --- Form Inputs inside edit cards --- */
.card.card-warning .form-control,
.card.card-warning .form-select,
.card.card-warning select.form-control,
.card.card-warning textarea.form-control,
.card.card-primary .form-control,
.card.card-primary .form-select,
.card.card-primary select.form-control,
.card.card-primary textarea.form-control {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.88rem !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.card.card-warning .form-control:focus,
.card.card-warning .form-select:focus,
.card.card-warning select.form-control:focus,
.card.card-warning textarea.form-control:focus,
.card.card-primary .form-control:focus,
.card.card-primary .form-select:focus,
.card.card-primary select.form-control:focus,
.card.card-primary textarea.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* --- Card Footer --- */
.card.card-warning>.card-footer,
.card.card-primary>.card-footer,
.card.card-danger>.card-footer,
.card.card-success>.card-footer,
.card.card-warning>form>.card-footer,
.card.card-primary>form>.card-footer,
.card.card-danger>form>.card-footer,
.card.card-success>form>.card-footer,
.card.card-warning .card-footer.bg-transparent,
.card.card-primary .card-footer.bg-transparent {
    padding: 1.25rem 2rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* --- Submit Buttons in Edit Cards --- */
.card.card-warning .card-footer .btn-warning,
.card.card-warning .card-footer .btn-primary,
.card.card-primary .card-footer .btn-primary {
    background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.65rem 2rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.25s !important;
}

.card.card-warning .card-footer .btn-warning:hover,
.card.card-warning .card-footer .btn-primary:hover,
.card.card-primary .card-footer .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.card.card-danger .card-footer .btn-danger {
    background: linear-gradient(135deg, #991b1b, #dc2626) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.65rem 2rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3) !important;
}

.card.card-success .card-footer .btn-success {
    background: linear-gradient(135deg, #065f46, #10b981) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.65rem 2rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

/* --- Form Group Spacing --- */
.card.card-warning .form-group,
.card.card-primary .form-group,
.card.card-warning .row.form-group,
.card.card-primary .row.form-group {
    margin-bottom: 1.25rem !important;
}

/* --- Section Title h4/h3 --- */
.card.card-warning .card-body h4,
.card.card-primary .card-body h4,
.card.card-warning form h4,
.card.card-primary form h4 {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #94a3b8 !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

[data-bs-theme="dark"] .card.card-warning .card-body h4,
[data-bs-theme="dark"] .card.card-primary .card-body h4 {
    color: #64748b !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* --- Tabs in edit forms --- */
.card.card-warning .nav-tabs,
.card.card-primary .nav-tabs {
    border: none !important;
    background: #e2e8f0;
    border-radius: 10px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
}

.card.card-warning .nav-tabs .nav-link,
.card.card-primary .nav-tabs .nav-link {
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    transition: all 0.25s !important;
}

.card.card-warning .nav-tabs .nav-link.active,
.card.card-primary .nav-tabs .nav-link.active {
    background: #fff !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .card.card-warning .nav-tabs,
[data-bs-theme="dark"] .card.card-primary .nav-tabs {
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .card.card-warning .nav-tabs .nav-link,
[data-bs-theme="dark"] .card.card-primary .nav-tabs .nav-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .card.card-warning .nav-tabs .nav-link.active,
[data-bs-theme="dark"] .card.card-primary .nav-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* --- File Input --- */
.card.card-warning .custom-file-input,
.card.card-warning .custom-file-label,
.card.card-primary .custom-file-input,
.card.card-primary .custom-file-label {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.85rem !important;
}

/* --- Images in edit forms --- */
.card.card-warning .img-circle,
.card.card-primary .img-circle {
    border-radius: 14px !important;
    border: 2px solid #e2e8f0 !important;
}

/* --- Checkbox styling --- */
.card.card-warning .form-check-input,
.card.card-primary .form-check-input {
    border-radius: 6px !important;
    width: 18px !important;
    height: 18px !important;
}

.card.card-warning .form-check-input:checked,
.card.card-primary .form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* --- hr separators --- */
.card.card-warning hr,
.card.card-primary hr {
    border-color: #f1f5f9 !important;
    opacity: 1 !important;
    margin: 1.5rem 0 !important;
}

[data-bs-theme="dark"] .card.card-warning hr,
[data-bs-theme="dark"] .card.card-primary hr {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {

    .card.card-warning>.card-body,
    .card.card-primary>.card-body,
    .card.card-warning>form>.card-body,
    .card.card-primary>form>.card-body {
        padding: 1.25rem !important;
    }

    .card.card-warning>.card-footer,
    .card.card-primary>.card-footer,
    .card.card-warning>form>.card-footer,
    .card.card-primary>form>.card-footer {
        padding: 1rem 1.25rem !important;
    }
}

/* ========================================
   Edit Card Custom Styles (profile-view)
   ======================================== */
.edit-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.edit-card-header {
    padding: 1.5rem 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
}

.edit-card-header.header-edit,
.edit-card-header.header-new {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
}

.edit-card-header.header-delet {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.edit-card-header.header-restore {
    background: linear-gradient(135deg, #064e3b, #10b981);
}

.edit-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.edit-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.edit-header-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.edit-card-body {
    padding: 2rem;
    background: #fff;
}

[data-bs-theme="dark"] .edit-card-body {
    background: #1a1a2e;
}

.edit-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-section-title i {
    color: #3b82f6;
    font-size: 0.8rem;
}

[data-bs-theme="dark"] .edit-section-title {
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.06);
}

.edit-form-group {
    margin-bottom: 1.25rem;
}

.edit-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

[data-bs-theme="dark"] .edit-form-group label {
    color: #94a3b8;
}

.edit-form-group .form-control,
.edit-form-group .form-select,
.edit-form-group select.form-control {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.88rem !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.edit-form-group .form-control:focus,
.edit-form-group .form-select:focus,
.edit-form-group select.form-control:focus {
    border-color: #3b82f6 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

[data-bs-theme="dark"] .edit-form-group .form-control,
[data-bs-theme="dark"] .edit-form-group select.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

.edit-location-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 768px) {
    .edit-location-row {
        grid-template-columns: 1fr;
    }

    .edit-card-body {
        padding: 1.25rem;
    }
}

.edit-logo-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .edit-logo-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.edit-tab-nav {
    display: flex;
    gap: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1rem;
}

.edit-tab-nav .nav-link {
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    transition: all 0.25s !important;
}

.edit-tab-nav .nav-link.active {
    background: #fff !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.edit-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.edit-logo-preview img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.edit-card-footer {
    padding: 1.25rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

[data-bs-theme="dark"] .edit-card-footer {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.edit-btn-cancel {
    padding: 0.65rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    text-decoration: none;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edit-btn-cancel:hover {
    background: #f1f5f9;
    color: #475569;
}

.edit-btn-submit {
    padding: 0.65rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.edit-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.edit-btn-submit.btn-delete {
    background: linear-gradient(135deg, #991b1b, #dc2626);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.edit-btn-submit.btn-restore {
    background: linear-gradient(135deg, #065f46, #10b981);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.edit-confirm-box {
    text-align: center;
    padding: 2rem;
}

.edit-confirm-box .confirm-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.edit-confirm-box .confirm-icon.icon-delete {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.edit-confirm-box .confirm-icon.icon-restore {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.edit-confirm-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

[data-bs-theme="dark"] .edit-confirm-box h3 {
    color: #e2e8f0;
}

.edit-confirm-box p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ========================================
   Premium Listing/Index View Styles
   Reusable pattern for all list pages
   ======================================== */

/* --- Page Header Row --- */
.premium-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.15);
}

.premium-list-header .list-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.premium-list-header .list-title i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.premium-list-header .list-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* --- Search Bar in Header --- */
.premium-list-header .list-search {
    flex: 0 1 320px;
}

.premium-list-header .list-search .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    backdrop-filter: blur(4px);
}

.premium-list-header .list-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.premium-list-header .list-search .form-control:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
}

.premium-list-header .list-search .btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 0 12px 12px 0 !important;
    padding: 0.5rem 0.85rem !important;
}

/* --- Action Buttons in Header --- */
.premium-list-header .list-actions {
    display: flex;
    gap: 0.5rem;
}

.premium-list-header .list-actions .btn {
    border-radius: 10px !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(4px);
    transition: all 0.25s !important;
}

.premium-list-header .list-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
}

.premium-list-header .list-actions .btn-add {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border: none !important;
}

.premium-list-header .list-actions .btn-deleted {
    background: rgba(220, 38, 38, 0.2) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
}

/* --- Grid Card Layout --- */
.premium-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.premium-card-item {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.premium-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

.premium-card-item .card-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 0.75rem;
    font-size: 2.8rem;
    color: #1e40af;
    transition: transform 0.3s ease;
}

.premium-card-item:hover .card-item-icon {
    transform: scale(1.1);
}

.premium-card-item .card-item-body {
    padding: 0.5rem 1.25rem 1rem;
    text-align: center;
}

.premium-card-item .card-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem;
}

.premium-card-item .card-item-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.premium-card-item .card-item-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.premium-card-item .card-item-footer .btn {
    border-radius: 8px !important;
    font-size: 0.72rem !important;
    padding: 0.3rem 0.75rem !important;
    font-weight: 600 !important;
}

/* Status badge for cards */
.premium-card-item .status-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.premium-card-item .status-dot.active {
    background: #10b981;
}

.premium-card-item .status-dot.inactive {
    background: #94a3b8;
}

/* --- List Card Container --- */
.premium-list-card {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06) !important;
}

.premium-list-card>.card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
}

.premium-list-card>.card-header .card-title {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.premium-list-card>.card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
}

/* --- Empty State --- */
.premium-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.premium-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #94a3b8;
}

.premium-empty-state h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
}

.premium-empty-state p {
    font-size: 0.85rem;
    color: #64748b;
}

/* --- Premium List - Dark Mode --- */
[data-bs-theme="dark"] .premium-list-header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .premium-card-item {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .premium-card-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .premium-card-item .card-item-name {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .premium-card-item .card-item-desc {
    color: #94a3b8;
}

[data-bs-theme="dark"] .premium-card-item .card-item-icon {
    color: #60a5fa;
}

[data-bs-theme="dark"] .premium-card-item .card-item-footer {
    border-color: #334155;
}

[data-bs-theme="dark"] .premium-list-card>.card-header {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .premium-list-card>.card-header .card-title {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .premium-list-card>.card-footer {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .premium-empty-state .empty-icon {
    background: #334155;
}

[data-bs-theme="dark"] .premium-empty-state h4 {
    color: #e2e8f0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .premium-list-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .premium-list-header .list-search {
        flex: 1 1 100%;
    }

    .premium-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }

    .premium-card-item .card-item-icon {
        font-size: 2rem;
        padding: 1rem 0.75rem 0.5rem;
    }
}

/* --- Modal Premium --- */
.modal .premium-modal-header {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    color: #fff;
    padding: 1.25rem 1.75rem;
    border: none;
}

.modal .premium-modal-header h5,
.modal .premium-modal-header .modal-title {
    color: #fff;
    font-weight: 700;
}

.modal .premium-modal-header .btn-close {
    filter: invert(1);
}

.modal .premium-modal-footer {
    padding: 1rem 1.75rem;
    border-top: 1px solid #e2e8f0;
}

.modal .premium-modal-footer .btn {
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========================================
   Card-Dark Override - Match Premium Blue
   ======================================== */
.card.card-dark {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%) !important;
    border: 1px solid rgba(30, 58, 95, 0.3) !important;
    color: #f1f5f9 !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 22, 40, 0.15);
}

.card.card-dark .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.card.card-dark .card-title {
    color: #fff !important;
}

.card.card-dark .card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px;
    color: #e2e8f0 !important;
}

.card.card-dark .table {
    color: #e2e8f0 !important;
}

.card.card-dark .thead-dark th,
.card.card-dark thead th {
    background: rgba(10, 22, 40, 0.6) !important;
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card.card-dark tbody td {
    border-color: rgba(255, 255, 255, 0.04) !important;
}

.card.card-dark label {
    color: #cbd5e1 !important;
}

/* ========================================
   Cash Control Details - Premium Design
   ======================================== */

/* ── Stat Cards ── */
.cc-stat-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(10, 22, 40, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.cc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.12);
}

.cc-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-height: 80px;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.cc-stat-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
    gap: 2px;
    min-width: 0;
}

.cc-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.cc-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.cc-stat-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

.cc-stat-meta i {
    width: 14px;
    text-align: center;
    margin-right: 2px;
}

/* Stat card colour variants */
.cc-stat-apertura .cc-stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.cc-stat-ventas .cc-stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.cc-stat-egresos .cc-stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.cc-stat-cierre .cc-stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* ── Section Panels ── */
.cc-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(10, 22, 40, 0.06);
    overflow: hidden;
}

.cc-section-header {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    color: #fff;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cc-section-header i {
    margin-right: 8px;
    opacity: 0.85;
}

.cc-section-body {
    padding: 0;
}

/* ── Tables ── */
.cc-table {
    margin: 0;
    font-size: 0.82rem;
}

.cc-table thead th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 14px;
    white-space: nowrap;
}

.cc-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.cc-table tbody tr:hover {
    background: #f8fafc;
}

.cc-table tbody tr:last-child td {
    border-bottom: none;
}

.cc-table-total {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%) !important;
}

.cc-table-total td {
    color: #fff !important;
    font-weight: 700;
    border-bottom: none !important;
    padding: 12px 14px !important;
}

/* ── Status Badge ── */
.cc-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

/* ── Empty State ── */
.cc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.cc-empty-state i {
    font-size: 2.2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.cc-empty-state p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Visa Details ── */
.cc-visa-details {
    padding: 6px 0;
}

.cc-visa-details summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    padding: 4px 0;
}

.cc-visa-details summary:hover {
    color: #2563eb;
}

/* ── Balance Row (bottom) ── */
.cc-balance-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(10, 22, 40, 0.06);
    margin-bottom: 1.5rem;
}

.cc-balance-item {
    flex: 1 1 200px;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border-right: 1px solid #f1f5f9;
}

.cc-balance-item:last-child {
    border-right: none;
}

.cc-balance-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.cc-balance-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.cc-balance-result {
    flex-direction: row;
    align-items: center;
    font-weight: 600;
    font-size: 0.88rem;
}

/* Balance states */
.cc-balance-ok .cc-balance-result {
    background: #ecfdf5;
    color: #059669;
}

.cc-balance-danger .cc-balance-result {
    background: #fef2f2;
    color: #dc2626;
}

.cc-balance-warning .cc-balance-result {
    background: #fffbeb;
    color: #d97706;
}

/* Dark mode adjustments for card-dark context */
.card.card-dark .cc-stat-card {
    background: rgba(255, 255, 255, 0.06);
}

.card.card-dark .cc-stat-value {
    color: #f1f5f9;
}

.card.card-dark .cc-stat-label {
    color: #94a3b8;
}

.card.card-dark .cc-section {
    background: rgba(255, 255, 255, 0.04);
}

.card.card-dark .cc-section-header {
    background: rgba(0, 0, 0, 0.3);
}

.card.card-dark .cc-table thead th {
    background: rgba(0, 0, 0, 0.25);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.06);
}

.card.card-dark .cc-table tbody td {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.04);
}

.card.card-dark .cc-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.card.card-dark .cc-balance-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.card.card-dark .cc-balance-amount {
    color: #f1f5f9;
}

.card.card-dark .cc-empty-state {
    color: #64748b;
}

/* =====================================================
   SIDEBAR MINI / COLLAPSED STATE - Premium Icon View
   Inspired by Notion, Linear, Figma sidebar patterns
   ===================================================== */

/* --- Base transitions for smooth collapse/expand --- */
.app-sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: visible !important;
}

.app-main {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* --- COLLAPSED STATE --- */

/* Sidebar container */
.sidebar-collapse .app-sidebar {
    width: 5rem !important;
    min-width: 5rem !important;
    overflow: visible !important;
}

/* Prevent AdminLTE from expanding sidebar on hover */
.sidebar-collapse .app-sidebar:hover {
    width: 5rem !important;
    min-width: 5rem !important;
}

/* Sidebar background - subtle overlay for collapsed */
.sidebar-collapse .app-sidebar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 24, 0.15);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* --- Brand / Logo area --- */
.sidebar-collapse .sidebar-brand {
    padding: 0.9rem 0 !important;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.sidebar-collapse .sidebar-brand .brand-link {
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
}

.sidebar-collapse .sidebar-brand .brand-link>span {
    width: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: none !important;
}

.sidebar-collapse .sidebar-brand .brand-link>div {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.35) !important;
    transition: transform 0.2s ease;
}

.sidebar-collapse .sidebar-brand .brand-link:hover>div {
    transform: scale(1.08);
}

/* --- User Panel --- */
.sidebar-collapse .sidebar-user-panel {
    padding: 0.4rem 0.65rem 0.3rem !important;
    position: relative;
    z-index: 1;
}

.sidebar-collapse .sidebar-user-card {
    padding: 0.4rem !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 11px !important;
    gap: 0 !important;
    overflow: hidden;
}

.sidebar-collapse .sidebar-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-collapse .sidebar-user-card:hover .sidebar-user-avatar {
    transform: scale(1.08);
    box-shadow: 0 2px 10px rgba(96, 165, 250, 0.25);
}

.sidebar-collapse .sidebar-user-info {
    width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 0 !important;
    visibility: hidden;
    transition: none !important;
}

.sidebar-collapse .sidebar-user-chevron {
    width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    padding: 0 !important;
    visibility: hidden;
    transition: none !important;
}

/* --- Search Panel --- */
.sidebar-collapse .sidebar-search-panel {
    padding: 0 !important;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

/* --- Sidebar Menu Items --- */
.sidebar-collapse .sidebar-wrapper {
    position: relative;
    z-index: 1;
    overflow-x: visible !important;
    overflow-y: auto !important;
}

.sidebar-collapse .sidebar-wrapper::-webkit-scrollbar {
    width: 0;
}

/* Thin separator before menu */
.sidebar-collapse .sidebar-wrapper>nav.mt-2 {
    margin-top: 0.25rem !important;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Each nav item container */
.sidebar-collapse .sidebar-menu>.nav-item {
    display: flex;
    justify-content: center;
    padding: 1.5px 0;
}

/* Nav link as icon card */
body.sidebar-collapse .sidebar-menu>.nav-item>.nav-link,
body.sidebar-collapse .nav.sidebar-menu>.nav-item>.nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 42px;
    padding: 0 !important;
    margin: 0 auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

/* Hover effect - VISIBLE glow */
body.sidebar-collapse .sidebar-menu>.nav-item>.nav-link:hover,
body.sidebar-collapse .nav.sidebar-menu>.nav-item>.nav-link:hover {
    width: 58px !important;
    background: rgba(96, 165, 250, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25),
        0 4px 20px rgba(96, 165, 250, 0.3) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
}

/* Active state - blue accent */
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link.active {
    background: rgba(96, 165, 250, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
    box-shadow: 0 2px 10px rgba(96, 165, 250, 0.12);
}

/* Menu open state for treeview parent */
.sidebar-collapse .sidebar-menu>.nav-item.menu-open>.nav-link {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.12);
}

/* --- Icon styling --- */
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link .nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link>i.nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link>i:first-child {
    font-size: 1.1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: unset !important;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.sidebar-collapse .sidebar-menu>.nav-item>.nav-link:hover .nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link:hover>i.nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link:hover>i:first-child {
    color: #fff !important;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
    transform: scale(1.1);
}

.sidebar-collapse .sidebar-menu>.nav-item>.nav-link.active .nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link.active>i.nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link.active>i:first-child {
    color: #60a5fa !important;
}

.sidebar-collapse .sidebar-menu>.nav-item.menu-open>.nav-link .nav-icon,
.sidebar-collapse .sidebar-menu>.nav-item.menu-open>.nav-link>i:first-child {
    color: #60a5fa !important;
}

/* --- Hide text and arrows in collapsed state --- */
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link>p,
.sidebar-collapse .sidebar-menu>.nav-item>.nav-link>span:not(.nav-icon) {
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
}

/* --- Hide submenus in collapsed state --- */
.sidebar-collapse .nav-treeview {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* --- Tooltip (JS-based, styles only) --- */
.sidebar-mini-tooltip {
    position: fixed;
    z-index: 999999;
    background: #0f172a;
    color: #f1f5f9;
    padding: 9px 24px;
    border-radius: 10px;
    font-size: 0.8rem;
    min-width: 80px;
    text-align: center;
    font-weight: 600;
    font-family: 'Inter', 'Outfit', sans-serif;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-mini-tooltip.visible {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-mini-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #0f172a;
}

/* --- Nav headers in collapsed state --- */
.sidebar-collapse .sidebar-menu>.nav-header {
    padding: 0.4rem 0 !important;
    margin: 0.15rem auto;
    width: 24px;
    overflow: hidden;
}

.sidebar-collapse .sidebar-menu>.nav-header * {
    display: none;
}

.sidebar-collapse .sidebar-menu>.nav-header::after {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 0 auto;
}

/* --- EXPANDED STATE (smooth return) --- */
body:not(.sidebar-collapse) .sidebar-brand .brand-link>span {
    transition: opacity 0.25s ease 0.2s;
}

body:not(.sidebar-collapse) .sidebar-user-info {
    transition: opacity 0.25s ease 0.2s, visibility 0s ease 0.2s;
}

body:not(.sidebar-collapse) .sidebar-user-chevron {
    transition: opacity 0.25s ease 0.2s, visibility 0s ease 0.2s;
}

body:not(.sidebar-collapse) .sidebar-search-panel {
    transition: opacity 0.25s ease 0.15s, height 0.2s ease 0.1s;
}

body:not(.sidebar-collapse) .sidebar-menu>.nav-item>.nav-link>.nav-icon {
    transition: all 0.2s ease;
}

/* --- Dark mode refinements --- */
[data-bs-theme="dark"] .sidebar-collapse .sidebar-menu>.nav-item>.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .sidebar-collapse .sidebar-menu>.nav-item>.nav-link.active {
    background: rgba(96, 165, 250, 0.15) !important;
}

/* --- Mobile responsive --- */
@media (max-width: 991.98px) {
    .sidebar-collapse .app-sidebar {
        width: 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .sidebar-collapse .app-sidebar::after {
        display: none;
    }

    body:not(.sidebar-collapse) .app-sidebar {
        width: 280px !important;
    }

    /* On mobile when open, show full sidebar - no mini mode */
    body:not(.sidebar-collapse) .sidebar-user-info,
    body:not(.sidebar-collapse) .sidebar-search-panel,
    body:not(.sidebar-collapse) .sidebar-menu>.nav-item>.nav-link>p {
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }
}

/* ========================================
   Premium POS (posyaqha) Styles
   ======================================== */

/* --- POS Search Bar --- */
.pos-search-bar {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    border-radius: 14px;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(10, 22, 40, 0.2);
}
.pos-search-bar .form-control {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.88rem;
}
.pos-search-bar .form-control::placeholder { color: rgba(255,255,255,0.5) !important; }
.pos-search-bar .form-control:focus {
    background: rgba(255,255,255,0.18) !important;
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08) !important;
}
.pos-search-bar .btn-tool {
    color: rgba(255,255,255,0.7) !important;
    transition: color 0.2s;
}
.pos-search-bar .btn-tool:hover { color: #fff !important; }
.pos-search-bar .pos-logo { height: 32px; border-radius: 6px; }

/* --- POS Category Cards --- */
.pos-categories {
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0;
}
.pos-category-card {
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    border: none !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    min-height: 70px;
    position: relative;
}
.pos-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.pos-category-card .inner { padding: 0.6rem 0.8rem !important; }
.pos-category-card .inner a {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff !important;
}
.pos-category-card .inner a:hover { text-decoration: none !important; }
.pos-category-card .inner h4 {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}
.pos-category-card .inner p {
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
    text-decoration: none !important;
}

/* --- POS Product Cards --- */
.pos-products {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.pos-product-card {
    border-radius: 14px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    text-align: left;
}
[data-bs-theme="dark"] .pos-product-card {
    background: rgba(30,41,59,0.85) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #e2e8f0 !important;
}
.pos-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    border-color: #3b82f6 !important;
}
.pos-product-card .card-body {
    padding: 0.6rem 0.75rem 0.4rem !important;
}
.pos-product-card .product-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    min-height: 2em;
}
[data-bs-theme="dark"] .pos-product-card .product-name { color: #e2e8f0 !important; }
.pos-product-card .card-footer {
    border-top: none !important;
    padding: 0 !important;
    display: flex;
    border-radius: 0 0 14px 14px !important;
    overflow: hidden;
}
.pos-product-card .price-section {
    flex: 1;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pos-product-card .price-symbol {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.85;
}
.pos-product-card .price-value {
    font-size: 0.92rem;
    font-weight: 700;
}
.pos-product-card .cart-btn {
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3) !important;
    transition: background 0.2s;
    font-size: 1rem;
}
.pos-product-card .cart-btn:hover {
    background: rgba(0,0,0,0.5) !important;
}

/* --- POS Receipt / Right Panel --- */
.pos-receipt-panel {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(10,22,40,0.1) !important;
    overflow: hidden;
}
[data-bs-theme="dark"] .pos-receipt-panel {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}
.pos-receipt-panel .box-profile {
    padding: 0.75rem !important;
}

/* Customer bar */
.pos-customer-bar {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pos-customer-bar .form-control {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
}
.pos-customer-bar .btn-customer {
    background: #f59e0b !important;
    border: none !important;
    border-radius: 8px !important;
    color: #000 !important;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    transition: all 0.2s;
}
.pos-customer-bar .btn-customer:hover {
    background: #d97706 !important;
    transform: scale(1.05);
}

/* Cart table */
.pos-cart-table {
    font-size: 0.82rem;
    margin-bottom: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
[data-bs-theme="dark"] .pos-cart-table {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
.pos-cart-table thead th {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.6rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
[data-bs-theme="dark"] .pos-cart-table thead th {
    background: rgba(0,0,0,0.3);
    color: #94a3b8;
    border-color: rgba(255,255,255,0.06);
}
.pos-cart-table tbody td {
    padding: 0.4rem 0.6rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
[data-bs-theme="dark"] .pos-cart-table tbody td {
    border-color: rgba(255,255,255,0.04);
}
.pos-cart-table .totals-row td {
    background: #f8fafc;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border: none;
}
[data-bs-theme="dark"] .pos-cart-table .totals-row td {
    background: rgba(0,0,0,0.15);
}
.pos-cart-table .total-final td {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%) !important;
    color: #fff !important;
    font-size: 0.9rem;
}

/* Payments section */
.pos-payments-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.5rem;
}
[data-bs-theme="dark"] .pos-payments-label { color: #94a3b8; }

.pos-pay-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.85rem !important;
    transition: all 0.2s !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pos-pay-btn:hover { transform: translateY(-1px); }
.pos-pay-btn.btn-cash {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #000 !important;
    box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}
.pos-pay-btn.btn-credit {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(59,130,246,0.3);
}

/* Payments table */
.pos-payments-table {
    font-size: 0.78rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
[data-bs-theme="dark"] .pos-payments-table {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* --- Action Buttons --- */
.pos-action-btn {
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 0.65rem 1rem !important;
    transition: all 0.25s !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}
.pos-action-btn:hover { transform: translateY(-2px); }

.pos-action-btn.btn-comprobante,
[data-bs-theme="dark"] .pos-action-btn.btn-comprobante {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(16,185,129,0.3) !important;
}
.pos-action-btn.btn-comprobante:hover {
    box-shadow: 0 6px 20px rgba(16,185,129,0.5) !important;
}
.pos-action-btn.btn-suscripcion,
[data-bs-theme="dark"] .pos-action-btn.btn-suscripcion {
    background: linear-gradient(135deg, #ea580c, #f97316) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(249,115,22,0.3) !important;
}
.pos-action-btn.btn-suscripcion:hover {
    box-shadow: 0 6px 20px rgba(249,115,22,0.5) !important;
}
.pos-action-btn.btn-cotizar,
[data-bs-theme="dark"] .pos-action-btn.btn-cotizar {
    background: linear-gradient(135deg, #0891b2, #06b6d4) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(6,182,212,0.3) !important;
}
.pos-action-btn.btn-nota,
[data-bs-theme="dark"] .pos-action-btn.btn-nota {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(139,92,246,0.3) !important;
}
.pos-action-btn.btn-cancelar,
[data-bs-theme="dark"] .pos-action-btn.btn-cancelar {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3) !important;
}
.pos-action-btn.btn-cancelar:hover {
    box-shadow: 0 6px 20px rgba(220,38,38,0.5) !important;
}

/* Empty states */
.pos-empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #94a3b8;
}
.pos-empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.3rem;
}
[data-bs-theme="dark"] .pos-empty-state h3 { color: #e2e8f0; }
.pos-empty-state p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
}

/* "Ver más categorías" button */
.pos-more-categories {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 1rem !important;
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    border: none !important;
    color: #fff !important;
    transition: all 0.2s !important;
}
.pos-more-categories:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,0.3); }

/* --- POS Responsive Tablet (< 992px) --- */
@media (max-width: 991px) {
    .pos-search-bar { padding: 0.4rem 0.6rem; gap: 0.3rem; }
    .pos-search-bar .pos-logo { height: 28px; }
    .pos-search-bar .form-control { font-size: 0.8rem; }
    .pos-category-card .inner p { font-size: 0.68rem; }
    .pos-category-card .inner h4 { font-size: 0.95rem; }
    .pos-product-card .product-name { font-size: 0.72rem; }
    .pos-receipt-panel { font-size: 0.82rem; }
    .pos-receipt-panel .table { font-size: 0.75rem; }
    .pos-receipt-panel .table th,
    .pos-receipt-panel .table td { padding: 0.25rem 0.4rem; }
}

/* --- POS Responsive Mobile (< 576px) --- */
@media (max-width: 575px) {
    .pos-search-bar { padding: 0.3rem 0.4rem; gap: 4px; }
    .pos-search-bar img { height: 22px !important; }
    .pos-search-bar .form-control { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
    .pos-categories { padding: 0.3rem !important; }
    .pos-category-card { border-radius: 10px !important; }
    .pos-category-card .inner { padding: 0.4rem 0.5rem !important; }
    .pos-category-card .inner h4 { font-size: 0.85rem; }
    .pos-category-card .inner p { font-size: 0.62rem; }
    .pos-product-card { border-radius: 10px !important; }
    .pos-product-card .product-name { font-size: 0.65rem !important; min-height: auto !important; }
    .pos-receipt-panel { padding: 0.4rem !important; font-size: 0.78rem; }
    .pos-receipt-panel .table { font-size: 0.7rem; }
    .pos-receipt-panel .table th,
    .pos-receipt-panel .table td { padding: 0.2rem 0.3rem; white-space: nowrap; }
    .pos-customer-bar { padding: 0.3rem 0.5rem !important; }
    .pos-customer-bar .form-control { font-size: 0.8rem; }
}