/* =========================================
   MODERN ERP / DASHBOARD UI
========================================= */

:root {

    /* ===== COLORS ===== */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --secondary: #7c3aed;
    --success: #10b981;
    --info: #0ea5e9;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* ===== BACKGROUNDS ===== */
    --bg-main: #ffffff;
    --bg-sidebar: #1e40af;
    --bg-card: #ffffff;

    --bg-hover: rgba(255,255,255,0.15);

    /* ===== TEXT ===== */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* ===== BORDERS ===== */
    --border-color: #e2e8f0;

    /* ===== SHADOWS ===== */
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.08);

    --radius: 18px;
}

/* =========================================
   GLOBAL
========================================= */

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
    color: var(--text-main);
    font-weight: 700;
}

a {
    text-decoration: none;
}

/* =========================================
   PAGE TITLES
========================================= */

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   MAIN CONTENT
========================================= */

.main-content-area {
    background: #ffffff;
    min-height: 100vh;
    padding: 2rem;
}

/* =========================================
   SIDEBAR
========================================= */

.bg-dark,
.offcanvas,
.offcanvas-lg,
.sidebar {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid rgba(255,255,255,0.08);
}

/* =========================================
   SIDEBAR BRAND
========================================= */

.sidebar-title,
.offcanvas-title,
.logo-text,
.sidebar-brand,
.sidebar-brand h4,
.sidebar-brand h5 {
    color: white !important;
}

/* =========================================
   SUCURSAL BOX
========================================= */

.card-sucursal,
.sucursal-box {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    border-radius: 18px;
    backdrop-filter: blur(8px);
}

/* =========================================
   MENU
========================================= */

.boutique-menu .nav-link {

    color: #ffffff;

    border-radius: 14px;

    padding: 0.85rem 1rem;

    margin-bottom: 8px;

    transition: all 0.25s ease;

    font-size: 0.95rem;

    font-weight: 600;
}

.boutique-menu .nav-link i {
    margin-right: 8px;
}

.boutique-menu .nav-link:hover {

    background: rgba(255,255,255,0.15);

    color: #ffffff;

    transform: translateX(4px);
}

.boutique-menu .nav-link.active {

    background: #2563eb;

    color: white !important;

    box-shadow: 0 6px 18px rgba(37,99,235,0.35);
}

/* =========================================
   TPV BUTTON
========================================= */

.boutique-menu .nav-link.active-tpv {

    background: #10b981 !important;

    color: white !important;

    box-shadow: 0 6px 18px rgba(16,185,129,0.35);
}

/* =========================================
   KPI CARDS
========================================= */

.kpi-card {

    background: var(--bg-card);

    border-radius: 22px;

    padding: 1.4rem;

    border: 1px solid var(--border-color);

    display: flex;

    align-items: center;

    gap: 1rem;

    transition: all .25s ease;

    position: relative;

    overflow: hidden;

    box-shadow: var(--shadow-sm);

    min-height: 120px;
}

.kpi-card:hover {

    transform: translateY(-5px);

    box-shadow: var(--shadow-lg);
}

.kpi-card::after {

    content: '';

    position: absolute;

    right: -40px;

    top: -40px;

    width: 120px;

    height: 120px;

    border-radius: 50%;

    background: var(--kpi-bg, rgba(37,99,235,0.08));
}

/* KPI ICON */

.kpi-icon-wrap {

    width: 60px;

    height: 60px;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--kpi-bg, rgba(37,99,235,0.1));

    color: var(--kpi-color, var(--primary));

    font-size: 1.5rem;

    flex-shrink: 0;

    z-index: 1;
}

.kpi-icon-wrap i {
    transition: all .3s ease;
}

.kpi-card:hover .kpi-icon-wrap i {
    transform: scale(1.15);
}

/* KPI DATA */

.kpi-data {

    z-index: 1;

    width: 100%;

    overflow: hidden;
}

.kpi-title {

    font-size: 0.72rem;

    text-transform: uppercase;

    letter-spacing: 1px;

    font-weight: 700;

    color: var(--text-muted);

    margin-bottom: 0.4rem;
}

.kpi-value {

    font-size: 1.35rem;

    font-weight: 800;

    color: var(--text-main);

    line-height: 1.2;

    word-break: break-word;

    overflow-wrap: break-word;
}

/* =========================================
   CARDS
========================================= */

.glass-card,
.widget-card,
.card {

    background: #ffffff;

    border-radius: 22px;

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-sm);
}

.glass-card:hover,
.widget-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {

    background: transparent;

    border-bottom: 1px solid var(--border-color);

    padding: 1.2rem 1.5rem;
}

.card-title-modern {

    font-weight: 700;

    font-size: 1.05rem;

    color: var(--text-main);

    margin: 0;
}

/* =========================================
   BUTTONS
========================================= */

.btn {

    border-radius: 12px;

    font-weight: 600;

    transition: all .2s ease;
}

.btn-primary {

    background: var(--primary) !important;

    border-color: var(--primary) !important;
}

.btn-primary:hover {

    background: var(--primary-hover) !important;

    border-color: var(--primary-hover) !important;

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}

.btn-success {

    background: var(--success) !important;

    border-color: var(--success) !important;
}

.btn-success:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(16,185,129,0.25);
}

/* =========================================
   TABLES
========================================= */

.table {

    border-radius: 16px;

    overflow: hidden;
}

.table thead {
    background: #f8fafc;
}

.table th {

    border-bottom: 1px solid var(--border-color);

    color: #334155;

    font-size: 0.85rem;

    font-weight: 700;
}

.table td {

    vertical-align: middle;

    border-color: #f1f5f9;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}

/* =========================================
   FORM CONTROLS
========================================= */

.form-control,
.form-select {

    border-radius: 12px;

    border: 1px solid var(--border-color);

    padding: 0.7rem 0.9rem;
}

.form-control:focus,
.form-select:focus {

    border-color: #93c5fd;

    box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.15);
}

/* =========================================
   BADGES
========================================= */

.badge {

    border-radius: 999px;

    padding: 0.5em 0.8em;

    font-weight: 600;
}

/* =========================================
   CHARTS
========================================= */

.chart-container-line {

    position: relative;

    height: 350px;
}

.chart-container-doughnut {

    position: relative;

    height: 300px;
}

/* =========================================
   NAVBAR MOBILE
========================================= */

.navbar-mobile {
    background: #1e40af !important;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (min-width: 992px) {

    .offcanvas-lg {
        position: fixed !important;
        top: 0;
    }

    .main-content-area {

        margin-left: 260px;

        width: calc(100% - 260px);
    }
}

@media (max-width: 991px) {

    body {
        padding-left: 0 !important;
    }

    .main-content-area {

        margin-left: 0;

        width: 100%;

        padding: 1rem;
    }

    .kpi-value {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {

    .kpi-card {
        padding: 1.1rem;
    }

    .chart-container-line {
        height: 280px;
    }

    .chart-container-doughnut {
        height: 260px;
    }
    .select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529 !important;
    line-height: 38px !important;
    padding-left: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

.select2-dropdown {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
}
    
}
