/* CardápioPro - Painel Administrativo */
:root {
    --sidebar-width: 260px;
    --primary: #FF6B35;
    --secondary: #1A1A2E;
    --sidebar-bg: #1A1A2E;
    --sidebar-hover: #16213E;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f4f6f9;
    margin: 0;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand i { color: var(--primary); font-size: 1.5rem; }

.sidebar-loja {
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-loja small { color: rgba(255,255,255,0.5); display: block; }
.sidebar-loja strong { display: block; margin: 0.25rem 0; }

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav li a.active { border-left: 3px solid var(--primary); }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.5rem 1.5rem;
}

.sidebar-footer { padding: 1rem 1.5rem; }

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    flex: 1;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, #16213E 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 { font-weight: 800; margin: 0.5rem 0 0; }

/* Page header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-weight: 800; margin: 0; }

/* Stats cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-primary .stat-icon { background: rgba(255,107,53,0.15); color: var(--primary); }
.stat-warning .stat-icon { background: rgba(255,193,7,0.15); color: #ffc107; }
.stat-success .stat-icon { background: rgba(25,135,84,0.15); color: #198754; }
.stat-info .stat-icon { background: rgba(13,110,253,0.15); color: #0d6efd; }

.stat-value { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { color: #6c757d; font-size: 0.875rem; }

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Status badges */
.status-badge { font-size: 0.75rem; }
.status-recebido { background: #ffc107 !important; color: #000 !important; }
.status-aceito { background: #0d6efd !important; }
.status-preparo { background: #fd7e14 !important; }
.status-entrega { background: #6f42c1 !important; }
.status-entregue { background: #198754 !important; }
.status-cancelado { background: #dc3545 !important; }

/* Pedido cards */
.pedido-item { transition: transform 0.2s; }
.pedido-item:hover { transform: translateY(-2px); }

.status-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #e55a2b;
    border-color: #e55a2b;
}

.text-primary { color: var(--primary) !important; }

/* Responsive — mobile admin */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }

    .sidebar-overlay.show { display: block; }

    .main-content {
        margin-left: 0;
        padding: 0.75rem;
        padding-top: 60px;
        padding-bottom: 80px;
        width: 100%;
    }

    .admin-layout { width: 100%; }

    /* Barra superior mobile */
    .mobile-admin-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--sidebar-bg);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 0.75rem;
        padding-top: env(safe-area-inset-top);
        z-index: 1030;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .btn-menu-toggle {
        width: 44px;
        height: 44px;
        border: none;
        background: rgba(255,255,255,0.1);
        color: #fff;
        border-radius: 10px;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-admin-title {
        font-weight: 700;
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55%;
        text-align: center;
    }

    .btn-ver-cardapio {
        width: 44px;
        height: 44px;
        background: var(--primary);
        color: #fff;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        text-decoration: none;
    }

    /* Navegação inferior */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #eee;
        display: flex;
        justify-content: space-around;
        padding: 0.4rem 0;
        padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
        z-index: 1030;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
        color: #6c757d;
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 600;
        padding: 0.35rem 0.75rem;
        min-width: 64px;
        border-radius: 8px;
    }

    .mobile-bottom-nav a i { font-size: 1.35rem; }

    .mobile-bottom-nav a.active {
        color: var(--primary);
    }

    .page-header h1 { font-size: 1.35rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.4rem; }

    .quick-actions {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .quick-action-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        background: #fff;
        border-radius: 12px;
        padding: 0.75rem 0.25rem;
        text-decoration: none;
        color: #495057;
        font-size: 0.7rem;
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .quick-action-btn i {
        font-size: 1.4rem;
        color: var(--primary);
    }
}

@media print {
    .sidebar, .page-header .btn { display: none !important; }
    .main-content { margin-left: 0; }
}

/* WhatsApp modal no painel */
.wa-preview {
    background: #dcf8c6;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    border: 1px solid #b8e0a8;
}
