/* ============================================
   ESTILOS FRONTEND - Portal para Clientes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

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

html {
    overflow-x: hidden;
}

/* Tema: esquema de colores proporcionado */
:root {
    --violet: #8e79d8;
    --violet-dark: #4a1c6a;
    --violet-hover: #b2a7da;
    --dark: #131317;
    --dark-soft: #2b2b30;
    --light: #f4f4f6;
    --gray: #b2a7da;
    
    /* Legacy aliases para compatibilidad */
    --color-primary: var(--violet-dark);
    --color-secondary: var(--violet);
    --color-muted: var(--violet-hover);
    --color-bg-light: var(--light);
    --color-shadow: #1a1a1d;
    --color-bg-dark: var(--dark-soft);
}

body {
    color: var(--color-primary);
    background-color: var(--color-bg-light);
}

.navbar, .client-header, .client-container {
    background-color: var(--color-bg-dark);
    color: var(--color-secondary);
}

.navbar-menu a { color: var(--color-secondary); }
.navbar-menu a:hover { background-color: rgba(195,169,231,0.12); }

.form-control, .product-form, .client-container { border-color: var(--color-muted); }

.client-container { box-shadow: 0 12px 36px rgba(18,18,18,0.12); }

body {
    font-family: 'Lato', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-primary);
    background: #131317;
    min-height: 100vh;
}

:root {
    /* Legacy variables mapped to the new theme variables */
    --primary: var(--color-primary);
    --primary-dark: var(--color-primary);
    --secondary: var(--color-secondary);
    --accent: var(--color-secondary);
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --light: var(--color-bg-light);
    --dark: var(--color-bg-dark);
    --border: var(--color-muted);
}

.navbar {
    background: #131317;
    color: var(--color-secondary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(18,18,18,0.28);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.navbar-brand h1 {
    color: var(--color-secondary);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(195,169,231,0.06);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--light);
    text-decoration: none;
    padding: 0;
    margin-left: 25px;
    margin-right: 15px;
    transition: color 0.3s;
    border-radius: 0;
    font-weight: 500;
    position: relative;
    padding-top: 20px;
}

.navbar-menu a:hover {
    background: transparent;
    color: var(--violet);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.navbar-user span {
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

/* Mejoras de espaciado en el área de perfil del usuario */
.navbar-user-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 48px;
    padding: 8px 12px;
}

.navbar-username {
    max-width: 200px;
    word-wrap: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.dropdown-toggle {
    padding: 8px 0 !important;
}

/* Dropdown items should remain readable on hover; override navbar link hover rule */
.navbar .dropdown-menu .dropdown-item,
.navbar .dropdown-menu .dropdown-item:link,
.navbar .dropdown-menu .dropdown-item:visited { color: var(--dark); }
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus { color: var(--dark);}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.client-container {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Headers */
h2, h3, h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
}

h3 {
    font-size: 1.4rem;
}

.client-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.client-header h2 {
    margin-bottom: 0.5rem;
}

.client-header p {
    color: #718096;
    font-size: 1.1rem;
    margin: 0;
}

/* Formularios */
.form-container {
    margin: 2rem 0;
}

.product-form {
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.product-form fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
}

/* Estilos para el formulario de edición (coincidir con product-form) */
.edit-product-form {
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.edit-product-form fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
}

.product-form legend {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0 0.75rem;
    margin-left: -0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,21,106,0.08);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

/* Botones */
.btn {
    display: inline-block;
    background: var(--violet-dark);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff !important;
    border: 0.3px solid #ffffff;
    font-weight: 700;
    box-shadow: 0 5px 15px #4a1c6a66;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--violet-hover);
    color: #ffffff !important;
    border-color: var(--violet-hover);
    box-shadow: 0 8px 20px rgba(74, 28, 106, 0.6);
    transform: translateY(-2px);
}

.btn:active,
.btn:focus,
.btn:visited {
    color: #ffffff !important;
    outline: none;
}

.btn-primary {
    background: var(--violet-dark);
    color: #ffffff !important;
}

.btn-primary:hover {
    background: var(--violet-hover);
    border-color: var(--violet-hover);
}

/* Variantes de botones para mejor contraste */
.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: rgba(74,21,106,0.06);
}

.btn-inverse {
    background: var(--color-bg-light);
    color: var(--color-primary);
    border: 1px solid var(--color-muted);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-bg-light);
    background: var(--color-primary);
}

.badge-secondary {
    background: var(--color-secondary);
}

/* Botones estado específicos */
.btn-success {
    background: #38a169; /* verde accesible */
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
}

.btn-warning {
    background: #f6ad55; /* naranja suave */
    color: #111827;
    border: 1px solid rgba(0,0,0,0.06);
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    border-radius: 4px;
}

.btn {
    line-height: 1;
}

/* Badge status (estado) — si hay estilos inline, esta clase mejora legibilidad */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.25em 0.7em;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9em;
    color: #111;
}

/* Botones específicos para acciones: usar tono morado (opción 2) */
/* Botones de acción: usar fondo sólido más oscuro (sin degradado) */
.send-approval-btn,
.edit-product-btn {
    background: var(--color-primary);
    color: var(--color-bg-light);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 18px rgba(18,18,18,0.14);
}
.send-approval-btn:hover,
.edit-product-btn:hover {
    background: #2a0f2f; /* un poco más oscuro */
    transform: translateY(-2px);
}

/* Badges por estado */
.badge-status { min-width: 140px; justify-content: center; }
.badge-pendiente {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.badge-resubmitted {
    background: #0891b2;
    color: #ffffff;
    border: 1px solid #0e7490;
}
.badge-aprobado { 
    background: #d4edda; 
    color: #155724;
    border: 1px solid #28a745;
}
.badge-rechazado { 
    background: #f8d7da; 
    color: #721c24;
    border: 1px solid #dc3545;
}
.badge-borrador {
    background: #f0f0f0;
    color: #555;
}

/* Fecha dentro del badge: legible en badges oscuros/claros */
.badge-date {
    display: block;
    margin-top: 0.25em;
    font-size: 0.82em;
    opacity: 0.9;
    color: #666;
}
.badge-aprobado .badge-date { color: #155724; }
.badge-rechazado .badge-date { color: #721c24; }
.badge-pendiente .badge-date { color: #856404; }
.badge-resubmitted .badge-date { color: #ffffff; }

/* Estado activo del menú */
.navbar-menu a.active {
    color: var(--violet);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

.navbar-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--violet);
    border-radius: 1px;
}

.btn-secondary {
    background: var(--border);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Alertas */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fff4;
    border-color: var(--success);
    color: #22543d;
}

.alert-danger {
    background: #fff5f5;
    border-color: var(--danger);
    color: #742a2a;
}

.alert-warning {
    background: #fffaf0;
    border-color: var(--warning);
    color: #7c2d12;
}

.alert-info {
    background: #ebf8ff;
    border-color: var(--info);
    color: #2c5282;
}

/* Productos Grid */
.products-section {
    margin-top: 3rem;
}

.products-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
    border-color: var(--primary);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-info h4 {
    margin: 0 0 0.75rem 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.product-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #718096;
}

.product-info strong {
    color: var(--dark);
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--light);
    background: var(--dark-soft);
    border-radius: 12px;
    border: 2px dashed var(--border);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #131317;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-box h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.login-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.login-form {
    margin: 2rem 0;
}

.login-footer {
    background: var(--dark-soft);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.login-footer p {
    margin: 0.35rem 0;
    color: var(--dark);
}

.login-footer code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', monospace;
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer p {
    margin: 0;
}

/* QR Section responsive */
.qr-section img {
    max-width: 100%;
    height: auto;
}

/* Mejoras visuales para el modal de edición de producto */
#modal-edit-product .modal-content {
    padding: 2rem 2.5rem !important;
}
#modal-edit-product fieldset,
#modal-product fieldset {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    background: #fafbfc;
}
#modal-edit-product legend {
    font-weight: bold;
    margin-bottom: 0.7rem;
    padding: 0 0.5rem;
    color: #444;
}
#modal-edit-product .form-group, #modal-edit-product .form-row {
    margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .navbar-brand h1 {
        font-size: 1rem;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .navbar-menu li {
        width: 100%;
    }

    .navbar-user {
        width: 100%;
        margin-left: 0;
    }

    body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding: 1rem;
        overflow: visible;
    }

    .client-container {
        padding: 1rem;
        border-radius: 12px;
        overflow: visible;
    }

    .product-buttons {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .product-buttons button,
    .product-buttons span {
        width: 100%;
        margin-left: 0 !important;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
    }

    /* QR Section responsive for mobile */
    .qr-section {
        padding: 1rem !important;
    }

    .qr-section div[style*="display:inline-block"] {
        width: 100% !important;
        display: block !important;
        padding: 10px !important;
    }

    .qr-section img {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }

    /* Header with buttons responsive */
    div[style*="display:flex"][style*="justify-content:space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    div[style*="display:flex"][style*="justify-content:space-between"] h2 {
        margin-bottom: 1rem !important;
    }

    div[style*="display:flex"][style*="justify-content:space-between"] > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    div[style*="display:flex"][style*="justify-content:space-between"] .btn {
        width: 100% !important;
    }

    .badge-status {
        min-width: auto !important;
        white-space: normal !important;
    }

    /* Disable grid layout for container divs in mobile */
    div[style*="display:grid"] {
        display: block !important;
    }

    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-block, .btn-large {
        width: 100%;
    }

    .login-container {
        max-width: 100%;
    }

    h2 {
        font-size: 1.5rem;
    }

    .client-header h2 {
        font-size: 1.5rem;
    }
}

/* Utilidades */
small {
    color: #a0aec0;
    font-size: 0.85rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #718096;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-borrador {
    background: #edf2f7;
    color: #2d3748;
}

.badge-publicado {
    background: #c6f6d5;
    color: #22543d;
}

.badge-archivado {
    background: #fed7d7;
    color: #742a2a;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-btn,
.pagination-number {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--color-muted);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-primary);
    transition: all 0.3s;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
    cursor: pointer;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

.pagination-number.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 600;
    pointer-events: none;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: var(--color-muted);
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn,
    .pagination-number {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        min-width: 35px;
    }
}

/* ============================================
   Estilos para Formulario de Clientes
   ============================================ */

.content-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

.content-header h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(18,18,18,0.08);
}

.form-horizontal {
    max-width: 800px;
}

.form-group label.required::after {
    content: ' *';
    color: var(--danger);
}

.btn-secondary {
    background: var(--color-muted);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-secondary);
    color: white;
}

/* ============================================
   Estilos para Tabla de Clientes
   ============================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
}

.table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.table thead th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--color-muted);
    transition: background-color 0.2s;
    background: white;
}

.table tbody tr:hover {
    background-color: rgba(143, 111, 165, 0.05);
}

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

.table tbody td {
    padding: 1.25rem 1.5rem;
    color: #333;
    font-size: 1rem;
    background: white;
    line-height: 1.6;
}

.table tbody td:last-child {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state p {
    color: var(--color-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Tabla responsive */
    .table {
        display: block;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 100%;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 2.5rem;
        border: 1px solid var(--color-muted);
        border-radius: 8px;
        padding: 2rem 1.5rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        width: 100%;
        max-width: 500px;
    }
    
    .table tbody td {
        display: block;
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--color-muted);
        font-size: 1.15rem;
        line-height: 1.8;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .table tbody td:last-child::before {
        display: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        margin-bottom: 0.75rem;
        color: var(--color-secondary);
        font-size: 1.05rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .btn-sm {
        width: 100%;
        padding: 1.1rem 1.25rem;
        font-size: 1.05rem;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   SPINNER / LOADING INDICATOR
   ============================================ */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.spinner-overlay.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(53, 22, 58, 0.2);
    border-top-color: #4a1c6a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border-width: 3px;
}

.spinner-medium {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.spinner-large {
    width: 80px;
    height: 80px;
    border-width: 6px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner con gradiente */
.spinner-gradient {
    width: 60px;
    height: 60px;
    border: 5px solid transparent;
    border-radius: 50%;
    position: relative;
    animation: spin 1s linear infinite;
}

.spinner-gradient::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a1c6a 0%, #8e79d8 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 5px;
}

/* Spinner inline (para botones) */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Spinner con texto */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
