/* Estilos generales */
body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    margin: 0;
    padding: 0;
    color: #e0e0e0;
    line-height: 1.4;
}

/* Estilos para las tarjetas de orden */
.order-card {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.order-info {
    flex: 1;
}

.order-main-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.order-id {
    background: #0a28d1;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.table-info, .location-info, .waiter-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    padding: 2px 8px;
    border-radius: 4px;
}

.table-info {
    background: #333;
    color: white;
}

.location-info {
    background: #555;
    color: white;
}

.waiter-info {
    background: #777;
    color: white;
}

.time-info {
    font-size: 0.85em;
    color: #aaa;
}

.time-details {
    display: flex;
    gap: 15px;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 10px;
}

.order-status.received {
    background-color: #ff9800;
    color: #000;
}

.order-status.preparing {
    background-color: #2196f3;
    color: white;
}

.order-status.ready {
    background-color: #4caf50;
    color: white;
}

.order-item-details {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

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

.quantity-badge {
    background: #0a28d1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
    font-size: 0.9em;
}

.item-name {
    font-weight: bold;
    color: white;
}

.item-comment {
    color: #ffa726;
    font-style: italic;
    font-size: 0.9em;
    width: 100%;
    margin-top: 4px;
    padding-left: 10px;
    border-left: 2px solid #ffa726;
}

.item-action-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-preparing {
    background: #ff9800;
}

.btn-preparing:hover {
    background: #f57c00;
}

.btn-ready {
    background: #4caf50;
}

.btn-ready:hover {
    background: #43a047;
}

.btn-completed {
    background: #757575;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #4caf50;
}

.notification.error {
    background-color: #f44336;
}

.notification.info {
    background-color: #2196f3;
}

/* Estilos para el estado de conexión */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff9800;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background-color: #4caf50;
    animation: none;
}

.status-dot.disconnected {
    background-color: #f44336;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Estilos para el contenedor de columnas */
.columns-container {
    display: flex;
    padding: 20px;
    gap: 20px;
    min-height: calc(100vh - 100px);
    overflow-x: auto;
}

.order-column {
    flex: 1;
    min-width: 300px;
    background: #121212;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-header {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px;
    margin: -15px -15px 15px -15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    text-align: center;
}

.received-header {
    background: #ff9800;
    color: #000;
}

.preparing-header {
    background: #2196f3;
    color: white;
}

.ready-header {
    background: #4caf50;
    color: white;
}

.orders-list {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 5px;
}

/* Personalización de la barra de desplazamiento */
.orders-list::-webkit-scrollbar {
    width: 6px;
}

.orders-list::-webkit-scrollbar-track {
    background: #252525;
    border-radius: 3px;
}

.orders-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.orders-list::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Estilos responsivos */
@media (max-width: 1024px) {
    .columns-container {
        flex-direction: column;
    }
    
    .order-column {
        min-width: 100%;
    }
}

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

.order-card {
    animation: fadeIn 0.3s ease-out;
}

/* Efecto de actualización */
@keyframes highlight {
    0% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: transparent; }
}

.order-card.highlight {
    animation: highlight 2s ease-out;
}

/* Estilos para el encabezado */
.header {
    background-color: #000000;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.reload-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reload-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(180deg);
}

.reload-button:active {
    transform: rotate(360deg);
}

.columns-container {
    display: flex;
    min-height: calc(100vh - 60px);
    padding: 15px;
    gap: 15px;
    background-color: #000000;
}

.order-column {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.column-header {
    padding: 12px 15px;
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 1.2em;
}

/* Colores específicos para cada estado */
.received-header {
    background-color: #0a28d1; /* Cambiado a azul */
}

.preparing-header {
    background-color: #ffab00;
    color: #333;
}

.ready-header {
    background-color: #00c853;
}

.orders-list {
    background-color: #000000;
    height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 10px;
}

.order-card {
    background-color: #000000 !important;  /* CAMBIO: Fondo negro oscuro en lugar de blanco */
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-left: 4px solid;
}

.received-card {
    border-left-color: #0a28d1;
}

.preparing-card {
    border-left-color: #ffab00;
}

.ready-card {
    border-left-color: #00c853;
}

.order-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.order-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

.close-table-hint {
    background-color: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.ready-to-close {
    box-shadow: 0 0 0 2px #4caf50;
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0% { box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.9); }
    100% { box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.5); }
}

.table-info {
    font-weight: 600;
    color: #fff;
    font-size: 1.1em;
}

.waiter-info {
    color: #b0b0b0;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.order-details {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #b0b0b0;
}

.order-details span {
    display: flex;
    align-items: center;
}

.order-details i {
    margin-right: 5px;
    font-size: 0.8em;
}

.time-info {
    color: #b0b0b0;
    font-size: 0.9em;
}

.order-items {
    margin-bottom: 12px;
}

.order-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: #000000 !important;  /* CAMBIO: Fondo negro oscuro en lugar de blanco */
    border-radius: 4px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.order-item:hover {
    background-color: #2a2a2a;  /* CAMBIO: Hover negro más claro */
}

.item-quantity {
    background-color: #3a3a3a;
    color: #fff;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 24px;
    text-align: center;
}

.item-name {
    color: #fff;
    flex: 1;
}

.item-comment {
    color: #aaa;
    font-size: 0.85em;
    font-style: italic;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.timer {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e0e0e0;
}

.timer .warning {
    color: #ffab00;
    font-weight: bold;
}

.timer .critical {
    color: #f44336;
    font-weight: bold;
    font-size: 1.1em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.orders-list::-webkit-scrollbar {
    width: 8px;
}

.orders-list::-webkit-scrollbar-track {
    background: #252525;
}

.orders-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.orders-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.no-orders {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 20px;
    color: #f44336;
    font-style: italic;
}
