/* =====================================================================
   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 ================= */
.navbar {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-link.active {
    color: #ffffff;
    background: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.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);
}

.nav-catalogo {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nav-catalogo:hover {
    background: rgba(16, 185, 129, 0.25);
}

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

/* ================= 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; }

/* ================= 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;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.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; 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.5rem;
    margin-bottom: 0.85rem;
}

.spec-pill {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.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-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: 768px) {
    .nav-container { flex-direction: column; gap: 0.75rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .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
===================================================================== */

/* Navbar highlight for POS */
.nav-link.btn-pos {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 95, 70, 0.4));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399 !important;
    font-weight: 700;
}
.nav-link.btn-pos:hover, .nav-link.btn-pos.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

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

/* 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;
}
.btn-clear-search:hover { color: var(--text-primary); }

.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.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}
.tag-color-btn:hover { color: #fff; }
.tag-color-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.tag-color-btn.tag-roja.active { background: #ef4444; border-color: #ef4444; }
.tag-color-btn.tag-azul.active { background: #3b82f6; border-color: #3b82f6; }
.tag-color-btn.tag-verde.active { background: #10b981; border-color: #10b981; }
.tag-color-btn.tag-amarilla.active { background: #eab308; border-color: #eab308; color: #000; }
.tag-color-btn.tag-naranja.active { background: #f97316; border-color: #f97316; }

/* 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-sku {
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--primary);
    font-weight: 700;
}

.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: hidden;
}

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

.customer-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.pos-customer-select {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}

.btn-add-customer-quick {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-add-customer-quick:hover {
    background: var(--primary);
    color: #ffffff;
}

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

.pos-cart-table-head {
    display: grid;
    grid-template-columns: 1fr 110px 40px;
    padding: 0.6rem 1rem;
    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;
    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 110px 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;
    transition: background 0.2s ease;
}
.pos-cart-item-row:hover { background: var(--bg-card-hover); }

.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 {
    text-align: right;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

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

.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 {
    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 {
    transform: scale(1);
}

.pos-modal-card.modal-sm { width: 440px; }

.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: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.btn-cancel:hover { background: var(--bg-input); color: #fff; }

.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: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.2s ease;
}
.apartado-card:hover { border-color: rgba(99, 102, 241, 0.5); }
.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.75rem;
}

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

.apartado-created-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
}

.badge-vencimiento {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    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 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: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pill-thumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}
.pill-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.pill-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pill-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: block;
}

.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: 1024px) {
    .pos-container { grid-template-columns: 1fr; }
    .pos-cart-section { height: auto; position: static; }
    .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; }
}

/* ================= 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: 100%;
    max-width: 920px;
    max-height: 90vh;
    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.25rem 1.75rem;
    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: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    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.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-subtitle-custom {
    font-size: 0.82rem;
    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.5rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}

.kit-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.75rem;
}

/* Columna de Fotografía */
.kit-photo-preview-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    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: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.kit-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    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.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.btn-kit-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.65rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-size: 0.85rem;
    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-download-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

.kit-status-panel {
    margin-top: 1rem;
    padding: 0.85rem;
    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.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

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

.kit-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 600;
}
.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.5rem;
    margin-bottom: 0.75rem;
}

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

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

.kit-tab {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.8rem;
    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;
}

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

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

.btn-caption-copy-quick {
    background: transparent;
    border: none;
    color: #818cf8;
    font-size: 0.75rem;
    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.85rem;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.55;
    resize: vertical;
    min-height: 140px;
    outline: none;
    font-family: inherit;
}

/* Grid de Botones de Acción */
.kit-action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-kit-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    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;
}

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

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

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

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

.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) {
    .kit-grid {
        grid-template-columns: 1fr;
    }
    .kit-photo-preview-box {
        max-width: 320px;
        margin: 0 auto;
    }
    .kit-action-buttons-grid {
        grid-template-columns: 1fr;
    }
}



