/* ============================================================
 * CUBE SOFTWARE - Estilos Personalizados
 * Complementa Tailwind CSS para componentes específicos
 * Versión: 2.0.0 — Tema Minimalista Claro
 * ============================================================ */

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f7;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b0b5bd;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-accent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(183, 28, 28, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(183, 28, 28, 0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in { animation: slideIn 0.3s ease-out; }
.animate-pulse-accent { animation: pulse-accent 2s infinite; }

/* Nav links del sidebar */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.nav-link:hover {
    background: #f3f4f6;
    color: #374151;
}
.nav-link.active {
    background: rgba(183, 28, 28, 0.08);
    color: #B71C1C;
}
.nav-link.active svg {
    color: #B71C1C;
}

/* Toast de notificación */
.toast {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    max-width: 360px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.toast-success {
    background: #ecfdf5;
    border: 1px solid #059669;
    color: #059669;
}
.toast-error {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #dc2626;
}
.toast-warning {
    background: #fffbeb;
    border: 1px solid #d97706;
    color: #d97706;
}
.toast-info {
    background: #eff6ff;
    border: 1px solid #2563eb;
    color: #2563eb;
}

/* Cards estadísticas del dashboard */
.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Tabla base */
.cube-table {
    width: 100%;
    border-collapse: collapse;
}
.cube-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}
.cube-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.cube-table tbody tr:hover {
    background: #f9fafb;
}

/* Badge de estado */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-muted { background: #f3f4f6; color: #6b7280; }

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}
.modal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Botones */
.btn-primary {
    padding: 8px 16px;
    background: #B71C1C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.btn-primary:hover { background: #8B0000; }
.btn-secondary {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger {
    padding: 8px 16px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.btn-danger:hover { background: #b91c1c; }

/* Input/select base */
.cube-input {
    width: 100%;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}
.cube-input:focus {
    outline: none;
    border-color: #B71C1C;
}
.cube-input::placeholder { color: #9ca3af; }
select.cube-input { cursor: pointer; }

/* Mesa visual */
.mesa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 12px;
    font-weight: 600;
}
.mesa-libre { background: #ecfdf5; border-color: #059669; color: #059669; }
.mesa-ocupada { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.mesa-reservada { background: #fffbeb; border-color: #d97706; color: #d97706; }
.mesa-limpieza { background: #eff6ff; border-color: #2563eb; color: #2563eb; }

/* ============================================================
 * FASE 2 — POS, KDS, MESAS
 * ============================================================ */

/* POS: Full-bleed layout (sin padding) */
.pos-fullbleed { padding: 0 !important; overflow: hidden; }
.pos-fullbleed > .animate-fade-in { height: 100%; }

/* POS: Layout de 2 paneles */
.pos-container {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}
.pos-catalog {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e5e7eb;
}
.pos-catalog-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}
.pos-catalog-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    align-content: start;
}
.pos-cart {
    width: 380px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #fafafa;
}
.pos-cart-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.pos-cart-totals {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.pos-cart-actions {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* POS: Category pills */
.category-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.category-pills::-webkit-scrollbar { height: 3px; }
.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.category-pill:hover { color: #374151; background: #e5e7eb; }
.category-pill.active { background: #B71C1C; color: white; border-color: #B71C1C; }

/* POS: Product card */
.pos-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    min-height: 90px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.pos-product-card:hover { border-color: #B71C1C; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.pos-product-card:active { transform: scale(0.97); background: #f9fafb; }
.pos-product-card .prod-name { font-size: 13px; font-weight: 500; color: #374151; line-height: 1.2; }
.pos-product-card .prod-price { font-size: 14px; font-weight: 700; color: #B71C1C; }
.pos-product-card .prod-badge { font-size: 10px; color: #9ca3af; }

/* POS: Cart item */
.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #f3f4f6;
    gap: 8px;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 500; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-mods { font-size: 11px; color: #9ca3af; }
.cart-item-price { font-size: 13px; font-weight: 600; color: #B71C1C; white-space: nowrap; }
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-item-qty button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    font-family: inherit;
}
.cart-item-qty button:hover { background: #e5e7eb; }
.cart-item-qty span { width: 24px; text-align: center; font-size: 13px; color: #374151; font-weight: 600; }
.cart-item-remove {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    font-family: inherit;
}
.cart-item-remove:hover { color: #dc2626; }

/* POS: Totals row */
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #6b7280;
}
.total-row.grand {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    padding: 8px 0 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

/* POS: Payment modal */
.modal-payment .modal-content { max-width: 600px; }
.payment-method-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}
.payment-method-row:last-child { border-bottom: none; }

/* POS: Order type tabs */
.order-type-tabs {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
}
.order-type-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    border: none;
    background: transparent;
    font-family: inherit;
}
.order-type-tab.active { background: #B71C1C; color: white; }
.order-type-tab:hover:not(.active) { color: #374151; }

/* POS responsive: stack en mobile */
@media (max-width: 768px) {
    .pos-container { flex-direction: column; }
    .pos-cart { width: 100%; max-height: 50vh; border-right: none; border-top: 1px solid #e5e7eb; }
    .pos-catalog { border-right: none; }
    .pos-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ---- KDS ---- */
.kds-container {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    align-content: start;
    overflow-y: auto;
    height: calc(100vh - 130px);
}
.kds-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kds-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.kds-card-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}
.kds-card-body { padding: 12px 16px; }
.kds-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}
.kds-item {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}
.kds-item:last-child { border-bottom: none; }
.kds-item-name { font-weight: 500; color: #374151; }
.kds-item-mods { font-size: 12px; color: #9ca3af; padding-left: 16px; }
.kds-item-notes { font-size: 12px; color: #d97706; font-style: italic; padding-left: 16px; }

/* KDS timer colors */
.kds-timer { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kds-timer-green { color: #059669; }
.kds-timer-yellow { color: #d97706; }
.kds-timer-red { color: #dc2626; }

/* KDS status button */
.kds-status-btn {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
    flex: 1;
}
.kds-btn-preparar { background: #d97706; color: white; }
.kds-btn-preparar:hover { background: #b45309; }
.kds-btn-listo { background: #059669; color: white; }
.kds-btn-listo:hover { background: #047857; }

/* ---- MESAS ---- */
.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 16px;
}
.mesa-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.mesa-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.mesa-card:active { transform: scale(0.97); }
.mesa-card.libre { border-color: #059669; }
.mesa-card.ocupada { border-color: #dc2626; }
.mesa-card.reservada { border-color: #d97706; }
.mesa-card.limpieza { border-color: #2563eb; }

.mesa-card .mesa-numero {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}
.mesa-card .mesa-estado {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.mesa-card.libre .mesa-estado { color: #059669; }
.mesa-card.ocupada .mesa-estado { color: #dc2626; }
.mesa-card.reservada .mesa-estado { color: #d97706; }
.mesa-card.limpieza .mesa-estado { color: #2563eb; }

.mesa-card .mesa-info {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}
.mesa-card .mesa-total {
    font-size: 14px;
    font-weight: 600;
    color: #B71C1C;
    margin-top: 4px;
}

/* Area tabs */
.area-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
}
.area-tab {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    border: 1px solid transparent;
    background: transparent;
    white-space: nowrap;
    font-family: inherit;
}
.area-tab.active { background: #B71C1C; color: white; border-color: #B71C1C; }
.area-tab:hover:not(.active) { color: #374151; background: #f3f4f6; }

/* Context menu / popup para mesa */
.mesa-popup {
    position: fixed;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 40;
    min-width: 200px;
    animation: fadeIn 0.15s ease-out;
    overflow: hidden;
}
.mesa-popup-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}
.mesa-popup-item:hover { background: #f9fafb; }
.mesa-popup-divider { border-top: 1px solid #e5e7eb; }

/* Small button variant */
.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* ============================================================
 * FASE 3 - Back Office Styles
 * ============================================================ */

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    color: #6b7280;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.data-table td {
    padding: 10px 12px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.data-table tr:hover td {
    background: #f9fafb;
}
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }

/* Table actions */
.table-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.table-actions button {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.table-actions button:hover {
    border-color: #B71C1C;
    color: #B71C1C;
}

/* Alert badges for inventory */
.stock-alert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.stock-ok { background: rgba(5, 150, 105, 0.1); color: #059669; }
.stock-low { background: rgba(217, 119, 6, 0.1); color: #d97706; }
.stock-critical { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

/* Toolbar / Filter bar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.toolbar input,
.toolbar select {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}
.toolbar input:focus,
.toolbar select:focus {
    border-color: #B71C1C;
}
.toolbar .spacer { flex: 1; }

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}
.pagination button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
}
.pagination button:hover { border-color: #B71C1C; color: #B71C1C; }
.pagination button.active { background: #B71C1C; color: white; border-color: #B71C1C; }
.pagination button:disabled { opacity: 0.3; cursor: default; }
.pagination span { color: #6b7280; font-size: 13px; padding: 0 8px; }

/* Form inside modals */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #B71C1C;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Delivery cards */
.delivery-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.delivery-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.delivery-card .delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.delivery-card .delivery-address {
    color: #374151;
    font-size: 13px;
    margin-bottom: 8px;
}
.delivery-card .delivery-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
}

/* Delivery status colors */
.delivery-preparando { border-left: 3px solid #d97706; }
.delivery-en_camino { border-left: 3px solid #2563eb; }
.delivery-entregado { border-left: 3px solid #059669; }
.delivery-cancelado { border-left: 3px solid #dc2626; }

/* Stats mini cards for sections */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat-mini {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stat-mini .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}
.stat-mini .stat-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* Tabs generic */
.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    overflow-x: auto;
}
.tab-bar button {
    padding: 8px 16px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.15s;
}
.tab-bar button:hover { color: #374151; }
.tab-bar button.active {
    color: #B71C1C;
    border-bottom-color: #B71C1C;
}

/* ============================================================
 * FASE 4 - Reportes & Config Styles
 * ============================================================ */

/* Chart bars container */
.chart-bars {
    overflow-x: auto;
}

/* Range quick buttons */
.rango-btn {
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
}
.rango-btn:hover {
    border-color: #B71C1C;
    color: #B71C1C;
}

/* Permission checkboxes */
.perm-check {
    accent-color: #B71C1C;
    width: 14px;
    height: 14px;
}

/* JSON pre blocks */
pre {
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* Rol selector buttons */
.rol-btn {
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #374151;
    transition: all 0.15s;
}
.rol-btn:hover {
    border-color: #B71C1C;
}

/* Responsive tables */
@media (max-width: 768px) {
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px; }
    .form-row { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; }
    .toolbar .spacer { display: none; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* Print styles for reports */
@media print {
    body { background: white !important; color: black !important; }
    .tab-bar, .toolbar, .pagination, .table-actions, .btn-primary, .btn-secondary,
    button, nav, aside, #sidebar, #topbar { display: none !important; }
    .bg-cube-card { background: white !important; border: 1px solid #ddd !important; }
    .data-table th { color: #333 !important; border-bottom: 2px solid #333 !important; }
    .data-table td { color: #333 !important; border-bottom: 1px solid #ddd !important; }
    .stat-mini { border: 1px solid #ddd !important; background: white !important; }
    .stat-value, .text-gray-900 { color: #000 !important; }
    .text-cube-muted, .stat-label { color: #666 !important; }
    .badge { border: 1px solid #999 !important; }
    #page-content { padding: 0 !important; }
}
