/* =====================================================
   KIOSCOWEB - Sistema POS Multi-Comercio
   Diseño Web Moderno y Luminoso (Celeste y Blanco) con Glassmorphism
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colores Principales (Azul y Celeste) */
    --primary: #2563eb;
    /* Azul brillante */
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.15);

    --secondary: #0ea5e9;
    /* Celeste vibrante */
    --secondary-hover: #0284c7;
    --secondary-light: rgba(14, 165, 233, 0.15);

    /* Textos (Oscuros para contraste en fondo claro) */
    --text-main: #1e293b;
    /* Slate 800 */
    --text-secondary: #334155;
    /* Slate 700 */
    --text-muted: #64748b;
    /* Slate 500 */

    /* Fondos (Blancos y Tonos Claros) */
    --bg-body: #eff6ff;
    /* Celeste muy claro / Blue 50 */
    --bg-dark: #dbeafe;
    /* Blue 100 para login */

    /* Efecto Glassmorphism (Fondo Difuso) */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-solid: #ffffff;
    --sidebar-bg: rgba(255, 255, 255, 0.85);
    --input-bg: rgba(255, 255, 255, 0.9);
    --modal-bg: rgba(255, 255, 255, 0.95);
    --modal-overlay: rgba(15, 23, 42, 0.5);
    /* Fondo oscuro semitransparente para resaltar modal */
    --glass: blur(16px);

    /* Bordes y Filas */
    --table-hover: rgba(14, 165, 233, 0.08);
    /* Fila resaltada en celeste */
    --border: rgba(37, 99, 235, 0.15);
    --border-light: rgba(37, 99, 235, 0.08);

    /* Estados */
    --accent: #f59e0b;
    /* Ambar para warning */
    --accent-hover: #d97706;
    --danger: #ef4444;
    /* Rojo */
    --danger-hover: #dc2626;
    --warning: #f97316;
    /* Naranja */
    --success: #10b981;
    /* Verde */

    /* Sombras Elevadas (No planas) */
    --shadow-sm: 0 2px 8px rgba(37, 99, 235, 0.08);
    --shadow-md: 0 8px 20px rgba(37, 99, 235, 0.12);
    --shadow-lg: 0 15px 35px rgba(37, 99, 235, 0.18);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);

    /* Estructura y Redondeado */
    --sidebar-width: 270px;
    --topbar-height: 65px;
    --radius: 20px;
    /* Bordes bien redondeados */
    --radius-sm: 14px;
    --radius-xs: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.5) 0%, transparent 50%);
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    padding: 50px 45px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo h1 {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-logo p {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 5px;
    font-weight: 500;
}

/* ===== LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(37, 99, 235, 0.05);
    /* Sombra lateral suave */
}

.sidebar-brand {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-brand h2 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.sidebar-brand small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    padding: 16px 16px 8px;
    font-weight: 700;
    opacity: 0.8;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--secondary-light);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}

.nav-item .icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.sidebar-footer p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TOP BAR ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.05);
    /* Sombra difusa hacia abajo */
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 8px;
    border-radius: 50px;
    /* Tipo píldora */
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.topbar-user:hover {
    box-shadow: var(--shadow-md);
    background: #fff;
}

.topbar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.topbar-user .info {
    font-size: 13px;
    line-height: 1.3;
}

.topbar-user .info span {
    display: block;
    font-weight: 700;
    color: var(--text-main);
}

.topbar-user .info small {
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
}

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    padding: 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary);
}

.page-header .subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== CARDS (No Planas, Redondeadas) ===== */
.card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--border-light);
}

.card-header h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 800;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--secondary);
}

.stat-card .stat-info h4 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
}

.stat-card .stat-change {
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}

.stat-card .stat-change.positive {
    color: var(--success);
}

.stat-card .stat-change.negative {
    color: var(--danger);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
}

.stat-icon.green {
    background: linear-gradient(135deg, #34d399, #059669);
    color: white;
}

.stat-icon.yellow {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
}

.stat-icon.red {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
}

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== TABLES (Limpias y modernas) ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 14px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
    font-weight: 800;
    white-space: nowrap;
    background: rgba(37, 99, 235, 0.05);
}

tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--table-hover);
    transform: scale(1.002);
}

.text-muted {
    color: var(--text-muted);
}

.font-bold {
    font-weight: 700;
    color: var(--text-main);
}

.text-danger {
    color: var(--danger);
    font-weight: 700;
}

.text-success {
    color: var(--success);
    font-weight: 700;
}

.text-warning {
    color: var(--warning);
    font-weight: 700;
}

.text-center {
    text-align: center;
}

/* ===== FORMS (Redondos y con contraste) ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--input-bg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
    background: #ffffff;
}

.form-control::placeholder {
    color: #94a3b8;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%232563eb' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.form-inline {
    display: flex;
    gap: 14px;
    align-items: end;
}

/* ===== BUTTONS (Redondeados, gradientes y sombras) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    /* Estilo píldora completo */
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-success {
    background: linear-gradient(135deg, #34d399, #059669);
    color: white;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    /* Iconos perfectamente redondos */
}

/* ===== BADGES (Estilo burbuja) ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.badge-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #34d399;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #f87171;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fbbf24;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #60a5fa;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--secondary);
}

/* ===== POS LAYOUT (Panel derecho e izquierdo) ===== */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - var(--topbar-height) - 64px);
}

.pos-products {
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar estilizado para la zona celeste */
.pos-products::-webkit-scrollbar {
    width: 8px;
}

.pos-products::-webkit-scrollbar-track {
    background: transparent;
}

.pos-products::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 10px;
}

.pos-search {
    position: sticky;
    top: 0;
    z-index: 5;
    margin-bottom: 20px;
}

.pos-search input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: var(--card-bg);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    backdrop-filter: var(--glass);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.pos-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.15), var(--shadow-glow);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: var(--secondary);
    background: #ffffff;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.product-card .emoji {
    font-size: 38px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.product-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-secondary);
}

.product-card .price {
    color: var(--primary);
    font-weight: 800;
    font-size: 18px;
    background: var(--primary-light);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.product-card .stock-low {
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    display: block;
}

/* Panel de carrito POS */
.pos-cart {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cart-header {
    padding: 24px 20px;
    border-bottom: 2px dashed var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.cart-item:hover {
    background: #ffffff;
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
}

.cart-item-info h5 {
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text-main);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-body);
    padding: 4px;
    border-radius: 50px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cart-item-qty button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-qty button:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.cart-item-qty span {
    font-size: 14px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.cart-footer {
    padding: 24px;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-top: 2px dashed var(--border-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-total span {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 700;
}

.cart-total strong {
    font-size: 38px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

/* ===== MÓDULO CARGA (MODALES CON FONDO DIFUSO EXTREMO) ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    /* Oscuro atrás */
    backdrop-filter: blur(25px);
    /* Desenfoque fuerte del fondo (glassmorphism) */
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--modal-bg);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    padding: 35px;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--border-light);
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.modal-close {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-light);
}

/* ===== TABS (Pestañas redondeadas) ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    background: white;
    color: var(--primary);
    border-color: var(--primary-light);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

/* ===== ALERTS (Flotantes y redondeadas) ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 6px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 6px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 6px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 6px solid #3b82f6;
}

/* Scrollbar general */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(37, 99, 235, 0.6);
}

/* Search Results UI */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--modal-bg);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    z-index: 50;
    padding: 8px;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover,
.search-item.active {
    background: var(--primary-light);
    transform: translateX(4px);
}