/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

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

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

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

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--gray-500);
    position: relative;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: visible;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2, .card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Stats Card */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-change.positive { color: var(--secondary); }
.stat-change.negative { color: var(--danger); }

/* ============================================
   FORMS
   ============================================ */

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group label i {
    margin-right: 0.25rem;
    color: var(--gray-400);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background: white;
    color: var(--gray-800);
}

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

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.data-table .actions .btn {
    padding: 0.375rem;
    font-size: 0.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ============================================
   SEARCH & FILTERS
   ============================================ */

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    padding-left: 2.5rem;
    width: 100%;
}

.search-box .clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.search-box .clear-search.visible {
    display: block;
}

/* ============================================
   TOASTS
   ============================================ */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.toast.error .toast-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.toast.warning .toast-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.toast.info .toast-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--gray-600);
}

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

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* ============================================
   ESTILOS PARA RECIBO TÉRMICO
   ============================================ */

/* Modal de recibo */
.receipt-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Vista previa del ticket en pantalla */
.thermal-preview {
    background: #fff;
    border: 1px dashed #ccc;
    padding: 20px;
    max-width: 320px;  /* Ancho típico de impresora 80mm */
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* El ticket en sí */
.thermal-receipt {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    width: 100%;
    text-align: center;
}

.receipt-header {
    margin-bottom: 8px;
}

.store-name {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.store-info {
    font-size: 11px;
}

.receipt-divider {
    font-size: 10px;
    letter-spacing: -1px;
    margin: 4px 0;
    color: #333;
}

.receipt-divider-light {
    font-size: 10px;
    letter-spacing: -1px;
    margin: 4px 0;
    color: #666;
}

.receipt-title {
    font-size: 14px;
    font-weight: bold;
    margin: 4px 0;
}

.receipt-section {
    text-align: left;
    margin: 6px 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
}

.receipt-label {
    text-align: left;
}

.receipt-value {
    text-align: right;
    font-weight: 500;
}

.receipt-products-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 2px;
}

.receipt-products {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.6;
    text-align: left;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
}

.receipt-totals {
    text-align: left;
}

.receipt-totals .total {
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
}

.receipt-payment {
    text-align: left;
}

.receipt-footer {
    margin-top: 8px;
}

.thank-you {
    font-size: 13px;
    font-weight: bold;
    margin: 8px 0;
}

.receipt-barcode {
    font-family: 'Libre Barcode 39', 'Courier New', monospace;
    font-size: 24px;
    margin-top: 8px;
    letter-spacing: 2px;
}

/* ============================================
   ESTILOS DE IMPRESIÓN
   ============================================ */

@media print {
    /* Ocultar TODO excepto el recibo */
    body * {
        visibility: hidden !important;
    }
    
    .thermal-receipt,
    .thermal-receipt * {
        visibility: visible !important;
    }
    
    .thermal-receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;  /* Ancho estándar de impresora térmica */
        padding: 0;
        margin: 0;
    }
    
    /* Ocultar botones y UI del modal */
    .receipt-actions,
    .modal-header,
    .modal-close,
    .modal-overlay {
        display: none !important;
    }
    
    /* Asegurar fondo blanco */
    .thermal-preview {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 80mm !important;
    }
    
    /* Forzar tamaño de papel */
    @page {
        size: 80mm auto;  /* Ancho fijo, alto automático */
        margin: 0;
    }
}

/* Lista de productos en el recibo */
.receipt-products-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.receipt-products-header {
    display: grid;
    grid-template-columns: 35px 1fr 60px 60px;
    gap: 4px;
    font-weight: bold;
    font-size: 10px;
    text-align: left;
    border-bottom: 1px dashed #999;
    padding-bottom: 2px;
    margin-bottom: 4px;
}

.receipt-product-row {
    display: grid;
    grid-template-columns: 35px 1fr 60px 60px;
    gap: 4px;
    font-size: 11px;
    text-align: left;
    align-items: center;
}

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

.rp-name {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-price, .rp-total {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.rph-qty { text-align: center; }
.rph-name { text-align: left; }
.rph-price, .rph-total { text-align: right; }

/* Ajuste para impresión */
@media print {
    .receipt-product-row,
    .receipt-products-header {
        grid-template-columns: 30px 1fr 50px 50px !important;
        font-size: 10px !important;
    }
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.modal-overlay.visible {
    opacity: 1;
}

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

.modal {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition);
}

.modal-overlay.visible .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

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

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Clase para modales anchos (Historial, etc.) */
.modal.modal-xl {
    max-width: 1200px; 
    width: 95%;
}

/* ============================================
   LOADING & SKELETON
   ============================================ */

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.pagination button {
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.875rem 1.25rem;
    border: none;
    background: none;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   AUTOCOMPLETE
   ============================================ */

.autocomplete-container {
    position: relative;
    overflow: visible !important;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
    margin-top: 0.25rem;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background var(--transition-fast);
}

.autocomplete-item:hover, .autocomplete-item.selected {
    background: var(--gray-50);
}

.autocomplete-item-info {
    display: flex;
    flex-direction: column;

    /* IMPORTANTE */
    flex: 1;
    min-width: 0;
}

.autocomplete-item-title {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.875rem;

   
    white-space: normal;
    word-break: break-word;
}

.autocomplete-item-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 0.25rem;

    /* mejora visual */
    width: 100%;
}

/* ============================================
   SALE ITEMS (POS)
   ============================================ */

.sale-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sale-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.sale-item-info {
    flex: 1;
}

.sale-item-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.sale-item-price {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.sale-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sale-item-qty button {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sale-item-qty button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sale-item-qty input {
    width: 3rem;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.25rem;
    font-size: 0.875rem;
}

.sale-item-total {
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: right;
}

.sale-item-remove {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform var(--transition-fast);
}

.sale-item-remove:hover {
    transform: scale(1.1);
}

.sale-summary {
    background: var(--gray-800);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.sale-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.sale-summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

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

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

@media (max-width: 480px) {
    .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar, .top-navbar, .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

.customer-purchases-scrollable {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.customer-purchases-scrollable .data-table {
    margin: 0;
}

.customer-purchases-scrollable .data-table thead th {
    position: sticky;
    top: 0;
    background: var(--gray-100);
    z-index: 1;
}

.customer-purchases-scrollable {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.customer-purchases-scrollable .data-table {
    margin: 0;
    width: 100%;
}

.customer-purchases-scrollable .data-table thead th {
    position: sticky;
    top: 0;
    background: var(--gray-100);
    z-index: 1;
}

/* Ajustes para el nuevo logo del sidebar */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px; 
    border-bottom: 2px solid var(--primary); 
}

.sidebar-logo {
    width: 45px;  
    height: auto; 
    object-fit: contain; 
    margin-left: 0rem; 
    padding-left: 0rem;
}

/* Enlace de administración en el sidebar */
.sidebar-link.admin-link {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
    border-left: 3px solid #3b82f6;
    color: #1e40af;
}

.sidebar-link.admin-link:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

.admin-badge {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}