:root {
    --purple: #2A36E0;
    --purple-dark: #161D8A;
    --purple-light: #7B8BFF;
    --lime: #00D4FF;
    --lime-dark: #0093C4;
    --teal: #0EA5E9;
    --teal-dark: #075985;
    --maroon: #A52A2A;
    --maroon-dark: #611818;
    --bg: #050A1E;
    --bg-2: #0A1230;
    --bg-3: #101B3F;
    --card: rgba(255, 255, 255, 0.04);
    --card-solid: #0C1533;
    --border: rgba(0, 212, 255, 0.15);
    --text: #EAF2FF;
    --text-dim: #8FA3C8;
    --gradient: linear-gradient(135deg, #2A36E0 0%, #0EA5E9 100%);
    --gradient-lime: linear-gradient(135deg, #0093C4 0%, #00D4FF 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-purple: 0 0 24px rgba(42, 54, 224, 0.45);
    --glow-lime: 0 0 18px rgba(0, 212, 255, 0.35);
    --glow-teal: 0 0 18px rgba(14, 165, 233, 0.4);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: 'Segoe UI', 'Exo 2', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 80% -10%, rgba(42, 54, 224, 0.28), transparent),
        radial-gradient(ellipse 50% 40% at 10% 110%, rgba(14, 165, 233, 0.18), transparent),
        radial-gradient(ellipse 30% 25% at 50% 50%, rgba(0, 212, 255, 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--lime); }

h1, h2, h3, h4 {
    font-family: 'Exo 2', 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

/* ============ LAYOUT ============ */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(42, 54, 224, 0.16), rgba(5, 10, 30, 0.98));
    border-right: 1px solid var(--border);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-box {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: var(--glow-purple);
    flex-shrink: 0;
}

.logo-box span { color: #fff; font-weight: 800; font-family: 'Exo 2', sans-serif; }

.sidebar-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-subtitle { font-size: 11px; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; padding: 14px 10px 6px; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-dim);
    margin-bottom: 3px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    font-size: 13.5px;
}

.nav-item:hover { color: #fff; background: rgba(42, 54, 224, 0.18); transform: translateX(3px); }

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(42, 54, 224, 0.4), rgba(14, 165, 233, 0.14));
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: var(--glow-purple);
}

.nav-item .icon { font-size: 17px; width: 22px; text-align: center; }

.nav-badge {
    margin-left: auto;
    background: var(--maroon);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    animation: pulse-badge 1.8s infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(165, 42, 42, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(165, 42, 42, 0); }
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}

.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 15px;
    box-shadow: var(--glow-purple);
    flex-shrink: 0;
}

.user-meta { flex: 1; min-width: 0; }
.user-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--lime); text-transform: uppercase; letter-spacing: 1px; }

.logout-btn {
    background: transparent; border: 1px solid rgba(165, 42, 42, 0.5);
    color: var(--text-dim); width: 34px; height: 34px; border-radius: 8px;
    cursor: pointer; font-size: 15px; transition: all 0.25s;
    display: flex; align-items: center; justify-content: center;
}

.logout-btn:hover { background: var(--maroon); color: #fff; box-shadow: 0 0 16px rgba(165, 42, 42, 0.5); }

/* ============ MAIN ============ */
.main { flex: 1; margin-left: 260px; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 16px;
    padding: 14px 28px;
    background: rgba(5, 10, 30, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.topbar-page-title { font-size: 18px; font-weight: 700; color: #fff; flex: 1; }
.topbar-page-title small { display: block; font-size: 11px; color: var(--text-dim); font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.clock { font-family: 'Exo 2', monospace; color: var(--teal); font-size: 13px; letter-spacing: 1px; border: 1px solid rgba(14, 165, 233, 0.35); padding: 6px 12px; border-radius: 8px; background: rgba(14, 165, 233, 0.08); }

.icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px; height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    transition: all 0.25s;
    display: flex; align-items: center; justify-content: center;
}

.icon-btn:hover { background: rgba(42, 54, 224, 0.3); color: #fff; box-shadow: var(--glow-purple); }

.bell-dot {
    position: absolute; top: -5px; right: -5px;
    min-width: 19px; height: 19px;
    background: var(--maroon);
    color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 20px;
    display: none; align-items: center; justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 12px rgba(165, 42, 42, 0.8);
    animation: pulse-badge 1.6s infinite;
}

.bell-dot.show { display: flex; }

.notif-panel {
    position: absolute; top: 52px; right: 0;
    width: 360px; max-height: 480px;
    background: var(--card-solid);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 40px rgba(42, 54, 224, 0.3);
    overflow: hidden;
    display: none;
    z-index: 100;
}

.notif-panel.open { display: block; animation: slideDown 0.25s ease; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.notif-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(90deg, rgba(165, 42, 42, 0.15), transparent);
}

.notif-header h4 { font-size: 14px; color: #fff; }

.notif-body { max-height: 380px; overflow-y: auto; }

.notif-item {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex; gap: 12px; align-items: flex-start;
    transition: background 0.2s;
    cursor: pointer;
}

.notif-item:hover { background: rgba(165, 42, 42, 0.1); }
.notif-item.notif-out { background: rgba(165, 42, 42, 0.12); border-left: 3px solid #ff4d4d; }

.notif-icon { font-size: 18px; color: var(--maroon); }

.notif-item strong { color: #fff; font-size: 13px; }
.notif-item p { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.notif-item .badge-red { background: rgba(165, 42, 42, 0.2); color: #ff8a8a; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; margin-top: 5px; display: inline-block; }
.notif-dismiss { margin-left: auto; opacity: 0.4; font-size: 12px; color: var(--text-dim); padding: 2px 6px; border-radius: 6px; transition: all 0.2s; }
.notif-item:hover .notif-dismiss { opacity: 1; color: #ff8a8a; }

.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-dim); }
.notif-empty .icon { font-size: 34px; display: block; margin-bottom: 8px; }

.content { padding: 26px 28px; flex: 1; }

/* ============ CARDS ============ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0.6;
}

.card-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-title .icon { color: var(--teal); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ============ KPI ============ */
.kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow), var(--glow-purple); }

.kpi-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.kpi.purple .kpi-icon { background: rgba(42, 54, 224, 0.2); color: var(--purple-light); box-shadow: 0 0 16px rgba(42, 54, 224, 0.4); }
.kpi.lime .kpi-icon { background: rgba(0, 212, 255, 0.12); color: var(--lime); box-shadow: 0 0 16px rgba(0, 212, 255, 0.3); }
.kpi.teal .kpi-icon { background: rgba(14, 165, 233, 0.15); color: var(--teal); box-shadow: 0 0 16px rgba(14, 165, 233, 0.35); }

.kpi-count { font-size: 12px; color: var(--text-dim); margin-top: 2px; font-weight: 600; }
.kpi-count span { font-size: 24px; font-weight: 800; font-family: 'Exo 2', sans-serif; }
.kpi.purple .kpi-count span { color: #B9C3FF; }
.kpi.teal .kpi-count span { color: var(--teal); }
.kpi.lime .kpi-count span { color: var(--lime); }
.kpi.maroon .kpi-icon { background: rgba(165, 42, 42, 0.15); color: #e06b6b; box-shadow: 0 0 16px rgba(165, 42, 42, 0.35); }

.kpi-value { font-size: 26px; font-weight: 800; color: #fff; font-family: 'Exo 2', sans-serif; letter-spacing: 0.5px; }
.kpi-label { font-size: 12px; color: var(--text-dim); margin-top: 3px; text-transform: uppercase; letter-spacing: 1.2px; }
.kpi-trend { font-size: 11px; margin-top: 8px; }
.kpi-trend.up { color: var(--lime); }
.kpi-trend.down { color: #ff8a8a; }

.kpi-link { display: block; text-decoration: none; color: inherit; transition: transform 0.25s; }
.kpi-link:hover { transform: translateY(-4px); }
.kpi-link .kpi { transition: transform 0.25s, box-shadow 0.25s; }
.kpi-link:hover .kpi { box-shadow: var(--shadow), var(--glow-purple); }

.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 8px rgba(255, 255, 255, 0.25); }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; }

thead th {
    text-align: left;
    padding: 11px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(42, 54, 224, 0.1);
    white-space: nowrap;
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    white-space: nowrap;
}

tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(42, 54, 224, 0.12); }

.text-dim { color: var(--text-dim); }
.text-right { text-align: right; }
.text-center { text-align: center; }

.amount { font-weight: 700; color: #fff; }
.amount.lime { color: var(--lime); }
.amount.maroon { color: #ff8a8a; }

/* ============ BADGES / CHIPS ============ */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.chip.active { background: rgba(0, 212, 255, 0.14); color: var(--lime); border: 1px solid rgba(0, 212, 255, 0.35); }
.chip.inactive { background: rgba(165, 42, 42, 0.15); color: #ff8a8a; border: 1px solid rgba(165, 42, 42, 0.4); }
.chip.low { background: rgba(165, 42, 42, 0.18); color: #ff8a8a; border: 1px solid rgba(165, 42, 42, 0.5); animation: pulse-badge 2s infinite; }
.chip.ok { background: rgba(14, 165, 233, 0.14); color: var(--teal); border: 1px solid rgba(14, 165, 233, 0.35); }
.chip.info { background: rgba(42, 54, 224, 0.2); color: var(--purple-light); border: 1px solid rgba(42, 54, 224, 0.45); }
.chip.doc-factura { background: rgba(14, 165, 233, 0.14); color: var(--teal); border: 1px solid rgba(14, 165, 233, 0.35); }
.chip.doc-nota { background: rgba(255, 255, 255, 0.07); color: var(--text-dim); border: 1px solid rgba(255, 255, 255, 0.18); }
.chip.doc-proforma { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }

.stock-cell { display: flex; align-items: center; gap: 8px; }
.stock-bar { width: 70px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.stock-bar > div { height: 100%; border-radius: 4px; background: var(--teal); transition: width 0.4s; }
.stock-bar > div.danger { background: var(--maroon); box-shadow: 0 0 8px rgba(165, 42, 42, 0.7); }
.stock-bar > div.warn { background: var(--lime); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }

.form-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.form-control, .form-select, .form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22);
}

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300D4FF' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-error { color: #ff8a8a; font-size: 11.5px; margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

label.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; flex-direction: row-reverse; }
label.switch.switch-right { justify-content: space-between; width: 100%; }
.switch input { display: none; }
.switch .track { width: 42px; height: 22px; background: rgba(255, 255, 255, 0.12); border-radius: 20px; position: relative; transition: background 0.25s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.25s; }
.switch input:checked + .track { background: var(--teal); box-shadow: 0 0 12px rgba(14, 165, 233, 0.5); }
.switch input:checked + .track::after { transform: translateX(20px); background: #050A1E; }
.switch input:checked + .track::after.lime-check { background: #050A1E; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.btn-purple { background: linear-gradient(135deg, #2A36E0, #4A5CF5); color: #fff; box-shadow: 0 4px 16px rgba(42, 54, 224, 0.45); }
.btn-purple:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(42, 54, 224, 0.65); }

.btn-lime { background: linear-gradient(135deg, #0093C4, #00D4FF); color: #04121F; box-shadow: 0 4px 16px rgba(0, 212, 255, 0.35); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 212, 255, 0.55); }

.btn-teal { background: linear-gradient(135deg, #075985, #0EA5E9); color: #fff; box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4); }
.btn-teal:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(14, 165, 233, 0.6); }

.btn-maroon { background: linear-gradient(135deg, #611818, #A52A2A); color: #fff; box-shadow: 0 4px 16px rgba(165, 42, 42, 0.35); }
.btn-maroon:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(165, 42, 42, 0.55); }

.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.15); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-outline { background: transparent; border-color: rgba(0, 212, 255, 0.45); color: var(--lime); }
.btn-outline:hover { background: rgba(0, 212, 255, 0.12); box-shadow: 0 0 16px rgba(0, 212, 255, 0.3); }

.btn-sm { padding: 6px 12px; font-size: 11.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.icon-btn-table {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 4px;
}

.icon-btn-table.edit:hover { background: rgba(14, 165, 233, 0.22); color: var(--teal); border-color: var(--teal); }
.icon-btn-table.delete:hover { background: rgba(165, 42, 42, 0.25); color: #ff8a8a; border-color: var(--maroon); }
.icon-btn-table.view:hover { background: rgba(42, 54, 224, 0.28); color: var(--purple-light); border-color: var(--purple); }

/* ============ SEARCH / TOOLBAR ============ */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 14px; }
.search-box input { padding-left: 40px; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(2, 6, 20, 0.78);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 200;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    width: 560px; max-width: 94vw;
    max-height: 92vh;
    background: var(--card-solid);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 50px rgba(42, 54, 224, 0.35);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-lg { width: 720px; }
.modal-xl { width: 860px; max-width: 96vw; }

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(90deg, rgba(42, 54, 224, 0.2), transparent);
}

.modal-header h3 { font-size: 16px; color: #fff; }
.modal-close {
    background: transparent; border: none; color: var(--text-dim);
    font-size: 20px; cursor: pointer; width: 32px; height: 32px;
    border-radius: 8px; transition: all 0.2s;
}
.modal-close:hover { background: rgba(165, 42, 42, 0.3); color: #fff; }

.modal-body { padding: 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal form .modal-body { flex: 1; min-height: 0; overflow-y: auto; }

.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ============ TOASTS ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }

.toast {
    min-width: 300px; max-width: 400px;
    background: var(--card-solid);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--teal);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

.toast.success { border-left-color: var(--lime); }
.toast.error { border-left-color: var(--maroon); }
.toast.info { border-left-color: var(--teal); }

.toast .t-icon { font-size: 18px; }
.toast.success .t-icon { color: var(--lime); }
.toast.error .t-icon { color: #ff8a8a; }
.toast.info .t-icon { color: var(--teal); }

.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty-state .icon { font-size: 44px; display: block; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { margin-top: 4px; }

/* ============ AUTH ============ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 1; }

.auth-card {
    width: 440px; max-width: 96vw;
    background: rgba(10, 18, 48, 0.92);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 38px;
    box-shadow: var(--shadow), 0 0 60px rgba(42, 54, 224, 0.3);
    backdrop-filter: blur(16px);
    animation: modalIn 0.4s ease;
}

.auth-logo {
    width: 62px; height: 62px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    box-shadow: var(--glow-purple);
}

.auth-title { text-align: center; font-size: 22px; color: #fff; font-weight: 800; }
.auth-subtitle { text-align: center; color: var(--text-dim); font-size: 13px; margin: 6px 0 26px; }

.auth-alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-dim); }

.auth-hint { margin-top: 22px; padding: 14px; border: 1px dashed rgba(0, 212, 255, 0.3); border-radius: 10px; background: rgba(0, 212, 255, 0.05); font-size: 12px; color: var(--text-dim); line-height: 1.8; }
.auth-hint strong { color: var(--lime); }

/* ============ AUTH LANDING (FUTURISTICO BLANCO-AZUL) ============ */
body:has(.auth-land) { background: #EAF4FF; }
body:has(.auth-land)::before { display: none; }

.auth-land { position: relative; z-index: 1; min-height: 100vh; background: linear-gradient(180deg, #F4F9FF 0%, #EAF4FF 40%, #E3F0FF 100%); }

.auth-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 36px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(14, 165, 233, 0.15);
}

.auth-nav-brand { display: flex; align-items: center; gap: 10px; }

.auth-nav-logo {
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(42, 54, 224, 0.35);
}

.auth-nav-name { font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 17px; color: #0B1B3F; line-height: 1.15; }

.auth-nav-legal { display: block; font-family: 'Segoe UI', sans-serif; font-weight: 600; font-size: 10.5px; color: #7A93B8; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-nav-links { display: flex; gap: 26px; }
.auth-nav-links a { color: #30406F; font-weight: 600; font-size: 13.5px; transition: color 0.2s; }
.auth-nav-links a:hover { color: var(--teal); }

.auth-nav-cta {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, #2A36E0, #0EA5E9);
    color: #fff !important; font-weight: 700; font-size: 13px;
    padding: 9px 18px; border-radius: 10px;
    box-shadow: 0 6px 18px rgba(42, 54, 224, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(42, 54, 224, 0.4); }

.auth-hero {
    position: relative; overflow: hidden;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    gap: 60px; padding: 120px 48px 80px;
}

.auth-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, rgba(0, 0, 0, 0.9), transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, rgba(0, 0, 0, 0.9), transparent 75%);
}

.auth-hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.auth-hero-orb-1 { width: 420px; height: 420px; background: rgba(42, 54, 224, 0.16); top: -130px; left: -90px; animation: orbFloat 10s ease-in-out infinite alternate; }
.auth-hero-orb-2 { width: 380px; height: 380px; background: rgba(14, 165, 233, 0.22); bottom: -120px; right: -70px; animation: orbFloat 12s ease-in-out infinite alternate-reverse; }
.auth-hero-orb-3 { width: 220px; height: 220px; background: rgba(0, 212, 255, 0.16); top: 42%; left: 8%; animation: orbFloat 14s ease-in-out infinite alternate; }

@keyframes orbFloat { from { transform: translateY(-16px) } to { transform: translateY(18px) } }

.auth-hero-left { position: relative; z-index: 2; max-width: 520px; }

.auth-hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #00729C; font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
    margin-bottom: 20px;
}

.auth-hero-title {
    font-family: 'Exo 2', sans-serif;
    font-size: 46px; font-weight: 800; line-height: 1.12;
    color: #0B1B3F; margin-bottom: 16px;
}

.auth-hero-title .grad {
    background: linear-gradient(135deg, #2A36E0 0%, #0EA5E9 60%, #00D4FF 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-sub { color: #30406F; font-size: 15.5px; line-height: 1.65; max-width: 440px; margin-bottom: 28px; }

.auth-hero-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; }

.auth-btn-primary {
    display: inline-flex; align-items: center; gap: 9px;
    background: linear-gradient(135deg, #2A36E0 0%, #0EA5E9 100%);
    color: #fff !important; font-weight: 700; font-size: 14px;
    padding: 13px 24px; border-radius: 12px; border: none; cursor: pointer;
    box-shadow: 0 8px 24px rgba(42, 54, 224, 0.35);
    position: relative; overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn-primary::before {
    content: ''; position: absolute; top: 0; left: -80%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg); transition: left 0.6s ease; pointer-events: none;
}

.auth-btn-primary:hover::before { left: 130%; }
.auth-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(42, 54, 224, 0.45); }

.auth-btn-ghost {
    display: inline-flex; align-items: center;
    padding: 13px 22px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(42, 54, 224, 0.25);
    color: #2A36E0 !important; font-weight: 700; font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.auth-btn-ghost:hover { border-color: rgba(42, 54, 224, 0.5); background: #fff; }

.auth-hero-stats { display: flex; gap: 0; border-radius: 14px; overflow: hidden; max-width: 440px; background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(14, 165, 233, 0.18); }

.auth-hero-stats div { flex: 1; text-align: center; padding: 13px 8px; border-left: 1px solid rgba(14, 165, 233, 0.15); }
.auth-hero-stats div:first-child { border-left: none; }
.auth-hero-stats strong { display: block; font-family: 'Exo 2', sans-serif; font-size: 19px; color: #2743E0; }
.auth-hero-stats span { font-size: 10.5px; color: #30406F; }

.auth-hero-right { position: relative; z-index: 2; }

.auth-float-icon {
    position: absolute; z-index: 3;
    width: 44px; height: 44px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #0EA5E9;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(42, 54, 224, 0.18);
    animation: floatY 5s ease-in-out infinite;
}

.auth-float-1 { top: -22px; right: -18px; }
.auth-float-2 { bottom: 40px; left: -24px; animation-delay: 1.5s; color: #2A36E0; }

@keyframes floatY { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

.auth-land-card {
    width: 420px; max-width: 94vw;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 26px;
    padding: 36px 34px;
    box-shadow: 0 24px 70px rgba(42, 54, 224, 0.18), 0 4px 20px rgba(14, 165, 233, 0.1);
    backdrop-filter: blur(18px);
    animation: modalIn 0.5s ease;
}

.auth-land-card-head { text-align: center; margin-bottom: 24px; }

.auth-land-card-logo {
    width: 54px; height: 54px; margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(42, 54, 224, 0.35);
}

.auth-land-card-head h2 { font-family: 'Exo 2', sans-serif; font-size: 21px; font-weight: 800; color: #0B1B3F; }
.auth-land-card-head p { color: #30406F; font-size: 13px; margin-top: 4px; }

.auth-land-form { display: flex; flex-direction: column; gap: 2px; }
.auth-land-form .form-group label { color: #0B1B3F; font-weight: 700; font-size: 12.5px; }

.auth-land .form-control {
    background: #fff; color: #0B1B3F;
    border: 1px solid #CBDDF3 !important;
    box-shadow: none !important;
}

.auth-land .form-control:focus { border-color: #0EA5E9 !important; }

.auth-input-wrap { position: relative; }

.auth-input-ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #7A93B8; pointer-events: none;
    display: flex; transition: color 0.25s;
}

.auth-input-wrap:focus-within .auth-input-ico { color: #0EA5E9; }

.auth-input { padding-left: 42px !important; padding-right: 42px !important; }

.auth-pass-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #7A93B8; padding: 6px; border-radius: 8px;
    display: flex; align-items: center;
    transition: color 0.25s;
}

.auth-pass-toggle:hover { color: #0EA5E9; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }

.auth-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: #30406F; font-size: 12.5px; }

.auth-checkbox input { display: none; }

.auth-checkbox-track {
    width: 34px; height: 19px; flex-shrink: 0;
    border-radius: 999px; background: rgba(11, 27, 63, 0.12);
    border: 1px solid rgba(11, 27, 63, 0.2);
    position: relative; transition: background 0.25s, border-color 0.25s;
}

.auth-checkbox-dot { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #7A93B8; transition: transform 0.25s, background 0.25s; }

.auth-checkbox input:checked + .auth-checkbox-track { background: #0EA5E9; border-color: #0EA5E9; box-shadow: 0 0 10px rgba(14, 165, 233, 0.5); }
.auth-checkbox input:checked + .auth-checkbox-track .auth-checkbox-dot { transform: translateX(15px); background: #fff; }

.auth-forgot { font-size: 12.5px; color: #0EA5E9; font-weight: 700; }
.auth-forgot:hover { color: #00729C; text-decoration: underline; }

.auth-btn-block { width: 100%; justify-content: center; margin-top: 2px; }

.auth-arrow { transition: transform 0.25s ease; }
.auth-btn-submit:hover .auth-arrow { transform: translateX(5px); }

.auth-spinner { display: none; }
.auth-spinner svg { animation: spin 0.8s linear infinite; }
.auth-btn-submit.loading .auth-spinner { display: inline-flex; }
.auth-btn-submit.loading .auth-arrow { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 12px;
    color: #7A93B8; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
}

.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(14, 165, 233, 0.2); }

.auth-demos { display: flex; flex-direction: column; gap: 8px; }

.auth-demo {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.05);
    transition: border-color 0.25s, background 0.25s;
}

.auth-demo:hover { border-color: rgba(14, 165, 233, 0.45); background: rgba(14, 165, 233, 0.1); }

.auth-demo-avatar {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff;
}

.av-admin { background: linear-gradient(135deg, #2A36E0, #7B8BFF); }
.av-gerente { background: linear-gradient(135deg, #075985, #0EA5E9); }
.av-cajero { background: linear-gradient(135deg, #0093C4, #00D4FF); }

.auth-demo code { font-family: 'Consolas', monospace; font-size: 12px; color: #2743E0; flex: 1; }

.auth-demo-role { font-size: 10.5px; color: #00729C; background: rgba(14, 165, 233, 0.1); padding: 2px 8px; border-radius: 999px; font-weight: 700; }

.auth-demo-pass { margin-top: 10px; font-size: 11.5px; color: #30406F; text-align: center; }
.auth-demo-pass strong { color: #00729C; }

.auth-alt { text-align: center; margin-top: 18px; font-size: 13px; color: #30406F; }
.auth-alt a { color: #2A36E0; font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

.auth-features-sec { position: relative; padding: 70px 48px 80px; }

.auth-sec-head { text-align: center; margin-bottom: 44px; }
.auth-sec-head .auth-hero-badge { margin-bottom: 14px; }
.auth-sec-head h2 { font-family: 'Exo 2', sans-serif; font-size: 32px; font-weight: 800; color: #0B1B3F; }
.auth-sec-head p { margin-top: 8px; color: #30406F; font-size: 14.5px; }

.auth-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1060px; margin: 0 auto; }

.auth-feat-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 20px;
    padding: 30px 26px;
    box-shadow: 0 10px 30px rgba(42, 54, 224, 0.08);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.auth-feat-card:hover { transform: translateY(-6px); border-color: rgba(14, 165, 233, 0.45); box-shadow: 0 20px 44px rgba(42, 54, 224, 0.16); }

.auth-feat-ico {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(42, 54, 224, 0.3);
    margin-bottom: 18px;
}

.auth-feat-card h3 { font-family: 'Exo 2', sans-serif; font-size: 17px; font-weight: 800; color: #0B1B3F; margin-bottom: 8px; }
.auth-feat-card p { color: #30406F; font-size: 13.5px; line-height: 1.6; }

.auth-land-footer {
    padding: 34px 48px 40px;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(14, 165, 233, 0.15);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}

.auth-foot-contact { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }

.auth-contact-item { display: inline-flex; align-items: center; gap: 7px; color: #30406F; font-size: 13px; }
.auth-contact-item svg { color: #2A36E0; }

.auth-land-footer p { color: #7A93B8; font-size: 12px; }

@media (max-width: 980px) {
    .auth-nav { padding: 12px 18px; }
    .auth-nav-links { display: none; }
    .auth-hero { flex-direction: column; gap: 44px; padding: 110px 22px 60px; }
    .auth-hero-left { max-width: 100%; text-align: center; }
    .auth-hero-sub { margin-left: auto; margin-right: auto; }
    .auth-hero-actions { justify-content: center; }
    .auth-hero-stats { margin: 0 auto; }
    .auth-float-icon { display: none; }
    .auth-features-sec { padding: 54px 22px 60px; }
    .auth-feature-grid { grid-template-columns: 1fr; }
    .auth-land-footer { padding: 28px 20px 32px; }
}
/* ============ CHART ============ */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 10px; }

.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }

.bar-value { font-size: 10.5px; color: var(--text-dim); font-weight: 600; }

.bar {
    width: 100%; max-width: 44px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #0EA5E9, #075985);
    min-height: 4px;
    transition: height 0.6s ease;
    position: relative;
}

.bar.highlight { background: linear-gradient(180deg, #00D4FF, #0093C4); box-shadow: 0 0 16px rgba(0, 212, 255, 0.45); }

.bar-label { font-size: 10.5px; color: var(--text-dim); text-transform: capitalize; }

/* Barras dobles: gastos vs ingresos */
.dual-bars { display: flex; align-items: flex-end; justify-content: center; gap: 5px; width: 100%; height: 100%; }
.dual-bars .bar { width: 14px; max-width: none; min-height: 4px; }
.dual-bars .bar.income { background: linear-gradient(180deg, #00D4FF, #0093C4); box-shadow: 0 0 8px rgba(0, 212, 255, 0.4); }
.dual-bars .bar.expense { background: linear-gradient(180deg, #c24545, #7a1d1d); box-shadow: 0 0 8px rgba(165, 42, 42, 0.4); }

.legend-inline { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.legend-inline .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.legend { flex: 1; min-width: 180px; }
.legend-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-item .val { margin-left: auto; color: #fff; font-weight: 600; }
.legend-item .pct { color: var(--text-dim); width: 42px; text-align: right; }

/* ============ POS ============ */
.pos-layout { display: grid; grid-template-columns: fit-content(540px) 400px minmax(0, 1fr); gap: 16px; align-items: start; }

/* Barra de total a pagar (arriba del POS, costado derecho) */
.pos-totalbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 16px 24px;
    margin-bottom: 16px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.pos-totalbar::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(500px 90px at 90% 50%, rgba(255, 45, 45, 0.12), transparent 70%);
    pointer-events: none;
}
.pos-totalbar-info { position: relative; z-index: 1; }
.pos-totalbar-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.6px; font-weight: 600; }
.pos-totalbar-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.pos-totalbar-right {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.pos-totalbar-value {
    font-size: 42px;
    font-weight: 800;
    font-family: 'Exo 2', sans-serif;
    color: #ff2d2d;
    line-height: 1;
    animation: totalGlow 1.6s ease-in-out infinite;
}
.pos-totalbar-details {
    display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1px solid rgba(11, 27, 63, 0.12);
    border-radius: 8px;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.pos-totalbar-line { font-size: 13px; color: #000; font-weight: 600; white-space: nowrap; }
.pos-totalbar-line span { font-weight: 700; }

/* BotÃ³n Nueva venta (futurista, alto a la izquierda) */
.btn-nueva-venta {
    position: relative; z-index: 1;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px;
    align-self: stretch;
    margin: 6px 0;
    margin-right: auto;
    min-width: 116px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, rgba(42, 54, 224, 0.28), rgba(14, 165, 233, 0.22));
    color: #EAF2FF;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.25), inset 0 0 10px rgba(0, 212, 255, 0.08);
}
.btn-nueva-venta svg { flex-shrink: 0; }
.btn-nueva-venta:hover {
    transform: translateY(-2px);
    border-color: #00D4FF;
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.5), inset 0 0 14px rgba(0, 212, 255, 0.18);
}
.btn-nueva-venta:active { transform: translateY(0); }
@keyframes totalGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 45, 45, 0.75), 0 0 26px rgba(255, 45, 45, 0.5); }
    50% { text-shadow: 0 0 16px rgba(255, 45, 45, 1), 0 0 42px rgba(255, 45, 45, 0.8); }
}

.pos-catalog {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}

.pos-catalog-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pos-catalog-head h3 { font-size: 14.5px; color: #fff; }

.pos-catalog .toolbar { padding: 12px 16px; }

.pos-products-table { max-height: calc(100vh - 320px); overflow-y: auto; padding: 4px 12px 12px; }

.pos-products-table table { margin-top: 8px; }
.pos-products-table thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--card-solid);
    font-size: 11px; padding: 8px 6px;
}
.pos-products-table tbody td { padding: 7px 6px; font-size: 12.5px; }

.pos-products-table tbody tr.row-low { background: rgba(165, 42, 42, 0.08); }
.pos-products-table tbody tr.pos-row { cursor: pointer; }
.pos-products-table tbody tr.pos-row:hover { background: rgba(0, 212, 255, 0.05); }
.pos-products-table tbody tr.pos-row:hover strong { color: var(--lime); }

.pos-qty-input { width: 56px; padding: 5px 8px; text-align: center; font-size: 12.5px; }
.pos-products-table .btn-sm { padding: 6px 12px; font-size: 13px; }

/* Selector de cliente con bÃºsqueda */
.pos-client-select { position: relative; flex: 1; min-width: 0; }
.pos-client-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text);
    padding: 8px 12px;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.pos-client-btn:hover { border-color: var(--teal); }
.pos-client-btn .caret { font-size: 10px; color: var(--text-dim); }
.pos-client-drop {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: none;
    overflow: hidden;
}
.pos-client-select.open .pos-client-drop { display: block; }
.pos-client-search { padding: 8px; border-bottom: 1px solid var(--border); position: relative; }
.pos-client-search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-dim); }
.pos-client-search input { padding-left: 30px; font-size: 12.5px; }
.pos-client-list { max-height: 200px; overflow-y: auto; }
.pos-client-item {
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}
.pos-client-item:hover { background: rgba(0, 212, 255, 0.08); }
.pos-client-item.sel { background: linear-gradient(90deg, rgba(42, 54, 224, 0.22), rgba(14, 165, 233, 0.08)); }
.pos-client-item .n { font-size: 12.5px; color: #fff; font-weight: 600; }
.pos-client-item .d { font-size: 10.5px; color: var(--text-dim); }
.pos-client-empty { padding: 16px; text-align: center; color: var(--text-dim); font-size: 12px; }

[data-theme="light"] .pos-client-btn { background: #fff; color: #0B1B3F; border-color: rgba(11, 27, 63, 0.14); }
[data-theme="light"] .pos-client-drop { background: #fff; }
[data-theme="light"] .pos-client-item .n { color: #0B1B3F; }
[data-theme="light"] .pos-client-item:hover { background: rgba(39, 67, 224, 0.08); }

.pos-cart {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
}

.pos-doc-viewer {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
    display: flex; flex-direction: column;
    height: calc(100vh - 300px);
    min-height: 380px;
}

.pos-doc-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-shrink: 0;
}
.pos-doc-header h4 { font-size: 13px; color: #fff; }
.pos-doc-empty {
    flex: 1; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 26px 16px; text-align: center;
    color: var(--text-dim); font-size: 12.5px; line-height: 1.7;
}
.pos-doc-frame { flex: 1; min-height: 0; width: 100%; border: none; background: #fff; }

.pos-cart-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.pos-cart-header h3 { font-size: 15px; color: #fff; }
.pos-cart-header .count { background: rgba(42, 54, 224, 0.35); color: var(--purple-light); padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }

.pos-cart-items { flex: 1; overflow-y: auto; padding: 10px 14px; min-height: 120px; max-height: 320px; }

.pos-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.2s ease;
}

.pos-item-info { flex: 1; min-width: 0; }
.pos-item-info .name { font-size: 12.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-info .sub { font-size: 10.5px; color: var(--text-dim); }

.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { background: var(--teal); border-color: var(--teal); }
.qty-val { width: 34px; text-align: center; font-size: 12.5px; color: #fff; font-weight: 600; }

.pos-item-line { font-size: 12.5px; color: var(--lime); font-weight: 700; width: 84px; text-align: right; font-family: 'Exo 2', sans-serif; }

.pos-cart-empty { text-align: center; color: var(--text-dim); font-size: 12.5px; padding: 34px 10px; }

.pos-cart-body { padding: 0 18px 14px; }

.pos-total-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--text-dim); }
.pos-total-row .l { font-weight: 700; color: #fff; }
.pos-grand { display: flex; justify-content: space-between; align-items: center; padding: 13px 0 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.pos-grand .amount { font-size: 26px; font-family: 'Exo 2', sans-serif; }

.pos-pay { padding: 16px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

/* ============ VENTAS: tabla + visor ============ */
.ventas-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ventas-table-col { min-width: 0; }

.ventas-table-col table.compact { font-size: 12.5px; }
.ventas-table-col table.compact thead th { padding: 7px 8px; font-size: 10.5px; }
.ventas-table-col table.compact tbody td { padding: 7px 8px; }

.ventas-table-col tbody tr.ventas-row { cursor: pointer; }
.ventas-table-col tbody tr.ventas-row:hover { background: rgba(0, 212, 255, 0.06); }
.ventas-table-col tbody tr.ventas-row.selected {
    background: linear-gradient(90deg, rgba(42, 54, 224, 0.22), rgba(14, 165, 233, 0.08));
    border-left: 3px solid var(--lime);
}

.ventas-viewer {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky; top: 90px;
    min-width: 0;
    display: flex; flex-direction: column;
    height: calc(100vh - 240px);
    min-height: 380px;
}
.ventas-viewer-header {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-shrink: 0;
}
.ventas-viewer-header h4 { font-size: 13.5px; color: #fff; }
.ventas-viewer-empty {
    flex: 1; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; text-align: center;
    color: var(--text-dim); font-size: 13px; line-height: 1.7;
}
.ventas-viewer-frame { flex: 1; min-height: 0; width: 100%; border: none; background: #fff; }

@media (max-width: 1100px) {
    .ventas-layout { grid-template-columns: 1fr; }
    .ventas-viewer { position: static; }
}

[data-theme="light"] .ventas-viewer { background: #fff; }
[data-theme="light"] .ventas-viewer-header h4 { color: #0B1B3F; }
[data-theme="light"] .ventas-table-col tbody tr.ventas-row.selected {
    background: linear-gradient(90deg, rgba(42, 54, 224, 0.12), rgba(14, 165, 233, 0.05));
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #2A36E0, #0EA5E9); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #00D4FF; }

/* ============ PRINT (factura) ============ */
.print-area { display: none; }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { display: block; position: absolute; inset: 0; background: #fff; color: #000; }
    .no-print { display: none !important; }
}

/* ============ MISC ============ */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.stats-inline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.stat-inline .num { font-size: 20px; font-weight: 800; color: #fff; font-family: 'Exo 2', sans-serif; }
.stat-inline .lbl { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

.pagination-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }

.loading-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(2, 6, 20, 0.65);
    display: none;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}

.loading-overlay.show { display: flex; }

.spinner {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(0, 212, 255, 0.15);
    border-top-color: var(--lime);
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 1400px) {
    .pos-layout { grid-template-columns: 1fr; }
    .pos-cart { position: static; max-height: none; }
}

/* Sidebar adaptable: botÃ³n hamburguesa siempre visible; en mÃ³vil se oculta por defecto */
.mobile-toggle { display: flex; }
.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 49;
    background: rgba(2, 6, 20, 0.55);
    backdrop-filter: blur(2px);
}

@media (max-width: 1200px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; }
}

/* Colapso del menÃº en cualquier dispositivo (laptop/PC) */
body.menu-hidden .sidebar { transform: translateX(-100%); }
body.menu-hidden .main { margin-left: 0; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .grid-2 { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .content { padding: 18px 14px; }
    .topbar { padding: 12px 14px; }
    .clock { display: none; }
}

.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filter-row .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

/* AsignaciÃ³n de permisos (solo Administrador) */
.perms-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px;
    max-height: 240px; overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}
.perms-grid .switch { font-size: 12px; padding: 5px 0; }

/* ============ MODO CLARO ============ */
[data-theme="light"] {
    --purple: #2743E0;
    --purple-dark: #1B2F9E;
    --purple-light: #3D5AFE;
    --lime: #0093C4;
    --lime-dark: #00729C;
    --teal: #0369A1;
    --teal-dark: #075985;
    --maroon: #C22A2A;
    --maroon-dark: #8A1D1D;
    --bg: #EEF3FB;
    --bg-2: #E3ECFA;
    --bg-3: #D8E5F8;
    --card: rgba(255, 255, 255, 0.75);
    --card-solid: #FFFFFF;
    --border: rgba(30, 90, 200, 0.18);
    --text: #0B1B3F;
    --text-dim: #5A6B92;
    --gradient: linear-gradient(135deg, #2743E0 0%, #0EA5E9 100%);
    --gradient-lime: linear-gradient(135deg, #00729C 0%, #0093C4 100%);
    --shadow: 0 8px 32px rgba(20, 40, 100, 0.14);
    --glow-purple: 0 0 24px rgba(39, 67, 224, 0.25);
    --glow-lime: 0 0 18px rgba(0, 147, 196, 0.22);
    --glow-teal: 0 0 18px rgba(3, 105, 161, 0.25);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 60% 40% at 80% -10%, rgba(39, 67, 224, 0.14), transparent),
        radial-gradient(ellipse 50% 40% at 10% 110%, rgba(14, 165, 233, 0.12), transparent),
        radial-gradient(ellipse 30% 25% at 50% 50%, rgba(0, 212, 255, 0.06), transparent);
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(39, 67, 224, 0.10), #E9F0FB);
}

[data-theme="light"] .topbar { background: rgba(238, 243, 251, 0.88); }

[data-theme="light"] .modal-overlay,
[data-theme="light"] .loading-overlay { background: rgba(10, 20, 50, 0.4); }

[data-theme="light"] .nav-item:hover { background: rgba(39, 67, 224, 0.08); }
[data-theme="light"] .nav-item.active {
    background: linear-gradient(90deg, rgba(39, 67, 224, 0.18), rgba(14, 165, 233, 0.08));
    border-color: rgba(0, 147, 196, 0.35);
}

[data-theme="light"] .icon-btn:hover { background: rgba(39, 67, 224, 0.12); }

[data-theme="light"] thead th { background: rgba(39, 67, 224, 0.08); }
[data-theme="light"] tbody tr:hover { background: rgba(39, 67, 224, 0.07); }

[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: #fff;
    border-color: rgba(11, 27, 63, 0.14);
}

[data-theme="light"] .switch input:checked + .track::after { background: #fff; }

[data-theme="light"] .stock-bar { background: rgba(11, 27, 63, 0.1); }

[data-theme="light"] .clock {
    background: rgba(3, 105, 161, 0.08);
    border-color: rgba(3, 105, 161, 0.3);
}

[data-theme="light"] .pos-cart-header .count { background: rgba(39, 67, 224, 0.14); color: #2743E0; }
[data-theme="light"] .notif-item:hover { background: rgba(165, 42, 42, 0.05); }
[data-theme="light"] .notif-header { background: linear-gradient(90deg, rgba(165, 42, 42, 0.08), transparent); }

[data-theme="light"] .auth-card { background: rgba(255, 255, 255, 0.94); }

[data-theme="light"] .auth-hint { border-color: rgba(0, 147, 196, 0.35); background: rgba(0, 147, 196, 0.06); }

[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(11, 27, 63, 0.05); }

[data-theme="light"] .btn-ghost { color: #0B1B3F; }
[data-theme="light"] .btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* Textos que estaban fijos en blanco pasan a azul marino */
[data-theme="light"] .sidebar-title,
[data-theme="light"] .user-name,
[data-theme="light"] .topbar-page-title,
[data-theme="light"] .card-title,
[data-theme="light"] .kpi-value,
[data-theme="light"] .auth-title,
[data-theme="light"] .modal-header h3,
[data-theme="light"] .pos-cart-header h3,
[data-theme="light"] .pos-item-info .name,
[data-theme="light"] .pos-tile h4,
[data-theme="light"] .notif-item strong,
[data-theme="light"] .notif-header h4,
[data-theme="light"] .amount,
[data-theme="light"] .stat-inline .num,
[data-theme="light"] .pos-grand .l,
[data-theme="light"] .qty-val,
[data-theme="light"] .pos-total-row .l { color: #0B1B3F; }

[data-theme="light"] table td strong { color: #0B1B3F !important; }

/* Texto general en negrita + azul marino fuerte */
[data-theme="light"] body { color: #0B1B3F; }
[data-theme="light"] .text-dim { color: #30406F; font-weight: 600; }
[data-theme="light"] tbody td { color: #0B1B3F; font-weight: 600; }
[data-theme="light"] thead th { color: #2743E0; font-weight: 700; }
[data-theme="light"] .form-group label { color: #0B1B3F; font-weight: 700; }
[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea { color: #0B1B3F; font-weight: 600; }
[data-theme="light"] input::placeholder { color: #64748B; font-weight: 500; }
[data-theme="light"] .nav-item { color: #33457A; font-weight: 600; }
[data-theme="light"] .nav-section { color: #30406F; font-weight: 700; }
[data-theme="light"] .sidebar-subtitle { color: #30406F; font-weight: 700; }
[data-theme="light"] .kpi-label { color: #30406F; font-weight: 700; }
[data-theme="light"] .kpi-trend { color: #30406F; font-weight: 600; }
[data-theme="light"] .bar-value { color: #30406F; font-weight: 700; }
[data-theme="light"] .bar-label { color: #30406F; font-weight: 700; }
[data-theme="light"] .legend-item .pct { color: #30406F; font-weight: 600; }
[data-theme="light"] .empty-state { color: #30406F; font-weight: 600; }
[data-theme="light"] .chip { font-weight: 700; }
[data-theme="light"] .auth-subtitle,
[data-theme="light"] .auth-alt,
[data-theme="light"] .auth-hint { color: #30406F; font-weight: 600; }
[data-theme="light"] .auth-hint strong { color: #00729C; font-weight: 700; }
[data-theme="light"] .notif-item p { color: #30406F; font-weight: 600; }
[data-theme="light"] .notif-empty { color: #30406F; font-weight: 600; }
[data-theme="light"] .pos-item-info .sub { color: #33457A; font-weight: 600; }
[data-theme="light"] .pos-tile .stock-info { color: #33457A; font-weight: 600; }
[data-theme="light"] .pos-total-row { color: #33457A; font-weight: 600; }
[data-theme="light"] .pos-cart-empty { color: #30406F; font-weight: 600; }
[data-theme="light"] .toast { color: #0B1B3F; }
[data-theme="light"] .stat-inline .lbl { color: #30406F; font-weight: 700; }
[data-theme="light"] .btn-ghost { color: #0B1B3F; font-weight: 600; }
[data-theme="light"] .search-box .icon { color: #33457A; }
[data-theme="light"] .clock { color: #0369A1; font-weight: 700; }
[data-theme="light"] .user-role { color: #00729C; font-weight: 700; }
[data-theme="light"] .sidebar-title,
[data-theme="light"] .user-name,
[data-theme="light"] .topbar-page-title,
[data-theme="light"] .card-title,
[data-theme="light"] .kpi-value,
[data-theme="light"] .auth-title,
[data-theme="light"] .modal-header h3,
[data-theme="light"] .pos-cart-header h3,
[data-theme="light"] .pos-item-info .name,
[data-theme="light"] .pos-tile h4,
[data-theme="light"] .notif-item strong,
[data-theme="light"] .notif-header h4,
[data-theme="light"] .amount,
[data-theme="light"] .stat-inline .num,
[data-theme="light"] .pos-grand .l,
[data-theme="light"] .qty-val,
[data-theme="light"] .pos-total-row .l { color: #0B1B3F; font-weight: 700; }

[data-theme="light"] .chip.active { background: rgba(0, 147, 196, 0.12); color: #00729C; border-color: rgba(0, 147, 196, 0.35); }
[data-theme="light"] .chip.ok { background: rgba(3, 105, 161, 0.1); color: #0369A1; border-color: rgba(3, 105, 161, 0.3); }
[data-theme="light"] .chip.info { background: rgba(39, 67, 224, 0.1); color: #2743E0; border-color: rgba(39, 67, 224, 0.3); }
[data-theme="light"] .chip.doc-factura { background: rgba(3, 105, 161, 0.1); color: #0369A1; border-color: rgba(3, 105, 161, 0.3); }
[data-theme="light"] .chip.doc-nota { background: rgba(15, 23, 42, 0.06); color: #475569; border-color: rgba(15, 23, 42, 0.15); }
[data-theme="light"] .chip.doc-proforma { background: rgba(109, 40, 217, 0.09); color: #6d28d9; border-color: rgba(109, 40, 217, 0.3); }

[data-theme="light"] .user-role { color: #00729C; }

[data-theme="light"] .toast { border-color: rgba(11, 27, 63, 0.12); }

[data-theme="light"] .pos-tile { background: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .pos-cart { background: #fff; }
[data-theme="light"] .pos-catalog { background: #fff; }
[data-theme="light"] .pos-catalog-head h3 { color: #0B1B3F; }
[data-theme="light"] .pos-products-table thead th { background: #fff; }
[data-theme="light"] .pos-products-table tbody tr.row-low { background: rgba(165, 42, 42, 0.06); }
[data-theme="light"] .pos-doc-viewer { background: #fff; }
[data-theme="light"] .pos-doc-header h4 { color: #0B1B3F; }
[data-theme="light"] .pos-totalbar { background: #fff; }
[data-theme="light"] .pos-totalbar-value { color: #e00000; }
[data-theme="light"] .btn-nueva-venta {
    background: linear-gradient(135deg, rgba(42, 54, 224, 0.12), rgba(14, 165, 233, 0.1));
    color: #0B1B3F;
    border-color: rgba(14, 165, 233, 0.45);
}

[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(11,27,63,0.05), rgba(11,27,63,0.12), rgba(11,27,63,0.05)); background-size: 200% 100%; }

/* ============ SELECTS: modo oscuro (opciones azul oscuro legibles) ============ */
select.form-select option {
    background: #0A1230;
    color: #EAF2FF;
}

select.form-select option:hover,
select.form-select option:checked {
    background: #2A36E0;
    color: #ffffff;
}

[data-theme="light"] select.form-select option {
    background: #ffffff;
    color: #0B1B3F;
}

[data-theme="light"] select.form-select option:hover,
[data-theme="light"] select.form-select option:checked {
    background: #E6EBFF;
    color: #0B1B3F;
}

[data-theme="light"] .kpi-link .kpi {
    box-shadow: 0 4px 18px rgba(11, 27, 63, 0.08);
}
[data-theme="light"] .kpi-link:hover .kpi {
    box-shadow: 0 8px 28px rgba(39, 67, 224, 0.22);
}
