/**
 * BarManager Pro - Complete Stylesheet
 * Version: 2.0.0
 * Author: Wolf Sistemas
 * Description: Estilos completos para sistema de gestión de bares CON IMÁGENES
 */

/* ====== VARIABLES CSS ====== */
:root {
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary-color: #2c3e50;
    --background-color: #1a1a1a;
    --surface-color: #2d2d2d;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --gradient-primary: linear-gradient(135deg, #ff6b35, #f7931e);
    --gradient-dark: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== RESET Y ESTILOS BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

#app {
    position: relative;
    min-height: 100vh;
    background: var(--background-color);
}

/* ====== COMPONENTES REUTILIZABLES ====== */

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

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

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: #d68910;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ====== SCREENS Y ANIMACIONES ====== */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: block;
}

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

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

@keyframes pulseWarning {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(243, 156, 18, 0.4); 
    }
    50% { 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(243, 156, 18, 0); 
    }
}

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

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

/* ====== LOGIN SCREEN ====== */
#login-screen {
    display: none;
    justify-content: center;
    align-items: center;
    background: var(--gradient-dark);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

#login-screen.active {
    display: flex;
    z-index: 2001;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.1), transparent),
                radial-gradient(circle at 70% 80%, rgba(247, 147, 30, 0.1), transparent);
}

.login-container {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ====== MAIN SCREEN ====== */
#main-screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: var(--background-color);
}

#main-screen.active {
    display: block;
    z-index: 1;
}

/* ====== HEADER ====== */
.header {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    margin-bottom: 0;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.time {
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.connection-status {
    animation: fadeIn 0.5s ease;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ====== BARRA DE LOGO PERSONALIZADO ====== */
.custom-logo-bar {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 60px;
}

.custom-logo {
    max-height: 40px;
    max-width: 80px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.custom-bar-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ====== NAVIGATION ====== */
.nav-tabs {
    background: var(--surface-color);
    display: flex;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    position: relative;
    font-size: 14px;
}

.nav-tab:hover {
    color: var(--text-color);
    background: rgba(255, 107, 53, 0.1);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

/* ====== MAIN CONTENT ====== */
.main-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* ====== FORMULARIOS ====== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ====== BARRA LAYOUT ====== */
.barra-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100vh - 250px);
}

.productos-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

/* ====== BÚSQUEDA Y FILTROS ====== */
.search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.search-bar input,
.search-bar select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-color);
    transition: var(--transition);
}

.search-bar input {
    flex: 1;
}

.search-bar input:focus,
.search-bar select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ====== PRODUCTOS GRID ====== */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    overflow-y: auto;
    flex: 1;
    padding-right: 10px;
}

.productos-grid::-webkit-scrollbar {
    width: 6px;
}

.productos-grid::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 3px;
}

.productos-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ====== PRODUCTO CARD CON IMAGEN ====== */
.producto-card {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.3);
    border-color: var(--primary-color);
}

.producto-card:hover::before {
    opacity: 0.1;
}

.producto-card.stock-bajo {
    border-color: var(--warning-color);
    animation: pulseWarning 2s infinite;
    background: linear-gradient(145deg, #3d2d1d, #2a1a0a);
}

/* IMAGEN DEL PRODUCTO */
.product-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #333, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

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

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

.product-image-placeholder {
    font-size: 2.5rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* CONTENIDO DEL PRODUCTO */
.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.producto-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.categoria {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.precio {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stock {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    width: fit-content;
}

.producto-card.stock-bajo .stock {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

/* ====== PREVIEW DE IMAGEN EN MODALES ====== */
#product-image-preview,
#logo-preview {
    padding: 15px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    transition: var(--transition);
}

#product-image-preview.has-image,
#logo-preview.has-image {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

#product-preview-img,
#preview-img {
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#product-preview-img:hover,
#preview-img:hover {
    transform: scale(1.05);
}

/* ====== PEDIDO SECTION ====== */
.pedido-section {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.pedido-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.pedido-header select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-color);
    color: var(--text-color);
    font-weight: 600;
    min-width: 150px;
}

.pedido-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 25px;
    background: var(--background-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 15px;
    min-height: 200px;
}

.pedido-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.pedido-item:hover {
    background: var(--background-color);
    border-radius: 8px;
    border-bottom: 1px solid transparent;
    margin: 0 -5px;
    padding: 15px 20px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text-color);
}

.item-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity {
    margin: 0 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-weight: bold;
}

.quantity-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* ====== PEDIDO TOTAL ====== */
.pedido-total {
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
    margin-bottom: 25px;
    background: var(--background-color);
    border-radius: 15px;
    padding: 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.total-line input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface-color);
    color: var(--text-color);
    text-align: right;
}

.total-line.total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
}

.pedido-actions {
    display: flex;
    gap: 15px;
}

.pedido-actions .btn {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* ====== MESAS GRID ====== */
.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.mesa-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.mesa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.mesa-card > * {
    position: relative;
    z-index: 1;
}

.mesa-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.mesa-card:hover::before {
    opacity: 0.1;
}

.mesa-card.disponible {
    border-color: var(--success-color);
}

.mesa-card.ocupada {
    border-color: var(--danger-color);
}

.mesa-card.sucia {
    border-color: var(--warning-color);
}

.mesa-numero {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.mesa-estado {
    text-transform: capitalize;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ====== MODALES ====== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    animation: slideInUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* ====== PAYMENT METHODS ====== */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.payment-method {
    padding: 20px;
    border: 2px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.payment-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.payment-summary {
    text-align: center;
    font-size: 1.2rem;
    margin: 20px 0;
    padding: 15px;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

/* ====== TABLAS ====== */
.table-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    overflow-x: auto;
}

.stock-table,
.fiados-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.stock-table th,
.stock-table td,
.fiados-table th,
.fiados-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stock-table th,
.fiados-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.stock-table tr:hover,
.fiados-table tr:hover {
    background: var(--background-color);
}

.stock-table tr.stock-bajo {
    background: rgba(243, 156, 18, 0.1);
}

/* ====== INVENTARIO ====== */
.inventario-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.inventario-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
}

.inventario-card h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.inventario-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inventario-filters input,
.inventario-filters select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-color);
}

.inventario-filters input {
    flex: 1;
    min-width: 200px;
}

/* ====== FIADOS ====== */
.fiados-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fiados-card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.fiados-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fiados-card h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount {
    font-size: 1.8rem;
    font-weight: bold;
}

.fiados-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fiados-filters input,
.fiados-filters select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-color);
    min-width: 150px;
}

.fiados-filters input {
    flex: 1;
    min-width: 200px;
}

/* ====== REPORTES ====== */
.reportes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.reporte-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
}

.reporte-card h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ====== CAJA ====== */
.caja-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.caja-card {
    background: var(--background-color);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
}

.caja-card h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.caja-card .amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--success-color);
}

/* ====== CONFIGURACIÓN ====== */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.config-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
}

.config-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* ====== SOUND CONTROLS ====== */
.sound-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.sound-control label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.volume-slider:hover {
    opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* ====== FOOTER CREDITS ====== */
.footer-credits {
    position: fixed;
    bottom: 15px;
    right: 20px;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95), rgba(26, 26, 26, 0.95));
    backdrop-filter: blur(15px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.footer-credits .wolf-logo {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.footer-credits:hover {
    background: linear-gradient(135deg, rgba(45, 45, 45, 1), rgba(26, 26, 26, 1));
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.footer-credits:hover .wolf-logo {
    color: #ffffff;
}

/* ====== NOTIFICACIONES ====== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

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

/* ====== LOADING SPINNER ====== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ====== OFFLINE BANNER ====== */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning-color);
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 2000;
    font-weight: bold;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-banner.show {
    transform: translateY(0);
}

/* ====== CUENTAS DE BARRA ====== */
.cuentas-barra-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.cuentas-barra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cuenta-barra-card {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cuenta-barra-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.cuenta-barra-card > * {
    position: relative;
    z-index: 1;
}

.cuenta-barra-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.3);
    border-color: var(--primary-color);
}

.cuenta-barra-card:hover::before {
    opacity: 0.1;
}

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

.cuenta-cliente {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.cuenta-hora {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.cuenta-items {
    margin: 15px 0;
    max-height: 120px;
    overflow-y: auto;
}

.cuenta-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.cuenta-total {
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--success-color);
    margin: 15px 0;
    padding: 10px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
}

.cuenta-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cuenta-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

.cuentas-barra-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1200px) {
    .barra-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    .nav-tabs {
        padding: 0 15px;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .inventario-grid,
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .footer-credits {
        bottom: 10px;
        right: 10px;
        font-size: 10px;
        padding: 8px 15px;
    }
    
    .footer-credits .wolf-logo {
        font-size: 11px;
    }
    
    .header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .barra-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .fiados-filters,
    .inventario-filters {
        flex-direction: column;
    }
    
    .fiados-filters input,
    .fiados-filters select,
    .inventario-filters input,
    .inventario-filters select {
        min-width: auto;
    }

    /* RESPONSIVE PARA IMÁGENES */
    .product-image-container {
        height: 100px;
    }
    
    .producto-card {
        min-height: 200px;
    }
    
    .producto-card h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .producto-card {
        min-height: 180px;
    }
    
    .product-image-container {
        height: 80px;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .producto-card h4 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .precio {
        font-size: 1.1rem;
    }
    
    .modal-content {
        padding: 15px;
        margin: 5px;
    }
    
    .payment-methods {
        gap: 10px;
    }
    
    .payment-method {
        padding: 15px;
        font-size: 14px;
    }
    
    .nav-tab {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ====== PRINT STYLES ====== */
@media print {
    .header,
    .nav-tabs,
    .footer-credits,
    .btn,
    .notification {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        max-width: none;
    }
    
    .modal {
        position: relative;
        background: white;
        color: black;
    }
    
    .modal-content {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.nav-tab:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* ====== DARK MODE TOGGLE ====== */
@media (prefers-color-scheme: light) {
    .theme-auto {
        --background-color: #ffffff;
        --surface-color: #f8f9fa;
        --text-color: #212529;
        --text-secondary: #6c757d;
        --border-color: #dee2e6;
    }
}

/* ====== SCROLLBAR PERSONALIZADO ====== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--background-color);
}

/* ====== FIN DE ESTILOS ====== */

/* ====== MEJORAS ADICIONALES PARA REPORTES Y CONFIGURACIÓN ====== */

/* Items individuales de reporte */
.report-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-item:last-child {
    border-bottom: none;
}

/* Checkboxes más visibles en configuración */
.config-section input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 5px;
}

/* Ajuste de impresión para tickets claros */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
}
/* ====== CORRECCIONES CSS FALTANTES PARA BARMANAGER PRO ====== */

/* 1. BOTÓN INFO FALTANTE */
.btn-info {
    background: #17a2b8;
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4);
}

/* 2. CALCULADORA DE MÁRGENES */
#margin-calculator {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #e74c3c));
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#margin-calculator .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.margin-stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
}

.margin-stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.margin-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

#margin-recommendation {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
}

/* 3. LISTA DE USUARIOS EN CONFIGURACIÓN */
#users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.user-item:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: bold;
    color: var(--text-color);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    gap: 8px;
}

/* 4. REPORTE DIARIO */
#daily-report {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
}

.daily-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.daily-report-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 5. MOVIMIENTOS RECIENTES EN INVENTARIO */
#movimientos-recientes {
    max-height: 200px;
    overflow-y: auto;
}

.movimiento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

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

.movimiento-tipo {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.movimiento-tipo.entrada {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

.movimiento-tipo.salida {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

/* 6. ALERTAS DE STOCK BAJO */
#stock-alerts {
    max-height: 200px;
    overflow-y: auto;
}

.stock-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(243, 156, 18, 0.1);
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid var(--warning-color);
}

.stock-alert-item:last-child {
    margin-bottom: 0;
}

.alert-product {
    font-weight: bold;
    color: var(--text-color);
}

.alert-stock {
    font-size: 12px;
    color: var(--warning-color);
    font-weight: bold;
}

/* 7. TOP PRODUCTOS CON RENTABILIDAD */
#top-products-report {
    max-height: 300px;
    overflow-y: auto;
}

.top-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.top-product-item:hover {
    background: var(--background-color);
    border-radius: 6px;
    border-bottom: 1px solid transparent;
}

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

.product-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.product-details {
    flex: 1;
    margin-left: 15px;
}

.product-name {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 2px;
}

.product-stats {
    font-size: 11px;
    color: var(--text-secondary);
}

.product-revenue {
    text-align: right;
    font-weight: bold;
    color: var(--success-color);
}

/* 8. MEJORAS PARA DISPOSITIVOS MUY PEQUEÑOS */
@media (max-width: 360px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .product-image-container {
        height: 60px;
    }
    
    .product-content {
        padding: 10px;
    }
    
    .precio {
        font-size: 1rem;
    }
    
    .margin-stat-item {
        padding: 10px;
    }
    
    .margin-stat-value {
        font-size: 18px;
    }
    
    #margin-calculator {
        padding: 15px;
    }
    
    #margin-calculator .stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* 9. ESTADOS MEJORADOS PARA ELEMENTOS INTERACTIVOS */
.payment-method:focus,
.nav-tab:focus,
.producto-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 10. LOADING SPINNER MEJORADO */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 11. MEJORAS PARA TABLAS EN MÓVILES */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .stock-table,
    .fiados-table {
        min-width: 600px;
    }
    
    .stock-table th,
    .stock-table td,
    .fiados-table th,
    .fiados-table td {
        padding: 8px;
        font-size: 12px;
    }
}

/* 12. CUENTAS DE BARRA VACÍAS MEJORADAS */
.cuentas-barra-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    font-style: italic;
}

.cuentas-barra-empty:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

/* 13. ESTILOS PARA FILTROS DE MARGEN */
#inventario-margin-filter {
    min-width: 150px;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
}

/* 14. PREVIEW DE CUENTA BARRA */
#cuenta-pedido-preview {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* 15. INFORMACIÓN DE CERRAR CUENTA */
#cerrar-cuenta-info {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.cuenta-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cuenta-info-cliente {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.cuenta-info-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}
/* ====== ESTILOS PARA MODALES PIN ====== */

/* Lista de PINs */
#pins-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.pin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pin-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pin-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pin-user-name {
    font-weight: bold;
    color: var(--text-color);
    font-size: 14px;
}

.pin-user-role {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.pin-user-permissions {
    font-size: 10px;
    color: var(--primary-color);
    margin-top: 2px;
}

.pin-actions {
    display: flex;
    gap: 8px;
}

.pin-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* Teclado numérico PIN */
#pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

.pin-key {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-key:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.pin-key:active {
    transform: scale(0.95);
}

#pin-clear,
#pin-backspace {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    font-size: 1.2rem;
}

#pin-clear:hover,
#pin-backspace:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Display del PIN */
#pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.pin-digit {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    background: var(--surface-color);
    transition: var(--transition);
}

.pin-digit.filled {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.pin-digit.error {
    border-color: var(--danger-color);
    background: var(--danger-color);
    color: white;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Botón de login PIN */
#pin-login-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

#pin-login-submit:not(:disabled) {
    background: var(--success-color);
    border-color: var(--success-color);
}

#pin-login-submit:not(:disabled):hover {
    background: #219a52;
    transform: translateY(-2px);
}

/* Lista vacía de PINs */
.pins-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    font-style: italic;
}

.pins-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Status indicadores */
.pin-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.pin-status.active {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

.pin-status.inactive {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

/* Permisos checkboxes */
.pin-permissions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.pin-permissions label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.pin-permissions label:hover {
    background: rgba(255, 107, 53, 0.1);
}

.pin-permissions input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* Horarios de trabajo */
.pin-schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.pin-schedule input[type="time"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 13px;
}

/* Responsive para PIN modals */
@media (max-width: 480px) {
    .pin-key {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    #pin-keypad {
        gap: 10px;
        max-width: 240px;
    }
    
    .pin-digit {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    #pin-display {
        gap: 10px;
    }
    
    .pin-permissions {
        grid-template-columns: 1fr;
    }
    
    .pin-schedule {
        grid-template-columns: 1fr;
    }
}

/* Animación de entrada para PIN modal */
#pin-login-modal.active .modal-content {
    animation: slideInUp 0.3s ease, pinGlow 2s ease-in-out infinite;
}

@keyframes pinGlow {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); 
    }
    50% { 
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3); 
    }
}

/* Estados de validación para PIN form */
.pin-input-error {
    border-color: var(--danger-color) !important;
    background: rgba(231, 76, 60, 0.1) !important;
}

.pin-input-success {
    border-color: var(--success-color) !important;
    background: rgba(39, 174, 96, 0.1) !important;
}

/* Mensaje de error PIN */
.pin-error-message {
    color: var(--danger-color);
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 6px;
    display: none;
}

.pin-error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}
/* FIX PARA MÓVILES VERTICALES */
@media (max-width: 768px) and (orientation: portrait) {
    .barra-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: calc(100vh - 200px);
    }
    
    .productos-section {
        height: auto !important;
        min-height: 400px;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .pedido-section {
        margin-top: 20px;
        position: relative !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .productos-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    }
}