/* KEIKO Sushi - Estilos Minimalistas */

:root {
    --primary: #D97757;
    --primary-dark: #C46647;
    --primary-light: #E8A488;
    --accent: #F5A623;
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --text: #2C2C2C;
    --text-secondary: #757575;
    --border: #E0E0E0;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Pantallas */
.screen {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
}

.screen.active {
    display: block;
}

/* Login */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);
}

.logo {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.input-group .material-icons {
    color: var(--text-secondary);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem 0;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

/* Botones */
.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 100%;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg);
}

.icon-btn .material-icons {
    font-size: 1.5rem;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Header */
.header {
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

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

/* Tab Bar */
.tab-bar {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
    position: sticky;
    top: 64px;
    z-index: 90;
}

.tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

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

/* Views */
.view {
    display: none;
    padding: 1.5rem;
}

.view.active {
    display: block;
}

/* Categorías */
.categories-list {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.categories-list::-webkit-scrollbar {
    display: none;
}

.category-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

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

.product-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.product-prices {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: auto;
}

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

.price strong {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Carrito */
.carrito-items {
    margin-bottom: 1rem;
}

/* Selector de órdenes */
.ordenes-selector {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.orden-item {
    transition: all 0.2s ease;
}

.orden-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.orden-item.active {
    border-color: var(--primary) !important;
}

/* Botones de teléfono para Delivery */
.btn-phone, .btn-whatsapp {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-phone:hover, .btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.btn-phone:active, .btn-whatsapp:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.carrito-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.carrito-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.carrito-item-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.carrito-item-price {
    text-align: right;
    margin-left: 1rem;
}

.carrito-item-price .price {
    display: block;
    font-size: 0.9rem;
}

.carrito-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.carrito-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 8px var(--shadow);
    z-index: 100;
}

.total-info {
    margin-bottom: 1rem;
}

.total-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.total-item strong {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Comandas */
.comandas-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comanda-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.comanda-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.comanda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comanda-numero {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

.comanda-estado {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.estado-pendiente {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.estado-en_proceso {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.estado-finalizado {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.comanda-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.comanda-total {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
}

/* Cocina */
.cocina-filters {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 90;
}

.filter-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cocina-comandas {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cocina-comanda-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

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

.cocina-comanda-items {
    margin-bottom: 1rem;
}

.cocina-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

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

.cocina-comanda-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-estado {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-estado.btn-pendiente {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.btn-estado.btn-proceso {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.btn-estado.btn-finalizado {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

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

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-content.large {
    max-width: 600px;
}

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

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

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

.modal-footer .btn {
    flex: 1;
}

/* Producto Modal */
.product-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-prices {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-prices .price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.quantity-selector input {
    width: 60px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    background: transparent;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: var(--primary);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary);
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    background: var(--bg);
}

.payment-option input[type="radio"] {
    margin-right: 0.75rem;
    width: auto;
}

/* Campos de Pago Móvil */
#pago-movil-fields input,
#monto-pagado-fields input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#pago-movil-fields input:focus,
#monto-pagado-fields input:focus {
    border-color: var(--primary);
}

#monto-pagado-fields small {
    display: block;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

/* Error Message */
.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-image {
        height: 100px;
    }

    .modal-content {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Reportes */
.reportes-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Delivery Historial View */
.delivery-historial-view {
    padding: 1rem;
}

.historial-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.historial-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
}

.historial-header .form-group {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.historial-header .form-group label {
    margin: 0;
    white-space: nowrap;
}

/* Gastos */
.gastos-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gastos-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gastos-header .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.gastos-header .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gastos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gasto-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.gasto-card:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.reportes-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.reportes-header .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.reportes-header .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reporte-content {
    padding: 1rem 0;
}

.reporte-diario {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.reporte-header {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.reporte-header h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.reporte-fecha {
    color: var(--text-secondary);
    font-size: 1rem;
}

.reporte-header-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.reporte-header-icon {
    font-size: 3rem;
    line-height: 1;
}

.reporte-header-content {
    flex: 1;
}

.reporte-header-content h2 {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
}

.reporte-fecha-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(217, 119, 87, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reporte-fecha-badge .material-icons {
    font-size: 1.1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
}

.section-title .material-icons {
    font-size: 1.5rem;
    color: var(--primary);
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: 700;
}

.top-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(217, 119, 87, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.reporte-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.reporte-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
}

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

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

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

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.reporte-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.reporte-table thead {
    background: var(--bg);
    border-bottom: 2px solid var(--border);
}

.reporte-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text);
}

.reporte-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.reporte-table tbody tr:hover {
    background: var(--bg);
}

.comandas-reporte-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.comanda-reporte-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.comanda-reporte-card:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.comanda-reporte-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.comanda-reporte-header strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    white-space: nowrap;
    min-width: 100px;
}

.estado-badge.estado-pendiente {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.12) 0%, rgba(255, 152, 0, 0.06) 100%);
    color: var(--warning);
    border-color: rgba(255, 152, 0, 0.25);
}

.estado-badge.estado-en_proceso {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.12) 0%, rgba(33, 150, 243, 0.06) 100%);
    color: #2196F3;
    border-color: rgba(33, 150, 243, 0.25);
}

.estado-badge.estado-finalizado {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(76, 175, 80, 0.06) 100%);
    color: var(--success);
    border-color: rgba(76, 175, 80, 0.25);
}

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

.reporte-table-styled thead th {
    color: white;
}

.reporte-table-styled thead th .material-icons {
    font-size: 1.2rem;
    vertical-align: middle;
    margin-right: 0.5rem;
    opacity: 0.95;
}

.reporte-table-styled tbody tr.even {
    background: var(--bg-card);
}

.reporte-table-styled tbody tr.odd {
    background: rgba(0, 0, 0, 0.02);
}

.reporte-table-styled tbody tr:hover {
    background: rgba(217, 119, 87, 0.1);
}

.reporte-table-styled tbody td {
    padding: 1.25rem 1.5rem;
}

.reporte-table-resumen {
    min-width: 600px;
}

.reporte-table-comandas {
    min-width: 1200px;
}

.table-cell-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.table-cell-number {
    text-align: center;
    font-weight: 700;
    color: var(--primary);
}

.table-cell-money {
    text-align: right;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
}

.table-cell-time {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tipo-pedido-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 80px;
}

.delivery-badge {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.local-badge {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.15) 0%, rgba(156, 39, 176, 0.08) 100%);
    color: #9C27B0;
    border: 1px solid rgba(156, 39, 176, 0.25);
}

.tipo-pedido-badge .material-icons {
    font-size: 1.1rem;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(217, 119, 87, 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.payment-badge .material-icons {
    font-size: 1.1rem;
}

.comanda-reporte-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.comanda-reporte-info div {
    display: flex;
    gap: 0.25rem;
}

.comanda-reporte-items {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.85rem;
}

.comanda-item-small {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border);
}

.comanda-item-small:last-child {
    border-bottom: none;
}

.comanda-reporte-total {
    padding-top: 0.75rem;
    border-top: 2px solid var(--border);
    font-size: 1rem;
    color: var(--text);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Administración de Usuarios */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

.tab.active,
.tab[style*="border-bottom-color: var(--primary)"] {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.ajustes-section {
    animation: fadeIn 0.3s ease;
}

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

select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reportes-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reportes-header .form-group {
        width: 100%;
    }
    
    .reporte-table {
        font-size: 0.8rem;
    }
    
    .reporte-table th,
    .reporte-table td,
    .reporte-table-styled thead th,
    .reporte-table-styled tbody td {
        padding: 1rem;
    }

    .reporte-table-comandas {
        min-width: 1400px;
    }

    .estado-badge,
    .tipo-pedido-badge {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
        min-width: auto;
    }

    .estado-badge {
        min-width: 80px;
    }
    
    .comanda-reporte-info {
        grid-template-columns: 1fr;
    }
}
