/* ============================================================
   FLAMA - Estilos principales
   Paleta: Negro (#000, #111, #1a1a1a), Blanco (#fff, #f5f5f5), 
           Grises (#333, #666, #999, #ccc, #e0e0e0)
   Acento: Naranja fuego (#ffffff) para CTAs y highlights
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #f5f5f5;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover {
        color: #cccccc;
    }

/* --- NAVBAR --- */
.navbar {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-logo-text {
    background: none;
    -webkit-text-fill-color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #999;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: #fff;
    }

/* --- MAIN --- */
.main-content {
    flex: 1;
}

/* --- HERO (Landing principal) --- */
.hero {
    text-align: center;
    padding: 100px 24px 80px;
    background: radial-gradient(ellipse at center top, #1a1a1a 0%, #0a0a0a 70%);
}

    .hero h1 {
        font-size: 3.5rem;
        font-weight: 900;
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: -1px;
    }

        .hero h1 .accent {
            color: #ffffff;
        }

    .hero p {
        font-size: 1.2rem;
        color: #999;
        max-width: 600px;
        margin: 0 auto 40px;
    }

.hero-cta {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #ffffff;
    color: #000;
}

    .btn-primary:hover {
        background: #dddddd;
        color: #000;
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #222;
    color: #fff;
    border: 1px solid #333;
}

    .btn-secondary:hover {
        background: #333;
        color: #fff;
    }

.btn-danger {
    background: #dc3545;
    color: #fff;
}

    .btn-danger:hover {
        background: #c82333;
        color: #fff;
    }

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 4px 12px;
    font-size: 0.8rem;
}

/* --- EVENTO CARD (Landing) --- */
.evento-section {
    padding: 60px 24px;
}

.evento-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 48px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

    .evento-card h2 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .evento-card .fecha {
        color: #ffffff;
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .evento-card .ubicacion {
        color: #666;
        margin-bottom: 24px;
    }

/* --- SECCIONES GENERALES --- */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #222;
}

/* --- LOGIN PAGE --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 24px;
}

.login-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
}

    .login-card h2 {
        text-align: center;
        margin-bottom: 8px;
        font-size: 1.5rem;
    }

    .login-card .subtitle {
        text-align: center;
        color: #666;
        margin-bottom: 32px;
        font-size: 0.9rem;
    }

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

    .form-group label {
        display: block;
        font-weight: 500;
        font-size: 0.85rem;
        color: #ccc;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #f5f5f5;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: #ffffff;
    }

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .form-check input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #ffffff;
    }

.form-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* --- ALERTAS --- */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.alert-success {
    background: #0d2818;
    border: 1px solid #1a5632;
    color: #4ade80;
}

.alert-error {
    background: #2d1215;
    border: 1px solid #5c2428;
    color: #f87171;
}

.alert-info {
    background: #1a1a2e;
    border: 1px solid #2a2a4e;
    color: #818cf8;
}

/* --- DASHBOARD CLIENTE --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    padding: 40px 0;
    align-items: start;
}

.saldo-card {
    background: linear-gradient(135deg, #1a1a1a, #222);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}

    .saldo-card .saldo-label {
        font-size: 0.85rem;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .saldo-card .saldo-value {
        font-size: 2.5rem;
        font-weight: 800;
        color: #4ade80;
        margin-top: 4px;
    }

    .saldo-card .tarjeta-info {
        font-size: 0.85rem;
        color: #666;
        margin-top: 8px;
    }

/* --- CATÁLOGO BEBIDAS --- */
.bebidas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.bebida-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s, transform 0.2s;
}

    .bebida-card:hover {
        border-color: #333;
        transform: translateY(-2px);
    }

    .bebida-card .categoria {
        font-size: 0.7rem;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 4px;
    }

    .bebida-card h4 {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .bebida-card .descripcion {
        font-size: 0.8rem;
        color: #888;
        margin-bottom: 12px;
    }

    .bebida-card .precio {
        font-size: 1.2rem;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 12px;
    }

    .bebida-card .add-form {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .bebida-card .qty-input {
        width: 60px;
        padding: 6px 8px;
        background: #1a1a1a;
        border: 1px solid #333;
        border-radius: 6px;
        color: #fff;
        text-align: center;
        font-size: 0.9rem;
    }

/* --- CARRITO (sidebar) --- */
.carrito-panel {
    position: sticky;
    top: 110px;
    height: fit-content;
    max-height: calc(100vh - 130px);
}

.carrito-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    max-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

    .carrito-card h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #222;
        flex-shrink: 0;
    }

.carrito-empty {
    text-align: center;
    color: #666;
    padding: 24px 0;
    font-size: 0.9rem;
}

/* Contenedor de items con scroll interno */
.carrito-items-scroll {
    overflow-y: auto;
    flex: 1;
    max-height: 340px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

    .carrito-items-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .carrito-items-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .carrito-items-scroll::-webkit-scrollbar-thumb {
        background: #333;
        border-radius: 2px;
    }

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
}

    .carrito-item:last-of-type {
        border-bottom: none;
    }

    .carrito-item .item-info h4 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .carrito-item .item-info .item-detail {
        font-size: 0.8rem;
        color: #666;
    }

    .carrito-item .item-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

.carrito-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

    .carrito-total .total-amount {
        color: #ffffff;
    }

.carrito-actions {
    margin-top: 20px;
    flex-shrink: 0;
}

    .carrito-actions .btn {
        width: 100%;
        text-align: center;
    }

/* --- ADMIN DASHBOARD --- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
}

    .stat-card .stat-label {
        font-size: 0.75rem;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .stat-card .stat-value {
        font-size: 2rem;
        font-weight: 800;
        margin-top: 4px;
        color: #fff;
    }

    .stat-card.accent .stat-value {
        color: #ffffff;
    }

    .stat-card.green .stat-value {
        color: #4ade80;
    }

/* --- ADMIN NAV --- */
.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

    .admin-nav .btn {
        font-size: 0.85rem;
    }

        .admin-nav .btn.active {
            background: #ffffff;
            color: #fff;
        }

/* --- TABLAS --- */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th {
        text-align: left;
        padding: 12px 16px;
        background: #151515;
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #999;
        border-bottom: 1px solid #222;
    }

    .data-table td {
        padding: 12px 16px;
        border-bottom: 1px solid #1a1a1a;
        font-size: 0.9rem;
    }

    .data-table tr:hover td {
        background: #111;
    }

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

/* --- BADGES --- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: #332b00;
    color: #fbbf24;
}

.badge-confirmed {
    background: #1a2e1a;
    color: #4ade80;
}

.badge-preparing {
    background: #1a1a2e;
    color: #818cf8;
}

.badge-ready {
    background: #0d2818;
    color: #34d399;
}

.badge-delivered {
    background: #151515;
    color: #999;
}

.badge-cancelled {
    background: #2d1215;
    color: #f87171;
}

.badge-active {
    background: #1a2e1a;
    color: #4ade80;
}

.badge-inactive {
    background: #2d1215;
    color: #f87171;
}

/* --- PEDIDOS ANTERIORES --- */
.pedidos-lista {
    margin-top: 32px;
}

.pedido-card {
    background: #151515;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pedido-items {
    font-size: 0.85rem;
    color: #999;
}

/* --- FOOTER --- */
.footer {
    background: #111;
    border-top: 1px solid #222;
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .carrito-panel {
        position: static;
        max-height: none;
    }

    .carrito-card {
        max-height: none;
    }

    .carrito-items-scroll {
        max-height: 250px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        gap: 12px;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .bebidas-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .bebidas-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
