@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #ff8c00;
    --secondary: #ffcc00;
    --accent: #e94560;
    --bg: #0f1115;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --success: #00e676;
    --danger: #ff4d6d;
    --danger-glass: rgba(255, 77, 109, 0.1);
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.03);
    --login-bg: #0b0d11;
}

/* Scrollbar Global */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--glass);
    border-radius: 5px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}

/* Login Page Specific Styles */
.login-page {
    background-color: var(--login-bg);
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.bg-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-duration: 25s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    top: 40%;
    left: 20%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(100px, 100px) rotate(360deg) scale(1.2); }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.3);
}

.brand h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.input-wrapper input, 
.input-wrapper select {
    padding-left: 2.8rem;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-wrapper input:focus + i,
.input-wrapper select:focus + i {
    color: var(--primary);
}

.btn-login {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(233, 69, 96, 0.4);
    filter: brightness(1.1);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login.loading {
    opacity: 0.8;
    cursor: wait;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 1.2rem;
    text-align: center;
    min-height: 1.2rem;
}


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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

.nav-links { display: flex; gap: 1rem; }

nav button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.3s;
    border-radius: 8px;
}

nav button.active {
    color: var(--primary);
    background: rgba(255, 140, 0, 0.1);
}

.btn-logout { color: var(--danger) !important; }

.nav-badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 5px;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


.view-section {
    padding: 2rem;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active { display: block; }

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

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Product Cards */
.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.product-card img { width: 100%; height: 180px; object-fit: cover; }

.product-info { padding: 1.5rem; }

.product-info h3 { margin-bottom: 0.5rem; }

.product-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.price-tag { font-size: 1.25rem; font-weight: 800; color: var(--secondary); }

.btn-add {
    background: linear-gradient(135deg, var(--primary), #ffb700);
    color: white;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3);
}

.btn-add:active {
    transform: translateY(0) scale(0.98);
}


/* Cart Float */
.cart-float {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(255, 140, 0, 0.4);
    display: none;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp { from { bottom: -50px; } to { bottom: 2rem; } }

.btn-checkout {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 800;
    cursor: pointer;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #1a1c23;
    padding: 2rem;
    border-radius: 25px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

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

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: rotate(90deg);
}

/* Personalizar barra de desplazamiento del modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.modal-content h3 { margin-bottom: 1.5rem; color: var(--primary); }

textarea {
    width: 100%;
    height: 90px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: white;
    padding: 1rem;
    border-radius: 15px;
    margin: 1rem 0;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}


.modal-actions { 
    display: flex; 
    gap: 1rem; 
    margin-top: 2rem; 
}

.modal-actions button {
    flex: 1;
    padding: 1.1rem;
    border-radius: 16px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel { 
    background: rgba(255, 255, 255, 0.08); 
    color: white; 
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-confirm { 
    background: linear-gradient(135deg, var(--primary), #ff6f00); 
    color: white;
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.2);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 140, 0, 0.3);
}

.btn-confirm:active {
    transform: scale(0.98);
}

/* Adaptive for Mobile */
@media (max-width: 600px) {
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .btn-checkout {
        width: 100%;
    }
}


/* Admin Lists */
.admin-list { margin-top: 1rem; }

.order-card {
    background: #1e222d;
    padding: 2rem;
    border-radius: 25px;
    border-left: 10px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card.preparing { border-left-color: var(--secondary); background: rgba(255, 204, 0, 0.05); }
.order-card.ready { border-left-color: var(--success); }

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    font-size: 1.2rem;
}

.order-details { font-size: 1.1rem; line-height: 1.6; }

.btn-status {
    width: 100%;
    margin-top: auto;
    padding: 1.2rem;
    border-radius: 15px;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
}

.btn-status:active { transform: scale(0.95); }

.admin-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.admin-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(5px);
}

.admin-item button {
    background: rgba(255, 140, 0, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-item button:hover {
    background: var(--primary);
    color: white;
}
/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
    z-index: 9999;
    font-weight: 700;
    animation: slideInRight 0.5s ease-out;
}

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

/* Extra Options */
.extras-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.extra-option {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 600;
}

.extra-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.extra-option.selected { 
    border-color: var(--primary); 
    background: rgba(255, 140, 0, 0.15); 
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.1);
}


.checkout-item {
    background: rgba(255,255,255,0.02);
    padding: 0.8rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.extras-preview { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.extras-preview span {
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    padding: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-icon.active {
    background: rgba(255, 140, 0, 0.15);
    color: var(--primary);
}

.note-expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s;
    opacity: 0;
}

.note-expandable.expanded {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
}


input, select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s;
}

select option {
    background: #1e222d;
    color: white;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

.loading-input {
    opacity: 0.6;
    cursor: wait;
    background: rgba(255, 140, 0, 0.05) !important;
}


input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Fix for Select dropdown icon in some browsers */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.btn-small { 
    padding: 0.6rem 1rem; 
    font-size: 0.85rem; 
    border-radius: 10px; 
    cursor: pointer; 
    border: none;
    font-weight: 600;
    transition: 0.2s;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}


.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-small.btn-cancel {
    background: rgba(255, 77, 109, 0.1);
    color: var(--danger);
}

.btn-small.btn-cancel:hover {
    background: rgba(255, 77, 109, 0.2);
}

.btn-small.btn-primary {
    background: rgba(255, 140, 0, 0.1);
    color: var(--primary);
}

.btn-small.btn-primary:hover {
    background: rgba(255, 140, 0, 0.2);
}


/* Cocina Card Extras */
.order-card .obs { background: rgba(233, 69, 96, 0.1); color: var(--accent); padding: 0.5rem; border-radius: 8px; margin-top: 1rem; font-size: 0.85rem; }

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge.pendiente { background: rgba(255, 140, 0, 0.2); color: var(--primary); }
.badge.preparando { background: rgba(255, 204, 0, 0.2); color: var(--secondary); }
.badge.listo { background: rgba(0, 230, 118, 0.2); color: var(--success); }
.badge.despachado { background: rgba(0, 184, 212, 0.2); color: #00b8d4; }
.badge.cobrado { background: rgba(160, 160, 160, 0.2); color: var(--text-muted); }
.btn-standby {
    background: rgba(255, 204, 0, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(255, 204, 0, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.btn-standby:hover {
    background: rgba(255, 204, 0, 0.2);
    transform: translateY(-2px);
}

.btn-standby-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary);
    color: var(--bg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(255, 204, 0, 0.4);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.5rem;
    border: none;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-standby-float:hover {
    transform: scale(1.1) rotate(15deg);
}

.btn-standby-float span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
}

.standby-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

/* Asegurar que SweetAlert2 esté por encima de todo */
.swal2-container {
    z-index: 10000 !important;
}

.order-card.ready-payment {
    border-left-color: var(--success) !important;
    background: linear-gradient(145deg, rgba(0, 230, 118, 0.05), rgba(30, 34, 45, 1));
}

.btn-pay {
    background: linear-gradient(135deg, var(--primary), #ffb700);
    color: white;
    border: none;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.2);

    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 200, 83, 0.4);
    filter: brightness(1.1);
}

.btn-pay:active {
    transform: scale(0.95);
}
.paid-badge {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.1);
}

.paid-badge::before {
    content: '✔';
    font-size: 0.8rem;
}
