/* =====================================================================
   FAVTO - BOUTIQUE & ROPA AMERICANA SYSTEM STYLES
   Design System: Modern Dark Slate & Vibrant Accents
===================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #172237;
    --bg-input: #1f293d;
    --border-color: #27354f;
    --border-focus: #6366f1;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.12);

    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --accent: #ec4899;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= NAV BAR & TABS ================= */
.navbar {
    background: rgba(11, 15, 25, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.nav-container {
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.2;
}

.brand-tagline {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

/* Barra Segmentada de Pestañas de Navegación */
.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: rgba(23, 32, 54, 0.75);
    padding: 0.3rem 0.35rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.84rem;
    height: 36px;
    padding: 0 0.85rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.nav-link i {
    font-size: 0.88rem;
    opacity: 0.75;
    transition: all 0.18s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-link:hover i {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.45);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.nav-link.active i {
    color: #a5b4fc;
    opacity: 1;
}

/* Pestaña Especial POS (Punto de Venta) en la barra */
.nav-link.btn-pos {
    color: #34d399;
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.22);
    font-weight: 600;
}

.nav-link.btn-pos i {
    color: #34d399;
    opacity: 0.9;
}

.nav-link.btn-pos:hover {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.nav-link.btn-pos.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.45));
    border-color: rgba(52, 211, 153, 0.55);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.nav-link.btn-pos.active i {
    color: #a7f3d0;
    opacity: 1;
}

.btn-nuevo {
    background: linear-gradient(135deg, var(--primary), #818cf8) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-nuevo:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

/* Botón Ver Tienda */
.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-catalogo {
    height: 36px;
    padding: 0 0.95rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-catalogo:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
    color: #6ee7b7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}

.mini-icon {
    font-size: 0.72rem;
}

/* ================= MAIN CONTAINER ================= */
.main-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    flex: 1;
}

/* ================= PAGE HEADER & TYPOGRAPHY ================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.header-titles {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.page-title i {
    font-size: 1.6rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ================= MODERN BUTTON SYSTEM ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    user-select: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn i {
    font-size: 0.95rem;
}

/* Button Sizes */
.btn-sm {
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    gap: 0.4rem;
}
.btn-sm i {
    font-size: 0.82rem;
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff !important;
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: #1e293b;
    color: #e2e8f0 !important;
    border: 1px solid #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.btn-secondary:hover {
    background: #334155;
    color: #ffffff !important;
    border-color: #475569;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff !important;
}

.btn-outline-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5 !important;
}
.btn-outline-danger:hover {
    background: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}

/* ================= FLASH ALERTS ================= */
.flash-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flash-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: var(--success-light);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.flash-danger {
    background: var(--danger-light);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
}

.flash-close:hover { opacity: 1; }

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

/* ================= STATS CARDS ================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.green { background: var(--success-light); color: #34d399; }
.stat-icon.indigo { background: var(--primary-light); color: #818cf8; }
.stat-icon.amber { background: var(--warning-light); color: #fbbf24; }
.stat-icon.rose { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: #ffffff; margin-top: 0.2rem; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ================= FILTER & ACTIONS BAR ================= */
.toolbar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.75rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 2;
    min-width: 250px;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input-wrapper input:focus {
    border-color: var(--border-focus);
}

.select-filter {
    padding: 0.65rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    min-width: 140px;
}

.btn-filter, .btn-reset {
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-filter {
    background: var(--primary);
    color: #ffffff;
}
.btn-filter:hover { background: var(--primary-hover); }

.btn-reset {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-reset:hover { color: #ffffff; }

.btn-pdf {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.28));
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.15);
}
.btn-pdf:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.catalog-pdf-chip {
    text-decoration: none;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(220, 38, 38, 0.22)) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    color: #fca5a5 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
.catalog-pdf-chip:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ================= PRODUCT GRID ================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.5);
}

.product-image-container {
    height: 240px;
    background: #080c14;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none !important; /* Bloquea 'Búsqueda visual' / 'Recortar' de Microsoft Edge y navegadores */
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, transform-origin;
}

.product-image-container:hover .product-image {
    transform: scale(1.32); /* Zoom generoso y fluido al pasar el cursor */
}

.zoom-hint-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.product-image-container:hover .zoom-hint-pill {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox Modal para Catálogo Público */
.modal-visor-catalogo {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInVisor 0.2s ease-out;
}

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

.visor-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    max-width: 860px;
    width: 100%;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.visor-header {
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
    gap: 0.75rem;
}

.visor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.visor-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.visor-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visor-subtitle {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 2px 0 0 0;
}

.visor-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-visor-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-visor-control:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-visor-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.btn-visor-close:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.6);
}

.visor-img-box {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    flex: 1;
    min-height: 380px;
    max-height: 68vh;
    overflow: auto;
    transition: background 0.3s ease;
}

.visor-img-element {
    max-width: 100%;
    max-height: 64vh;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none !important;
}

.visor-footer {
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.visor-resolution-note {
    color: #64748b;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.visor-resolution-note i {
    color: #10b981;
}

.visor-footer-buttons {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn-visor-whatsapp {
    background: #25d366;
    color: #ffffff;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-visor-whatsapp:hover {
    background: #1ebd5a;
    transform: translateY(-1px);
}

.btn-visor-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-visor-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.no-image-placeholder i {
    font-size: 3rem;
    opacity: 0.4;
}

/* Badges floating on image */
.badge-tag-color {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Colores de etiqueta Ropa Americana */
.tag-roja { background-color: #ef4444; box-shadow: 0 0 6px #ef4444; }
.tag-azul { background-color: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.tag-verde { background-color: #10b981; box-shadow: 0 0 6px #10b981; }
.tag-amarilla { background-color: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.tag-naranja { background-color: #f97316; box-shadow: 0 0 6px #f97316; }
.tag-blanca { background-color: #f8fafc; color: #0f172a !important; box-shadow: 0 0 6px #f8fafc; border: 1px solid #94a3b8; }

.badge-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.status-disponible { background: rgba(16, 185, 129, 0.85); color: #ffffff; }
.status-apartado { background: rgba(245, 158, 11, 0.85); color: #ffffff; }
.status-vendido { background: rgba(100, 116, 139, 0.85); color: #ffffff; }

.badge-oferta {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
}

.product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sku-badge {
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
}

.product-brand {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.product-specs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.spec-pill {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.product-fardo-row {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.fardo-badge-pill {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.fardo-badge-pill:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
}

.fardo-badge-pill i {
    color: #38bdf8;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.fardo-badge-pill.sin-fardo {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px dashed rgba(245, 158, 11, 0.35);
}

.fardo-badge-pill.sin-fardo i {
    color: #fbbf24;
}

.price-row {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.price-current {
    font-size: 1.35rem;
    font-weight: 800;
    color: #34d399;
}

.price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.4rem;
}

.margin-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: #818cf8;
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

/* Social Media Toggles Row */
.social-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #0d1320;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.social-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.social-status-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.social-icons-group {
    display: flex;
    gap: 0.5rem;
}

.btn-open-social-kit {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.15), rgba(247, 119, 55, 0.15));
    border: 1px solid rgba(225, 48, 108, 0.45);
    color: #ff7aa2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-open-social-kit:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(225, 48, 108, 0.4);
    transform: translateY(-1px);
}

.btn-open-social-kit i {
    font-size: 0.9rem;
}

.btn-zip-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.18));
    border: 1px solid rgba(168, 85, 247, 0.45);
    color: #c084fc;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-zip-quick:hover {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.btn-social-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-social-toggle.active.facebook {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
    box-shadow: 0 0 8px rgba(24, 119, 242, 0.5);
}

.btn-social-toggle.active.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 8px rgba(214, 36, 159, 0.5);
}

.btn-social-toggle.active.tiktok {
    background: #000000;
    color: #25f4ee;
    border-color: #fe2c55;
    box-shadow: 0 0 8px rgba(254, 44, 85, 0.5);
}

/* Card Actions */
.product-actions {
    padding: 0.85rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-card {
    padding: 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-input);
    transition: all 0.2s ease;
}

.btn-card:hover {
    color: #ffffff;
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-card.highlight {
    background: var(--primary-light);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.btn-card.highlight:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ================= FORMS & PRODUCT REGISTRATION ================= */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.form-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Image Upload Drag & Drop Area */
.image-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(31, 41, 61, 0.4);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-upload-box:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.upload-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.preview-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    background: #000000;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Color Tags Radio Selector */
.tag-color-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.tag-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tag-radio-label:hover {
    border-color: var(--text-secondary);
}

.tag-radio-label input[type="radio"] {
    display: none;
}

.tag-radio-label.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: #ffffff;
}

/* Margin Calc Box */
.calc-box {
    background: #0d1320;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 0.5rem;
}

.calc-item { text-align: center; }
.calc-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.calc-val { font-size: 1.15rem; font-weight: 800; color: #ffffff; margin-top: 0.2rem; }
.calc-val.profit { color: #34d399; }

/* Buttons */
.btn-submit {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #ffffff;
    border: none;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ================= TOAST MESSAGES ================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
}

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

/* ================= PRINT LABELS / ETIQUETAS ================= */
.print-actions-bar {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.etiquetas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.etiqueta-item {
    background: #ffffff;
    color: #000000;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    page-break-inside: avoid;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.etiqueta-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-edit-etiqueta {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
    z-index: 5;
}

.btn-edit-etiqueta:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    transform: scale(1.15);
}


.etiqueta-store {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #475569;
}

.etiqueta-title {
    font-size: 11px;
    font-weight: 700;
    margin: 2px 0;
    max-height: 28px;
    overflow: hidden;
}

.etiqueta-specs {
    font-size: 10px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.etiqueta-barcode {
    max-width: 170px;
    height: 48px;
    object-fit: contain;
    margin: 4px 0;
}

.etiqueta-price {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
    margin-top: 2px;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .navbar, .print-actions-bar, .flash-container, .btn-edit-etiqueta, .toolbar-card, .app-footer, .impersonation-bar {
        display: none !important;
    }
    .main-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .etiquetas-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .etiqueta-item {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1450px) {
    .nav-container {
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }
    .nav-link {
        padding: 0 0.65rem;
        font-size: 0.8rem;
        gap: 0.35rem;
    }
    .brand-tagline {
        display: none;
    }
}

@media (max-width: 1200px) {
    .nav-links {
        overflow-x: auto;
        max-width: calc(100vw - 320px);
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        display: none !important;
    }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; align-items: stretch; }
    .search-input-wrapper { min-width: auto; }
}

/* =====================================================================
   MÓDULO 2: PUNTO DE VENTA (POS), FACTURACIÓN & APARTADOS
===================================================================== */

/* POS Container Layout */
.pos-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 1.5rem;
    align-items: start;
    min-height: calc(100vh - 120px);
    width: 100%;
}

/* Left Section: Products Catalog */
.pos-products-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pos-search-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pos-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.pos-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.barcode-scanner-icon {
    font-size: 1.35rem;
    color: var(--primary);
    margin-right: 0.75rem;
    animation: scanner-pulse 2s infinite ease-in-out;
}

@keyframes scanner-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; transform: scale(1.08); }
}

.pos-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
}

.btn-clear-search {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.35rem;
    transition: color 0.15s ease;
}
.btn-clear-search:hover { color: var(--text-primary); }

.btn-sync-catalog {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-sync-catalog:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.btn-sync-catalog.spinning i {
    animation: fa-spin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    color: #38bdf8;
}

.pos-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.pos-filter-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.pos-tag-colors-filter {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}

.tag-color-btn {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
    position: relative;
}

.tag-color-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tag-color-btn.tag-roja:hover { border-color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.tag-color-btn.tag-azul:hover { border-color: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.tag-color-btn.tag-verde:hover { border-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.tag-color-btn.tag-amarilla:hover { border-color: #eab308; box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); }
.tag-color-btn.tag-naranja:hover { border-color: #f97316; box-shadow: 0 0 10px rgba(249, 115, 22, 0.4); }
.tag-color-btn.tag-blanca:hover { border-color: #ffffff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }

.tag-dot-circle {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.dot-roja { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.dot-azul { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.dot-verde { background: #10b981; box-shadow: 0 0 6px #10b981; }
.dot-amarilla { background: #eab308; box-shadow: 0 0 6px #eab308; }
.dot-naranja { background: #f97316; box-shadow: 0 0 6px #f97316; }
.dot-blanca { background: #ffffff; box-shadow: 0 0 6px #ffffff; border: 1px solid #94a3b8; }

.tag-color-pct {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.25);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.4);
    letter-spacing: -0.2px;
}

.tag-color-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}
.tag-color-btn.tag-roja.active { background: #ef4444; border-color: #ef4444; box-shadow: 0 0 14px rgba(239, 68, 68, 0.5); }
.tag-color-btn.tag-azul.active { background: #3b82f6; border-color: #3b82f6; box-shadow: 0 0 14px rgba(59, 130, 246, 0.5); }
.tag-color-btn.tag-verde.active { background: #10b981; border-color: #10b981; box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); }
.tag-color-btn.tag-amarilla.active { background: #eab308; border-color: #eab308; color: #000; box-shadow: 0 0 14px rgba(234, 179, 8, 0.5); }
.tag-color-btn.tag-amarilla.active .tag-color-pct { background: rgba(0, 0, 0, 0.25); color: #000; border-color: rgba(0, 0, 0, 0.3); }
.tag-color-btn.tag-naranja.active { background: #f97316; border-color: #f97316; box-shadow: 0 0 14px rgba(249, 115, 22, 0.5); }
.tag-color-btn.tag-blanca.active { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; box-shadow: 0 0 14px rgba(255, 255, 255, 0.4); }
.tag-color-btn.tag-blanca.active .tag-color-pct { background: rgba(15, 23, 42, 0.15); color: #0f172a; border-color: rgba(15, 23, 42, 0.2); }

/* Tooltip instantáneo flotante al pasar el cursor sobre el color */
.tag-color-btn[data-hover-tooltip]::before {
    content: attr(data-hover-tooltip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #090d16;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    z-index: 99;
}
.tag-color-btn[data-hover-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #090d16 transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 99;
}
.tag-color-btn:hover[data-hover-tooltip]::before,
.tag-color-btn:hover[data-hover-tooltip]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.btn-open-promos-modal {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-open-promos-modal:hover {
    background: #f59e0b;
    color: #0f172a;
    border-color: #f59e0b;
    transform: scale(1.05);
}

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

/* Banner de Promoción Activa al Marcar o Pasar Cursor por Color */
.pos-color-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.85rem;
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    animation: fadeInSlide 0.2s ease-out;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
.pos-color-promo-banner.promo-active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fef08a;
}
.pos-color-promo-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-close-promo-banner {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.15s;
}
.btn-close-promo-banner:hover { color: #fff; }

/* Badges de Descuento en Carrito y Catálogo */
.badge-cart-disc-pct {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: inline-block;
    margin-left: 0.35rem;
}

.card-disc-pill {
    background: rgba(245, 158, 11, 0.95);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 3px;
    display: inline-block;
    letter-spacing: -0.2px;
}

.pos-price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-right: 0.35rem;
}
.pos-price-discounted {
    color: #34d399;
    font-weight: 800;
}

/* Modal de Promociones */
.promo-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.promo-modal-row.promo-roja { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.06); }
.promo-modal-row.promo-azul { border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.06); }
.promo-modal-row.promo-verde { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.06); }
.promo-modal-row.promo-amarilla { border-color: rgba(234, 179, 8, 0.3); background: rgba(234, 179, 8, 0.06); }
.promo-modal-row.promo-naranja { border-color: rgba(249, 115, 22, 0.3); background: rgba(249, 115, 22, 0.06); }
.promo-modal-row.promo-blanca { border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.03); }

.promo-modal-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #f1f5f9;
}
.promo-modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.input-pos-promo {
    width: 65px;
    padding: 0.35rem 0.5rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    text-align: center;
    font-size: 0.95rem;
    outline: none;
}
.input-pos-promo:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* Grid of Available Products */
.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-height: 680px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.pos-product-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pos-product-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.pos-product-img-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    background: #0d131f;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.pos-product-card:hover .pos-product-img { transform: scale(1.05); }

.pos-product-no-img {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.pos-product-talla {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.pos-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pos-product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pos-product-sku {
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--primary);
    font-weight: 700;
}

.pos-product-cantidad {
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.07);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.pos-product-cantidad i {
    font-size: 0.65rem;
    color: #94a3b8;
}

.pos-product-cantidad.is-grouped {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.pos-product-cantidad.is-grouped i {
    color: #34d399;
}

.pos-product-cantidad.is-empty {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.pos-product-cantidad.is-empty i {
    color: #f87171;
}

.pos-product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-product-marca {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.pos-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.pos-product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
}

.pos-product-old-price {
    font-size: 0.78rem;
    text-decoration: line-through;
    color: var(--text-muted);
}

.btn-pos-add {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pos-product-card:hover .btn-pos-add {
    background: var(--primary);
    color: #ffffff;
}

.pos-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}
.pos-no-products i { font-size: 3rem; margin-bottom: 0.75rem; }

/* Right Section: POS Cart & Checkout */
.pos-cart-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    position: sticky;
    top: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) rgba(11, 15, 25, 0.5);
}

.pos-cart-section::-webkit-scrollbar {
    width: 6px;
}
.pos-cart-section::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.5);
}
.pos-cart-section::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}
.pos-cart-section::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

.pos-customer-header {
    padding: 0.85rem 1rem;
    background: rgba(11, 15, 25, 0.6);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.customer-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.customer-icon {
    font-size: 1.15rem;
    color: var(--primary);
    flex-shrink: 0;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-customer-select {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pos-customer-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.btn-add-customer-quick {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: #a5b4fc;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    padding: 0;
}

.btn-add-customer-quick:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

.btn-add-customer-quick:active {
    transform: translateY(0);
}

.pos-custom-name-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    animation: fadeInSlide 0.2s ease;
    width: 100%;
    min-width: 0;
}

.pos-customer-custom-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.pos-customer-custom-name:focus {
    border-color: var(--primary);
    background: #172237;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.pos-customer-custom-name::placeholder {
    color: #64748b;
    font-size: 0.82rem;
}

.btn-list-contado-customers {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #818cf8;
    padding: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-list-contado-customers:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-reset-customer-name {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    padding: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-reset-customer-name:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Dropdown Inteligente de Clientes de Contado */
.pos-contado-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.65), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: fadeInSlide 0.18s ease-out;
}

.pos-contado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: rgba(30, 41, 59, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.pos-contado-header span {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pos-contado-header small {
    color: #6366f1;
    font-weight: 500;
}

.pos-contado-list {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

.pos-contado-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.15s ease;
    user-select: none;
}

.pos-contado-item:last-child {
    border-bottom: none;
}

.pos-contado-item:hover,
.pos-contado-item.active {
    background: rgba(99, 102, 241, 0.18);
    border-left: 3px solid #6366f1;
    padding-left: calc(0.75rem - 3px);
}

.pos-contado-item-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.pos-contado-item-icon {
    font-size: 0.8rem;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pos-contado-item-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-contado-item-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}

.pos-contado-item-badge.badge-registrado {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.pos-contado-empty {
    padding: 1rem 0.75rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
}

.pos-contado-empty i {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    color: #64748b;
}

/* Cart Items Table List */
.pos-cart-items-wrapper {
    flex: 1 1 auto;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-cart-table-head {
    display: grid;
    grid-template-columns: 1fr 145px 32px;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.pos-cart-items-list {
    flex: 1 1 auto;
    min-height: 180px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pos-cart-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
}
.pos-cart-empty i { font-size: 2.8rem; margin-bottom: 0.75rem; opacity: 0.5; }

.pos-cart-item-row {
    display: grid;
    grid-template-columns: 1fr 145px 32px;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.pos-cart-item-row:hover { 
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.cart-item-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.cart-item-no-thumb {
    width: 36px;
    height: 36px;
    background: #172237;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cart-item-details {
    overflow: hidden;
}

.cart-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.meta-tag {
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}
.meta-tag.tag-roja { color: #ef4444; }
.meta-tag.tag-azul { color: #3b82f6; }
.meta-tag.tag-verde { color: #10b981; }
.meta-tag.tag-amarilla { color: #eab308; }
.meta-tag.tag-naranja { color: #f97316; }

.cart-item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.cart-price-input-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.7rem;
    color: var(--text-muted);
    gap: 3px;
}

.cart-price-input-row span {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
}

.input-item-price {
    width: 72px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 2px 4px;
    text-align: right;
    outline: none;
    transition: all 0.2s ease;
}

.input-item-price:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    background: #0f172a;
}

.cart-discount-input-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.68rem;
    color: var(--text-muted);
    gap: 3px;
}

.input-item-disc {
    width: 60px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 3px;
    text-align: right;
    outline: none;
}

.input-item-disc:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cart-costo-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.cart-item-final-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.btn-remove-item {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-remove-item:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Cart Summary & Actions */
.pos-cart-summary {
    padding: 1rem;
    background: rgba(11, 15, 25, 0.7);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.discount-line .text-discount {
    color: #10b981;
    font-weight: 600;
}

.summary-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.total-label-wrap {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.total-badge {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.total-amount {
    font-size: 1.7rem;
    font-weight: 900;
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.pos-cart-actions {
    padding: 1rem;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-pos-checkout {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.btn-pos-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
}
.btn-pos-checkout:disabled {
    background: #334155;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
}

.pos-secondary-actions {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.5rem;
}

.btn-pos-layaway {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-pos-layaway:hover:not(:disabled) {
    background: var(--primary);
    color: #ffffff;
}
.btn-pos-layaway:disabled {
    border-color: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.btn-pos-clear {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-pos-clear:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ================= MODALES GENERALES ================= */
.pos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.pos-modal-overlay.active,
.pos-modal-overlay[style*="display: flex"] {
    opacity: 1;
    pointer-events: auto;
}

.pos-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 550px;
    max-width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.pos-modal-overlay.active .pos-modal-card,
.pos-modal-overlay[style*="display: flex"] .pos-modal-card {
    transform: scale(1);
}

.pos-modal-card.modal-sm { width: 440px; }
.pos-modal-card.modal-md { width: 680px; max-width: 95vw; }
.pos-modal-card.modal-lg { width: 880px; max-width: 95vw; }

.pos-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pos-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pos-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.pos-modal-close:hover { color: #fff; }

.pos-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pos-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(11, 15, 25, 0.5);
}

.checkout-total-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 95, 70, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.checkout-total-banner.layaway-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(67, 56, 202, 0.25));
    border-color: rgba(99, 102, 241, 0.4);
}
.checkout-total-banner .banner-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.checkout-total-banner .banner-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: #10b981;
}
.layaway-banner .banner-amount { color: #818cf8; }

.payment-methods-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.method-tab {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}
.method-tab i { font-size: 1.1rem; }
.method-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.payment-panel { display: none; }
.payment-panel.active { display: block; }

.pos-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
}
.pos-input:focus { border-color: var(--primary); }

.pos-input-big {
    width: 100%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    color: #10b981;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    font-weight: 800;
    text-align: right;
    outline: none;
}
.pos-input-big:focus { border-color: #10b981; }

.cash-quick-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-cash-quick {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.55rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-cash-quick:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.change-calculation-box {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed var(--border-color);
}
.change-amount {
    font-size: 1.5rem;
    font-weight: 900;
    color: #10b981;
}

.sinpe-info-alert {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    color: #93c5fd;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}
.sinpe-info-alert i { font-size: 1.3rem; margin-top: 2px; }

.mixto-inputs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.mixto-balance-status {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.btn-confirm-checkout {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-confirm-checkout:hover { filter: brightness(1.1); }

.btn-confirm-layaway {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}
.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.layaway-client-info {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.layaway-pending-display {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 800;
    color: #f59e0b;
    text-align: right;
}

.quick-abono-percent {
    display: flex;
    gap: 0.4rem;
}

.btn-percent-quick {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
}
.btn-percent-quick:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ================= KPI GRIDS & REPORTS ================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.icon-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.highlight-border-emerald { border-color: rgba(16, 185, 129, 0.4) !important; }
.highlight-border-blue { border-color: rgba(59, 130, 246, 0.4) !important; }
.highlight-border-purple { border-color: rgba(168, 85, 247, 0.4) !important; }
.highlight-border-amber { border-color: rgba(245, 158, 11, 0.4) !important; }
.highlight-border-red { border-color: rgba(239, 68, 68, 0.4) !important; }

.kpi-data {
    display: flex;
    flex-direction: column;
}
.kpi-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.kpi-value { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); margin-top: 2px; }

/* ================= FILTERS TOOLBAR SYSTEM ================= */
.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.filters-form {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1 1 180px;
    min-width: 170px;
}

.filter-item.search-item {
    flex: 2 1 290px;
    min-width: 260px;
}

.filter-item.reset-item {
    flex: 0 0 auto;
    min-width: auto;
}

.filter-item label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.filter-item label i {
    color: var(--primary);
    font-size: 0.85rem;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.68rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    outline: none;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22), inset 0 1px 3px rgba(0, 0, 0, 0.25);
    background: #182235;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    padding-right: 2.4rem;
    cursor: pointer;
}

select.form-control option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* ================= MODERN DATA TABLES ================= */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 0.9rem;
}

.data-table thead th {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid rgba(39, 53, 79, 0.5);
    color: var(--text-primary);
    vertical-align: middle;
    transition: background 0.15s ease;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Components */
.factura-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: inline-block;
}

.date-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    white-space: nowrap;
}

.date-day {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-time {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.client-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-cell strong {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.client-cell small {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.badge-items-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.badge-payment {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-payment.badge-efectivo {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-payment.badge-sinpe {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-payment.badge-tarjeta {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-payment.badge-mixto {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-payment.badge-apartado,
.badge-payment.badge-apartado_liquidado {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.35);
}

.payment-ref {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.amount-cell {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.status-badge.status-disponible,
.status-badge.status-completada {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-badge.status-merma,
.status-badge.status-anulada {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-badge.status-apartado {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.row-anulada {
    opacity: 0.6;
    background: rgba(239, 68, 68, 0.04);
}
.row-anulada .factura-badge,
.row-anulada .amount-cell {
    text-decoration: line-through;
}

/* ================= APARTADOS DASHBOARD ================= */
.apartados-nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tabs-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-item {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tab-item:hover { color: var(--text-primary); background: var(--bg-input); }
.tab-item.active {
    background: var(--primary);
    color: #ffffff;
}

.apartados-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 2.2rem 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    min-width: 250px;
    font-family: var(--font-sans);
}
.search-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}

.btn-search-icon {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-search-icon:hover { color: var(--primary); }

.phone-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.phone-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.action-buttons-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-action-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-action-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.btn-print-icon:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}
.btn-cancel-icon:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}
.btn-edit-icon:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-view-icon:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #f59e0b;
}

.apartados-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.apartado-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.2s ease;
    overflow: hidden;
}
.apartado-card:hover { border-color: rgba(99, 102, 241, 0.45); }
.apartado-card.card-por-vencer { border-left: 4px solid #f59e0b; }
.apartado-card.card-vencido { border-left: 4px solid #ef4444; }

.apartado-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.apartado-card-header:hover {
    background: rgba(99, 102, 241, 0.07);
}
.apartado-card.card-expanded .apartado-card-header {
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apartado-header-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.apartado-chevron-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.apartado-card-header:hover .apartado-chevron-box {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}
.apartado-chevron-icon {
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.apartado-card.card-expanded .apartado-chevron-icon {
    transform: rotate(90deg);
    color: #38bdf8;
}

.apartado-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.apartado-summary-client-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #e2e8f0;
}
.apartado-summary-client-name {
    color: #ffffff;
    font-weight: 700;
}
.apartado-summary-client-phone {
    color: #94a3b8;
    font-size: 0.76rem;
    margin-left: 0.25rem;
}

.apartado-header-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.apartado-summary-items-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.apartado-summary-saldo {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.apartado-summary-saldo.saldo-pendiente {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}
.apartado-summary-saldo.saldo-pagado {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.apartado-summary-saldo .lbl-saldo-summary {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
}

.apartado-card-collapse-content {
    display: none;
    padding: 1.25rem;
    gap: 1.25rem;
    flex-direction: column;
}
.apartado-card.card-expanded .apartado-card-collapse-content {
    display: flex;
    animation: apartadoFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.apartado-badge-code {
    font-family: monospace;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary);
}

.apartado-created-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.badge-vencimiento {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-vencimiento.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-vencimiento.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-vencimiento.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-vencimiento.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-vencimiento.badge-neutral { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

.apartado-card-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 280px;
    gap: 1.5rem;
    align-items: start;
}

.apartado-client-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-right: 1px solid var(--border-color);
    padding-right: 1.25rem;
}

.client-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-whatsapp-reminder {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.5);
    color: #25d366;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 0.4rem;
    transition: all 0.2s ease;
}
.btn-whatsapp-reminder:hover {
    background: #25d366;
    color: #ffffff;
}

.apartado-items-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.items-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.apartado-items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.apartado-item-pill {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    max-width: 100%;
}

.apartado-item-pill:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(30, 41, 59, 0.9);
}

.pill-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.pill-no-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pill-no-thumb .pill-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.pill-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pill-top-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pill-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.pill-brand-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.pill-code-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-family: monospace;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.72rem;
}

.pill-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.pill-meta-spec {
    color: #cbd5e1;
}

.pill-meta-price {
    font-weight: 800;
    color: #34d399;
}

.apartado-progress-section {
    border-left: 1px solid var(--border-color);
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.progress-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.progress-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.apartado-amounts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.amount-box {
    background: var(--bg-main);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.amount-box.highlight-pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.amount-title { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; }
.amount-num { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); }

.apartado-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.apartado-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ================= PRENDAS SELECTOR IN NUEVO APARTADO ================= */
.prendas-selector-list {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    background: var(--bg-main);
}

.prenda-select-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: background 0.2s ease;
}
.prenda-select-row:hover { background: var(--bg-card-hover); }

.prenda-row-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prenda-row-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}

.prenda-row-no-thumb {
    width: 36px;
    height: 36px;
    background: #1e293b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.prenda-row-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #10b981;
}

.layaway-calc-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-row.calc-highlight {
    border-top: 1px solid var(--border-color);
    padding-top: 0.4rem;
    margin-top: 0.2rem;
    font-size: 1rem;
}

/* ================= CLIENTES BADGES & CRM ================= */
.whatsapp-btn-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: #25d366;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.whatsapp-btn-badge:hover {
    background: #25d366;
    color: #fff;
}

.client-name-title {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ================= FLOATING TOASTS ================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast-item {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: auto;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.toast-item.toast-success { border-color: rgba(16, 185, 129, 0.5); border-left: 4px solid #10b981; }
.toast-item.toast-warning { border-color: rgba(245, 158, 11, 0.5); border-left: 4px solid #f59e0b; }
.toast-item.toast-info { border-color: rgba(99, 102, 241, 0.5); border-left: 4px solid var(--primary); }

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.toast-content i { font-size: 1.1rem; }
.toast-success i { color: #10b981; }
.toast-warning i { color: #f59e0b; }
.toast-info i { color: var(--primary); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1240px) and (min-width: 1025px) {
    .pos-container {
        grid-template-columns: minmax(0, 1fr) 390px;
        gap: 1.15rem;
    }
}

@media (max-width: 1024px) {
    .pos-container { grid-template-columns: 1fr; }
    .pos-cart-section { height: auto; position: static; max-width: 100%; }
    .apartado-card-body { grid-template-columns: 1fr; }
    .apartado-client-section { border-right: none; padding-right: 0; }
    .apartado-progress-section { border-left: none; padding-left: 0; }
}

@media (max-width: 768px) {
    /* POS & Apartados Mobile Layout */
    .pos-container {
        padding: 0;
        gap: 0.75rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .pos-products-section {
        padding: 0.65rem;
        gap: 0.65rem;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .pos-search-header {
        gap: 0.45rem;
        width: 100%;
    }

    /* Caja de búsqueda de código compacta y elegante para móvil */
    .pos-search-box {
        padding: 0.35rem 0.65rem;
        border: 1.5px solid var(--border-color);
        border-radius: 9px;
        min-height: 38px;
        gap: 0.35rem;
    }

    .barcode-scanner-icon {
        font-size: 1.05rem;
        margin-right: 0.25rem;
    }

    .pos-search-input {
        font-size: 0.84rem;
        padding: 0;
        min-width: 0;
    }

    .pos-search-input::placeholder {
        font-size: 0.78rem;
    }

    .btn-sync-catalog {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-right: 0.15rem;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .btn-clear-search {
        font-size: 0.85rem;
        padding: 0 0.2rem;
        flex-shrink: 0;
    }

    /* Filtros ordenados en móvil: 2 selects arriba y carrusel de colores horizontal */
    .pos-filter-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .pos-filter-select {
        width: 100%;
        min-width: 0;
        padding: 0.38rem 0.55rem;
        font-size: 0.78rem;
        border-radius: 7px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .pos-tag-colors-filter {
        grid-column: 1 / -1;
        display: flex;
        gap: 0.35rem;
        margin-left: 0;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.15rem 0.1rem 0.35rem 0.1rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .pos-tag-colors-filter::-webkit-scrollbar {
        display: none;
    }

    .tag-color-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.72rem;
        flex-shrink: 0;
        border-radius: 9999px;
    }

    .tag-dot-circle {
        width: 7px;
        height: 7px;
    }

    .btn-open-promos-modal {
        flex-shrink: 0;
        padding: 0.25rem 0.55rem;
    }

    /* Cuadrícula de productos: exactamente 2 columnas en celular */
    .pos-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.55rem !important;
        max-height: none !important;
        padding-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .pos-product-card {
        padding: 0.45rem;
        gap: 0.35rem;
        border-radius: 10px;
        min-width: 0;
        box-sizing: border-box;
    }

    .pos-product-card:hover {
        transform: none;
    }

    .pos-product-img-wrapper {
        height: 125px;
        border-radius: 7px;
    }

    .badge-tag-color {
        top: 5px;
        left: 5px;
        padding: 0.15rem 0.45rem;
        font-size: 0.66rem;
        gap: 0.25rem;
        border-radius: 9999px;
    }

    .tag-dot {
        width: 6px;
        height: 6px;
    }

    .card-disc-pill {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .pos-product-talla {
        bottom: 5px;
        right: 5px;
        font-size: 0.64rem;
        padding: 1px 4px;
        border-radius: 3px;
    }

    .pos-product-meta-row {
        gap: 0.25rem;
    }

    .pos-product-sku {
        font-size: 0.66rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 55%;
    }

    .pos-product-cantidad {
        font-size: 0.64rem;
        padding: 1px 4px;
        gap: 0.2rem;
    }

    .pos-product-cantidad i {
        font-size: 0.58rem;
    }

    .pos-product-title {
        font-size: 0.78rem;
        line-height: 1.22;
        min-height: 2.45em;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .pos-product-marca {
        font-size: 0.66rem;
        margin-top: -2px;
    }

    .pos-product-price-row {
        margin-top: 0.15rem;
        padding-right: 28px;
    }

    .pos-product-price {
        font-size: 0.88rem;
        line-height: 1.1;
    }

    .pos-price-original {
        font-size: 0.68rem;
        margin-right: 0.2rem;
    }

    .pos-price-discounted {
        font-size: 0.88rem;
    }

    .btn-pos-add {
        bottom: 6px;
        right: 6px;
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }
}

/* ================= CAJA & SINPE STYLES ================= */
.caja-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.caja-status-banner.status-open {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.caja-status-banner.status-closed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(127, 29, 29, 0.25));
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.status-pulse-dot {
    width: 16px;
    height: 16px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 1.8s infinite;
    flex-shrink: 0;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.closed-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ef4444;
}

.status-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2px;
}

.status-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.banner-quick-actions {
    display: flex;
    gap: 0.6rem;
}

.highlight-border-emerald {
    border-color: rgba(16, 185, 129, 0.5) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent) !important;
}

.text-emerald { color: #10b981 !important; }
.text-purple { color: #c084fc !important; }
.text-amber { color: #fbbf24 !important; }

.badge-tab-counter {
    background: var(--primary);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    margin-left: 5px;
}

.caja-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.caja-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SINPE Toolbar & Badges */
.sinpe-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sinpe-kpi-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sinpe-mini-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.sinpe-mini-pill.pill-warning { border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
.sinpe-mini-pill.pill-success { border-color: rgba(16, 185, 129, 0.4); color: #34d399; }
.sinpe-mini-pill.pill-danger { border-color: rgba(239, 68, 68, 0.4); color: #f87171; }

.sinpe-ref-code {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: #c084fc;
    letter-spacing: 0.03em;
}

.badge-banco {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}
.origin-badge.badge-venta { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.origin-badge.badge-abono { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.origin-badge.badge-manual { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }

.row-sospechoso {
    background: rgba(239, 68, 68, 0.06) !important;
}

/* Arqueo / Conteo Denominaciones */
.cierre-header-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    background: var(--bg-main);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.metric-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.metric-box span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.metric-box strong { font-size: 0.95rem; color: var(--text-primary); }
.metric-box.highlight {
    background: rgba(16, 185, 129, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.subheading-arqueo {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.75rem;
}

.arqueo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    background: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .arqueo-grid { grid-template-columns: 1fr; }
}

.denom-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.denom-col-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.denom-row {
    display: grid;
    grid-template-columns: 75px 85px 1fr;
    align-items: center;
    gap: 0.5rem;
}

.denom-row label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.denom-row .denom-input {
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
}

.denom-subtotal {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
    font-family: ui-monospace, monospace;
}

.cuadre-live-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    align-items: center;
}

.live-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.live-diff-card {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Anti-fraude & Parser */
.antifraude-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .antifraude-grid { grid-template-columns: 1fr; }
}

.antifraude-input-group {
    display: flex;
    gap: 0.5rem;
}

.alert-fraud-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: #fca5a5;
    font-size: 0.88rem;
}

.alert-fraud-danger h4 {
    color: #ef4444;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.alert-fraud-danger ul {
    margin: 0.5rem 0 0.5rem 1.25rem;
}

.alert-fraud-safe {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    color: #34d399;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.parser-preview-card {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.parser-preview-card h4 {
    font-size: 0.92rem;
    color: #c084fc;
    margin-bottom: 0.6rem;
}

.parser-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.parser-data-grid .label {
    color: var(--text-muted);
}

.btn-purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #ffffff !important;
}
.btn-purple:hover {
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.card-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-box-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row-flex-cards {
    display: flex;
    gap: 1.25rem;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.resumen-cuadre-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cuadre-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(39, 53, 79, 0.4);
    padding-bottom: 0.4rem;
}

.cuadre-total-highlight {
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    padding-top: 0.6rem;
    margin-top: 0.25rem;
}

/* ================= APP FOOTER & USER SESSION ================= */
.app-footer {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    margin-top: auto;
    width: 100%;
    z-index: 900;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.footer-brand strong {
    color: #ffffff;
    font-weight: 700;
}

.footer-brand i {
    color: var(--primary);
    font-size: 1rem;
}

.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.footer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
    animation: pulseStatusDot 2s infinite ease-in-out;
}

@keyframes pulseStatusDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.footer-user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-session-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(31, 41, 61, 0.75);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.95rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-session-pill:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(31, 41, 61, 0.95);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.user-session-pill-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-session-pill .user-avatar-icon {
    color: var(--primary);
    font-size: 1.15rem;
}

.user-session-pill .user-session-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.user-role-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.user-role-badge.role-admin {
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.user-role-badge.role-user {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.user-session-action {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.user-session-action:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.user-session-action.action-logout {
    color: #f87171;
}

.user-session-action.action-logout:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

.btn-login-footer {
    background: var(--primary);
    color: #ffffff;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-login-footer:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
    }
    .footer-left-info {
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }
}

/* ================= MODO SOPORTE (IMPERSONATION) ================= */
.impersonation-bar {
    background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 0.55rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    position: sticky;
    top: 0;
    z-index: 1200;
    border-bottom: 2px solid #38bdf8;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.impersonation-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.impersonation-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.impersonation-badge i {
    color: #fef08a;
    animation: pulseDot 1.5s infinite;
}

.btn-salir-soporte {
    background: #ffffff;
    color: #0369a1 !important;
    font-weight: 800;
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.83rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    border: none;
    flex-shrink: 0;
}

.btn-salir-soporte:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    color: #0284c7 !important;
}

.btn-soporte {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.45);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-soporte:hover {
    background: rgba(14, 165, 233, 0.3);
    color: #ffffff !important;
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.pill-modo-soporte {
    border-color: rgba(14, 165, 233, 0.6) !important;
    background: rgba(14, 165, 233, 0.12) !important;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.25) !important;
}

.badge-soporte-indicator {
    background: rgba(14, 165, 233, 0.25);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.45);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-salir-soporte-pill {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.btn-salir-soporte-pill:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.6);
}

/* ==========================================================================
   MODAL: KIT DE PUBLICACIÓN EN REDES SOCIALES (INSTAGRAM, WHATSAPP, FB)
   ========================================================================== */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 15, 0.85);
    backdrop-filter: blur(10px);
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop-custom.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog-custom {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    width: 95vw;
    max-width: 980px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(225, 48, 108, 0.15);
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop-custom.active .modal-dialog-custom {
    transform: scale(1);
}

.modal-header-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(90deg, #131d36 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.modal-icon-badge.instagram-gradient {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    box-shadow: 0 4px 15px rgba(214, 36, 159, 0.45);
}

.modal-title-custom {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-subtitle-custom {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.15rem 0 0 0;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.modal-body-custom {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.kit-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
    align-items: start;
}

.kit-photo-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kit-content-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Columna de Fotografía */
.kit-photo-preview-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 280px;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.kit-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kit-no-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    padding: 1.5rem;
    gap: 0.75rem;
}
.kit-no-photo-placeholder i {
    font-size: 3rem;
    opacity: 0.6;
}
.kit-no-photo-placeholder span {
    font-size: 0.82rem;
}

.kit-photo-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    pointer-events: none;
}

.kit-chip {
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.kit-chip.sku {
    background: rgba(99, 102, 241, 0.9);
    color: #ffffff;
    border-color: transparent;
}

.kit-chip.price {
    margin-left: auto;
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
    font-weight: 800;
    border-color: transparent;
}

.kit-photo-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.btn-kit-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 0.65rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-kit-download:hover:not(.disabled) {
    background: #334155;
    border-color: #64748b;
    transform: translateY(-1px);
}

.btn-kit-download.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.kit-unidades-carousel {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.25rem 0.1rem;
    scrollbar-width: thin;
}

.kit-unidades-carousel::-webkit-scrollbar {
    height: 4px;
}

.kit-unidades-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.kit-unidad-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.kit-unidad-chip:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.kit-unidad-chip.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.kit-unidad-chip-thumb {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    background: #0f172a;
}

.kit-download-hint {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.35;
}

.kit-status-panel {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
}

.kit-status-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.4rem;
}

.kit-status-switches {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.kit-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}
.kit-switch-label input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
}

/* Columna de Texto y Acciones */
.kit-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.kit-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
    display: block;
}

.kit-style-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.kit-tab {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kit-tab:hover {
    background: #334155;
    color: #ffffff;
}

.kit-tab.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.kit-caption-wrapper {
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.kit-caption-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    background: #090d19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kit-caption-counter {
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
}

.btn-caption-copy-quick {
    background: transparent;
    border: none;
    color: #818cf8;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-caption-copy-quick:hover {
    background: rgba(129, 140, 248, 0.15);
    color: #c7d2fe;
}

.kit-caption-textarea {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.75rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 130px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

/* Grid de Botones de Acción */
.kit-action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
    width: 100%;
}

.btn-kit-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 0;
    box-sizing: border-box;
}

.btn-kit-action .action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.btn-kit-action .action-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.btn-kit-action .action-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.btn-kit-action .action-sub {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin-top: 0.1rem;
}

.btn-kit-action:hover {
    transform: translateY(-2px);
}

/* Estilos específicos por red */
.btn-kit-instagram {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(247, 119, 55, 0.18));
    border-color: rgba(225, 48, 108, 0.4);
}
.btn-kit-instagram .action-icon {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(214, 36, 159, 0.4);
}
.btn-kit-instagram:hover {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.35), rgba(247, 119, 55, 0.35));
    border-color: #e1306c;
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.35);
}

.btn-kit-whatsapp {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.35);
}
.btn-kit-whatsapp .action-icon {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.btn-kit-whatsapp:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: #25d366;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-kit-share-native {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.35);
}
.btn-kit-share-native .action-icon {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}
.btn-kit-share-native:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: #0ea5e9;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-kit-facebook {
    background: rgba(24, 119, 242, 0.12);
    border-color: rgba(24, 119, 242, 0.35);
}
.btn-kit-facebook .action-icon {
    background: #1877f2;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}
.btn-kit-facebook:hover {
    background: rgba(24, 119, 242, 0.25);
    border-color: #1877f2;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3);
}

@media (max-width: 860px) {
    .modal-dialog-custom {
        max-width: 95vw;
        max-height: 94vh;
    }
    .kit-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .kit-photo-preview-box {
        max-width: 260px;
        margin: 0 auto;
    }
    .kit-action-buttons-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================================
   MÓDULO: TERMINAL POS DE APARTADOS (DISEÑO FACTURACIÓN VIBRANTE)
===================================================================== */
.apartados-main-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.apartado-main-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.apartado-main-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
    border-color: rgba(255, 255, 255, 0.08);
}

.apartado-main-tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
    border-color: #6366f1;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.25);
}

.apartado-main-tab-btn .badge-tab-counter {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.apartado-main-tab-btn.active .badge-tab-counter {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

/* Caja de condiciones financieras del apartado en el carrito */
.apartado-terms-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.apartado-terms-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.apartado-terms-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
}

.apartado-terms-grid-2 > div {
    min-width: 0;
}

.apartado-pending-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: #fbbf24;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.apartado-pending-banner .banner-label {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apartado-pending-amount {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fde047;
    font-family: var(--font-sans);
}

/* Botones de porcentaje de abono rápido */
.apartado-percent-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.btn-apartado-percent {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-apartado-percent:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #6366f1;
    color: #ffffff;
}

/* Botón principal de Guardar Apartado */
.btn-save-apartado-main {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    padding: 1rem 1.25rem !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.65rem !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-save-apartado-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.65) !important;
    filter: brightness(1.1);
}

.btn-save-apartado-main:active:not(:disabled) {
    transform: translateY(0);
}

.btn-save-apartado-main:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .apartados-main-tabs {
        flex-direction: column;
    }
    .apartado-terms-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ================= COMPONENTES COMPARTIDOS: TABS Y NAVEGACIÓN ================= */
.report-nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: #0f172a;
    padding: 0.35rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    width: fit-content;
    align-items: center;
}

.report-nav-tab {
    padding: 0.5rem 1.15rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.report-nav-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.report-nav-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

@media (max-width: 768px) {
    .report-nav-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none;
        padding: 0.3rem;
        gap: 0.35rem;
    }
    .report-nav-tabs::-webkit-scrollbar {
        display: none;
    }
    .report-nav-tab {
        padding: 0.45rem 0.85rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }
}

/* View Mode Tabs (Inventario Códigos vs Fardo) */
.view-mode-tabs {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    backdrop-filter: blur(8px);
}

.view-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.55rem 1.15rem;
    border-radius: 9px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    text-decoration: none;
}

.view-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.view-tab-btn.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Smart Filter Chips */
.smart-chips-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.smart-chip {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-secondary) !important;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    user-select: none;
}

.smart-chip:hover {
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #ffffff !important;
    background: rgba(30, 41, 59, 0.85) !important;
    transform: translateY(-1px);
}

.smart-chip.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.35)) !important;
    border-color: #818cf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
    font-weight: 700;
}

.smart-chip .tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Card Download & Units rows */
.download-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.download-label {
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-zip-download {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-weight: 700;
    font-size: 0.76rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-zip-download:hover {
    background: rgba(99, 102, 241, 0.35);
    border-color: #818cf8;
    color: #ffffff;
}

.btn-action-unidades {
    white-space: nowrap !important;
}

/* =====================================================================
   MODALES GLOBALES CON OVERLAY EN PRIMER PLANO (Z-INDEX SUPERIOR)
   ===================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay .modal-card {
    position: relative;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

