/* ============================================================
   RestauranteSys - CSS Principal
   ============================================================ */

:root {
    --primary: #1b5e20;
    --success: #2e7d32;
    --warning: #d97706;
    --danger: #dc2626;
    --bg-dark: #0d2611;
    --bg-card: #1a4020;
    --bs-primary: #1b5e20;
    --bs-primary-rgb: 27, 94, 32;
}

/* ─── GERAL ─────────────────────────────────────────────── */
body {
    background-color: #f0f2f5;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
}

/* ─── LOGIN ─────────────────────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, #0d2611 0%, #1b5e20 50%, #2e7d32 100%);
    min-height: 100vh;
}

.login-wrapper {
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-icon {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: #fff;
    border: 3px solid rgba(255,255,255,0.2);
}

.login-box .card {
    border-radius: 16px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.97);
}

/* ─── MAPA DE MESAS ────────────────────────────────────── */
.mesa-card {
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid transparent;
    min-height: 120px;
    user-select: none;
}

.mesa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

.mesa-livre {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #16a34a !important;
}

.mesa-livre:hover {
    border-color: #15803d !important;
}

.mesa-ocupada {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #dc2626 !important;
    color: #1f2937;
}

.mesa-numero {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 4px;
}

.mesa-livre .mesa-numero { color: #15803d; }
.mesa-ocupada .mesa-numero { color: #991b1b; }

.mesa-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-top: -2px;
}

.mesa-info { font-size: 0.75rem; }

/* ─── PRODUTO CARD ─────────────────────────────────────── */
.produto-card {
    border-radius: 10px;
    transition: all 0.15s ease;
    border: 2px solid #e5e7eb;
}

.produto-card:hover {
    border-color: var(--primary);
    background: #f1f8f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.15) !important;
}

.produto-card.selecionado {
    border-color: var(--success) !important;
    background: #f0fdf4 !important;
}

/* ─── MODIFICADOR ──────────────────────────────────────── */
.modificador-opcao:has(input:checked) {
    background: #f1f8f1;
    border-color: var(--primary) !important;
}

/* ─── NAVBAR ────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(90deg, #1b5e20, #2e7d32) !important;
}

/* ─── CARDS ─────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    background-color: #f8f9fa;
}

/* ─── TABELAS ────────────────────────────────────────────── */
.table-hover tbody tr:hover {
    background-color: #f1f8f1;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ─── BOTÕES ─────────────────────────────────────────────── */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    border-radius: 10px;
}

/* ─── ALERTS ─────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border: none;
}

/* ─── MODO ESCURO MODAL ──────────────────────────────────── */
.modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ─── ADMIN ──────────────────────────────────────────────── */
.admin-mode .navbar {
    background: linear-gradient(90deg, #0d2611, #1b5e20) !important;
}

/* ─── RESPONSIVO MOBILE ──────────────────────────────────── */
@media (max-width: 576px) {
    .mesa-numero { font-size: 1.8rem; }
    .mesa-card   { min-height: 100px; }
    .container-fluid { padding: 8px; }

    .btn-lg { font-size: 1rem; padding: 0.6rem 1rem; }
}

/* ─── IMPRESSÃO ──────────────────────────────────────────── */
@media print {
    .navbar, .footer, .btn, .alert { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ─── SCROLL SUAVE ───────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── SPINNER ────────────────────────────────────────────── */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
