/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Efectos de partículas en el fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, #ff6b6b 0%, transparent 70%),
        radial-gradient(circle at 75% 75%, #4ecdc4 0%, transparent 70%),
        radial-gradient(circle at 75% 25%, #45b7d1 0%, transparent 70%),
        radial-gradient(circle at 25% 75%, #96ceb4 0%, transparent 70%);
    opacity: 0.1;
    z-index: -1;
    animation: floatingBg 20s ease-in-out infinite;
}

@keyframes floatingBg {
    0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(0.5deg); }
    66% { transform: translate(-20px, 20px) rotate(-0.5deg); }
}

/* Estilos de scrollbar mejorados */
/* Scrollbar principal para toda la página */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(255, 255, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar con glassmorphism */
.navbar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand h2 {
    margin: 0;
    position: relative;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Desactivar efectos de movimiento en elementos críticos de navegación */
.nav-brand.float {
    animation: none;
}

.nav-user .btn {
    transform: none !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-user .btn:hover {
    transform: none !important;
}

/* Botones modernos con glassmorphism y efectos */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    border: 1px solid rgba(108, 117, 125, 0.5);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(90, 98, 104, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    color: white;
}

/* Navegación - desactivar transformaciones */
.nav-user .btn-secondary {
    transform: none !important;
    background: rgba(108, 117, 125, 0.8);
}

.nav-user .btn-secondary:hover {
    transform: none !important;
    background: rgba(90, 98, 104, 0.9);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.btn-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Tamaños de botones */
.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
    min-width: 40px;
    min-height: 36px;
    font-weight: 700;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Botón pequeño secundario con mejor visibilidad */
.btn-small.btn-secondary {
    background: rgba(108, 117, 125, 0.95);
    color: white;
    border: 2px solid rgba(108, 117, 125, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.4);
}

.btn-small.btn-secondary:hover {
    background: rgba(90, 98, 104, 1);
    border-color: rgba(90, 98, 104, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.6);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 16px;
}

.btn-info:hover {
    background-color: #117a8b;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #d2691e 0%, #ff8c00 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #d2691e;
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* Formularios modernos */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos específicos para inputs en modales */
.modal-content .form-group input,
.modal-content .form-group select {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: white;
}

/* Alineación específica para elementos en línea */
.form-group .input-with-button {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.form-group .input-with-button input {
    flex: 1;
    margin: 0;
}

.form-group .input-with-button button {
    margin: 0;
    flex-shrink: 0;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

.form-group input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.form-group input:focus::placeholder {
    color: rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.message {
    margin-top: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    display: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 12px;
}

.demo-credentials h4 {
    margin-bottom: 10px;
    color: #6c757d;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    color: #333;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.mesa-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    color: #333; /* Asegurar contraste del texto */
}

.mesa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #4facfe, #00f2fe);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mesa-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.mesa-card.libre {
    background: rgba(255, 255, 255, 0.95); /* Fondo sólido para mejor visibilidad */
    border: 2px solid rgba(79, 172, 254, 0.3);
}

.mesa-card.libre::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.mesa-card.ocupado {
    background: rgba(255, 255, 255, 0.95); /* Fondo sólido para mejor visibilidad */
    border: 2px solid rgba(255, 107, 107, 0.3);
}

.mesa-card.ocupado::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.mesa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.mesa-numero {
    font-size: 2.5em;
    font-weight: 800;
    color: #333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.btn-eliminar {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    font-size: 14px;
}

.btn-eliminar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
    background: linear-gradient(135deg, #ff3838, #ff2f2f);
}

.btn-eliminar:active {
    transform: scale(0.95);
}

.mesa-estado {
    padding: 8px 20px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Mejor contraste */
}

.mesa-estado::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.mesa-estado:hover::before {
    left: 100%;
}

.mesa-estado.libre {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.mesa-estado.ocupado {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.mesa-codigo {
    font-size: 0.9em;
    color: #555; /* Color más visible */
    margin-bottom: 15px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.15); /* Fondo más visible */
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-weight: 600;
}

.mesa-capacity {
    color: #555; /* Color más visible */
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Pedido */
.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pedido-info {
    display: flex;
    gap: 20px;
    color: #6c757d;
}

.pedido-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.productos-disponibles, .pedido-actual {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pedido-actual {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 10;
}

.pedido-actual::-webkit-scrollbar {
    width: 8px;
}

.pedido-actual::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.pedido-actual::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pedido-actual::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff5252 0%, #26a69a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buscador de productos */
.search-container {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #d2691e;
    background: white;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.search-filters {
    display: flex;
    gap: 10px;
}

.filter-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #d2691e;
}

.search-results-info {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.no-results h4 {
    margin-bottom: 10px;
    color: #666;
}

.producto-card.highlighted {
    border-color: #d2691e;
    background-color: #fff8f0;
}

/* Buscador de productos */
.search-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#searchInput {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#searchInput:focus {
    outline: none;
    border-color: #d2691e;
    background: white;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.search-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.search-filters select:focus {
    outline: none;
    border-color: #d2691e;
}

.search-results {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    display: none;
}

.search-results.show {
    display: block;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Cards de productos modernos */
.producto-card {
    border: none;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.producto-card:hover::before {
    transform: scaleX(1);
}

.producto-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px) scale(1.02);
}

.producto-card.no-disponible {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.7);
}

.producto-card.no-disponible::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.producto-nombre {
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
    line-height: 1.3;
}

.producto-precio {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.producto-descripcion {
    color: #666;
    font-size: 0.9em;
    margin-top: 8px;
    font-weight: 500;
}

.producto-categoria {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pedido-items {
    margin-bottom: 20px;
}

.pedido-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.item-nombre {
    font-weight: 500;
}

.item-cantidad {
    color: #6c757d;
    font-size: 0.9em;
}

.item-precio {
    font-weight: bold;
    color: #28a745;
}

.item-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.item-actions .btn-small {
    min-width: 32px;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Botones de cantidad específicos */
.item-actions .btn-small.btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #5a6268;
}

.item-actions .btn-small.btn-secondary:hover {
    background: #5a6268;
    border-color: #495057;
    transform: scale(1.1);
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.pedido-total {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.pedido-actions {
    text-align: center;
}

/* Ventas */
.ventas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filtros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resumen-ventas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resumen-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.resumen-total {
    font-size: 2em;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
}

.resumen-cantidad {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
    margin-top: 10px;
}

.ventas-tabla {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background-color: #f8f9fa;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px 10px;
    border-bottom: 1px solid #dee2e6;
}

table tr:hover {
    background-color: #f8f9fa;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Botones en modales - Mayor visibilidad */
.modal-content .btn {
    margin: 5px;
    min-height: 44px;
    font-weight: 600;
    text-shadow: none;
}

.modal-content .btn-secondary {
    background: #6c757d;
    color: white;
    border: 2px solid #5a6268;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.modal-content .btn-secondary:hover {
    background: #5a6268;
    border-color: #495057;
    color: white;
    transform: translateY(-1px);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.total-cobrar {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #e8f5e8;
    border-radius: 5px;
}

/* Responsive */

/* Tablets grandes y laptops pequeñas (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .modal-content {
        width: 85%;
    }
    
    .navbar .container {
        padding: 0 15px;
    }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .navbar .container {
        flex-direction: row;
        gap: 10px;
        padding: 0 12px;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 8px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        width: 90%;
        margin: 8% auto;
    }
}

/* Tablets y móviles grandes (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-user {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .pedido-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .pedido-actual {
        order: -1;
        position: sticky;
        top: 20px;
        max-height: 40vh;
        overflow-y: auto;
        margin-bottom: 20px;
        transition: top 0.3s ease;
    }
    
    body.navbar-hidden .pedido-actual {
        top: 0;
        max-height: 45vh;
    }
    
    /* Buscador responsive */
    .search-filters {
        flex-direction: column;
    }
    
    .search-input {
        font-size: 16px; /* Prevenir zoom en iOS */
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .filtros {
        justify-content: center;
    }
    
    .ventas-tabla {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    /* Buscador responsive para tablets */
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filters select {
        width: 100%;
    }
}

/* Móviles pequeños (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 8px;
    }
    
    .navbar {
        padding: 10px 0;
        transition: transform 0.3s ease;
    }
    
    .navbar.navbar-hidden {
        transform: translateY(-100%);
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 8px;
        padding: 0 8px;
    }
    
    .nav-brand h2 {
        font-size: 1.3em;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }
    
    .login-container {
        padding: 15px;
        margin: 10px;
    }
    
    .logo h1 {
        font-size: 1.8em;
    }
    
    .dashboard-header h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .action-buttons .btn,
    .action-buttons a {
        width: 100%;
        text-align: center;
    }
    
    .mesas-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mesa-card {
        padding: 15px;
    }
    
    .mesa-numero {
        font-size: 1.5em;
    }
    
    .productos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .producto-card {
        padding: 10px;
    }
    
    .producto-nombre {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .producto-precio {
        font-size: 14px;
    }
    
    .search-container {
        margin-bottom: 15px;
    }
    
    .search-input {
        font-size: 16px; /* Prevenir zoom en iOS */
        padding: 12px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 12px;
        width: 100%;
        margin: 2px 0;
    }
    
    .btn-small {
        padding: 6px 8px;
        font-size: 11px;
        width: auto;
        margin: 1px;
    }
    
    /* Mejorar tablas en móviles muy pequeños */
    .ventas-tabla {
        font-size: 11px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 500px;
    }
    
    table th,
    table td {
        padding: 6px 3px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    table th {
        position: sticky;
        top: 0;
        background-color: #f8f9fa;
        z-index: 10;
    }
    
    /* Botones más pequeños en tablas móviles */
    .ventas-tabla .btn {
        padding: 3px 6px;
        font-size: 10px;
        margin: 1px;
        width: auto;
    }
    
    /* Modales en móviles */
    .modal-content {
        margin: 5% auto;
        width: 98%;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-title {
        font-size: 1.3em;
    }
    
    /* Formularios en móviles */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Prevenir zoom en iOS */
        padding: 12px;
    }
    
    /* Pedidos en móviles */
    .pedido-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pedido-item {
        padding: 10px;
    }
    
    .item-cantidad {
        flex-direction: column;
        gap: 5px;
    }
    
    .cantidad-input {
        width: 80px;
        font-size: 16px;
    }
    
    /* Footer en móviles */
    .footer {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Botones más pequeños en tablas móviles */
    .ventas-tabla .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* Buscador responsive para móviles */
    .search-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    #searchInput {
        font-size: 16px; /* Prevenir zoom en iOS */
        padding: 10px 15px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 10px;
    .modal-content {
        width: 100%;
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
}
    /* Botones más pequeños en tablas móviles */
    .ventas-tabla .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* Buscador responsive para móviles */
    .search-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    #searchInput {
        font-size: 16px; /* Prevenir zoom en iOS */
        padding: 10px 15px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-filters select {
        padding: 10px 12px;
        font-size: 16px;
    }
}

/* Loading y estados */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Utilidades */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

/* Estados de productos */
.producto-disponible {
    border-color: #28a745;
}

.producto-no-disponible {
    border-color: #dc3545;
    background-color: #f8f9fa;
}

/* Cantidad input */
.cantidad-input {
    width: 60px;
    text-align: center;
    margin: 0 5px;
    min-height: 40px; /* Área táctil adecuada */
}

/* Mejoras de accesibilidad táctil */
@media (max-width: 768px) {
    /* Área táctil mínima de 44px para iOS/Android */
    .btn,
    button,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* Botones pequeños en móviles con mejor visibilidad */
    .btn-small {
        min-height: 36px;
        min-width: 36px;
        font-size: 14px;
        font-weight: 700;
        padding: 8px 12px;
    }
    
    /* Botones secundarios en móviles */
    .btn-secondary {
        background: #6c757d !important;
        color: white !important;
        border: 2px solid #5a6268 !important;
    }
    
    /* Mejorar inputs táctiles */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        min-height: 44px;
        font-size: 16px; /* Prevenir zoom automático en iOS */
        -webkit-appearance: none;
        appearance: none;
        border-radius: 6px;
    }
    
    /* Enlaces táctiles */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 10px 15px;
    }
    
    /* Scroll suave en móviles */
    * {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Evitar selección accidental de texto */
    .btn,
    .mesa-card,
    .producto-card {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Orientación landscape en móviles */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .navbar {
        padding: 8px 0;
    }
    
    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav-user {
        flex-direction: row;
        gap: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
}

/* Alto contraste para accesibilidad */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .mesa-card,
    .producto-card {
        border: 2px solid #333;
    }
    
    .navbar {
        border-bottom: 2px solid #fff;
    }
}

/* Reducir movimiento para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo oscuro básico */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .mesa-card,
    .producto-card,
    .modal-content {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
}

/* Alertas */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===== EFECTOS CREATIVOS Y ANIMACIONES ===== */

/* Loader moderno con efecto de ondas */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #667eea;
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: modernSpin 1s linear infinite;
}

@keyframes modernSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Efecto de aparición para las cards */
.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de pulso para elementos activos */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Efecto de brillo para botones */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.btn-shine:hover::after {
    left: 100%;
}

/* Efecto de ondas al hacer clic */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Efecto de flotación para elementos importantes */
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Efecto de rotación suave para iconos */
.rotate-on-hover {
    transition: transform 0.3s ease;
}

.rotate-on-hover:hover {
    transform: rotate(360deg);
}

/* Gradiente animado para fondos especiales */
.gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Efecto de neón para elementos destacados */
.neon-glow {
    text-shadow: 
        0 0 5px rgba(102, 126, 234, 0.5),
        0 0 10px rgba(102, 126, 234, 0.5),
        0 0 15px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.5);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow: 
            0 0 5px rgba(102, 126, 234, 0.5),
            0 0 10px rgba(102, 126, 234, 0.5),
            0 0 15px rgba(102, 126, 234, 0.5),
            0 0 20px rgba(102, 126, 234, 0.5);
    }
    to {
        text-shadow: 
            0 0 2px rgba(102, 126, 234, 0.8),
            0 0 5px rgba(102, 126, 234, 0.8),
            0 0 8px rgba(102, 126, 234, 0.8),
            0 0 12px rgba(102, 126, 234, 0.8);
    }
}

/* Efecto 3D elegante y simple para el logo */
.logo-3d {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    position: relative;
    animation: gentleFloat 4s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    transform: perspective(1000px) rotateX(15deg);
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: perspective(1000px) rotateX(15deg) translateY(0px);
    }
    50% { 
        transform: perspective(1000px) rotateX(15deg) translateY(-10px);
    }
}

/* Responsive para el logo 3D */
@media (max-width: 768px) {
    .logo-3d {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
}

/* Efecto de cristal para panels importantes */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Efectos de hover mejorados para interactividad */
.interactive-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Separadores con gradiente */
.gradient-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
    margin: 30px 0;
}

/* Efecto de escritura para títulos */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #667eea;
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s 1 normal both, blink 1s steps(2) infinite;
}

/* Desactivar typewriter en navegación */
.nav-user .typewriter {
    animation: none;
    border-right: none;
    overflow: visible;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: #667eea; }
}

/* Efectos especiales para búsqueda activa */
.search-container.searching {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

.search-container.searching #searchInput {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* Partículas de comida flotantes */
.floating-particle-food {
    user-select: none;
}

/* Efectos para modales mejorados */
.modal.fade-in {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estado de carga mejorado para grids */
.loading.glass-panel {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Mejoras para tarjetas de productos */
.producto-card.fade-in {
    animation-fill-mode: both;
}

.producto-card:hover .estado-icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Efectos para formularios */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Estilo para búsqueda mejorada */
#searchInput {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

/* Mejoras para navegación */
.nav-link:hover {
    transform: translateY(-2px);
}

/* Efectos para iconos de estado */
.estado-disponible { color: #28a745; }
.estado-no-disponible { color: #dc3545; }

/* Animaciones para cambios de estado */
.estado-change {
    animation: statusChange 0.5s ease-in-out;
}

@keyframes statusChange {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== MEJORAS DE VISIBILIDAD PARA BOTONES ===== */

/* Asegurar que todos los botones sean visibles */
.btn {
    position: relative;
    z-index: 1;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

/* Botones secundarios con alta visibilidad */
.btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 2px solid #5a6268 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #495057 !important;
    color: white !important;
}

/* Botones pequeños con mayor contraste */
.btn-small {
    min-width: 40px;
    min-height: 36px;
    font-size: 13px;
    font-weight: 700;
    border-width: 2px;
    border-style: solid;
}

.btn-small.btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border-color: #5a6268 !important;
}

/* Botones en item-actions específicamente */
.item-actions .btn {
    margin: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Botones en modales con máxima visibilidad */
.modal .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 2px solid #5a6268 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3) !important;
}

.modal .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #495057 !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.5) !important;
}

/* Botones de confirmación */
#confirmCancelBtn {
    background: #6c757d !important;
    color: white !important;
    border: 2px solid #5a6268 !important;
    font-weight: 600 !important;
}

/* Resetear efectos que puedan interferir */
.nav-user .btn-secondary {
    transform: none !important;
    animation: none !important;
    background: #6c757d !important;
    color: white !important;
}

/* ===== ESTILOS PARA BÚSQUEDA DE DOCUMENTOS ===== */

/* Contenedor de búsqueda de documentos */
.documento-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Input de documento */
#clienteDocumento {
    flex: 1;
    min-height: 44px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

#clienteDocumento:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Botón de búsqueda */
.btn-buscar {
    min-height: 44px;
    min-width: 120px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-buscar:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-buscar:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Grupo de formulario con búsqueda */
.form-group-search {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.form-group-search label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-group-search .documento-search-container {
    margin-bottom: 0;
}

/* Responsive para búsqueda de documentos */
@media (max-width: 768px) {
    .documento-search-container {
        flex-direction: column;
        gap: 8px;
    }
    
    #clienteDocumento {
        width: 100%;
    }
    
    .btn-buscar {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .btn-buscar {
        font-size: 12px;
        padding: 10px 16px;
    }
    
    #clienteDocumento {
        font-size: 16px; /* Prevenir zoom en iOS */
        padding: 10px 14px;
    }
}

/* ===== ESTILOS PARA FORM-ROW Y ALINEACIÓN ===== */

/* Contenedor form-row para alinear elementos horizontalmente */
.form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 200px;
}

.form-row .btn-buscar {
    flex-shrink: 0;
    margin-bottom: 0;
    align-self: flex-end;
}

/* Ajustar altura del input para alinearse con el botón */
.form-row #clienteDocumento {
    height: 44px;
    box-sizing: border-box;
    display: block;
}

/* Responsive para form-row */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-row .form-group {
        min-width: auto;
        width: 100%;
    }
    
    .form-row .btn-buscar {
        width: 100%;
        align-self: stretch;
    }
}

/* Información de documento */
.documento-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

.documento-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

/* Pedidos pendientes */
.pedidos-pendientes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

.pedido-pendiente-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pedido-pendiente-card:hover {
    border-color: #d2691e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pedido-pendiente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pedido-codigo {
    font-weight: bold;
    color: #d2691e;
    font-size: 16px;
}

.pedido-fecha {
    color: #666;
    font-size: 12px;
}

.pedido-cliente {
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
}

.pedido-total {
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.pedido-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.no-pedidos {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .pedido-pendiente-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pedido-actions {
        flex-direction: column;
    }
    
    .pedido-actions .btn {
        min-height: 44px;
        font-size: 14px;
    }
    
    .pedidos-pendientes-list {
        max-height: 50vh;
    }
}

/* Contador de pedidos pendientes */
.btn-with-badge {
    position: relative;
    display: inline-block;
}

.contador-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulseCount 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    border: 2px solid white;
    z-index: 10;
}

@keyframes pulseCount {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Modal de confirmación elegante */
.modal-confirm {
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header-danger {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    padding: 20px;
    text-align: center;
}

.modal-header-danger h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.confirm-icon {
    text-align: center;
    margin: 20px 0;
}

.confirm-icon i {
    font-size: 48px;
    color: #ff6b6b;
    opacity: 0.8;
}

.confirm-message {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.confirm-submessage {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
}

.modal-actions .btn {
    min-width: 120px;
}

/* Animación para el modal de confirmación */
.modal-confirm {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive para el contador */
@media (max-width: 768px) {
    .contador-badge {
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .btn-with-badge {
        margin: 2px; /* Pequeño margen para evitar que se corte */
    }
}
