/* app.css - Estilos Globais e Layout */

/* Variáveis CSS */
:root {
    --primary: #2563eb; /* Azul */
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --primary-contrast: #ffffff;

    --accent: #f59e0b; /* Amarelo/Laranja */
    --accent-light: #fcd34d;

    --background: #f4f7f9;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.8);
    --surface-dark: #1f2937;

    --text-primary: #1f2937;
    --text-muted: #6b7280;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-high: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    --transition: 0.3s ease-in-out;
}

/* Reset Básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* Layout Principal */
.app-body {
    min-height: 100vh;
    display: flex;
}

.app-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar (Menu Lateral) */
.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--surface);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-high);
    z-index: 10;
}

.sidebar.glass {
    background-color: var(--surface-glass);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    padding-left: 1.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), transform var(--transition);
    color: var(--text-muted);
    font-weight: 500;
}

.menu-item .icon {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.menu-item:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.menu-item.active {
    background-color: var(--primary);
    color: var(--primary-contrast);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transform: none;
}

.menu-item.active:hover {
    background-color: var(--primary-dark);
    transform: none;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
}

.user-block {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

/* Área de Conteúdo */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar (Cabeçalho) */
.topbar {
    padding: 1rem 2rem;
    background-color: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    z-index: 5;
}

.topbar-info strong {
    display: block;
    font-size: 1.1rem;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-head h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Cards e Grid */
.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.card.glass {
    background-color: var(--surface-glass);
    backdrop-filter: blur(5px);
}

.full-width {
    grid-column: 1 / -1;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
}

.btn.primary {
    background-color: var(--primary);
    color: var(--primary-contrast);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn.primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

.btn.outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn.outline:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.btn.ghost {
    background-color: transparent;
    border-color: transparent;
    color: var(--text-muted);
}

.btn.ghost:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

.btn.full {
    width: 100%;
}

/* Formulário */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Utilidades */
.muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Alertas */
.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Cards de Status (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-soft);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-header h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}

/* ---- Mesas & Setores - Igual ao Dashboard ---- */
.mesa-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
}

.mesa-card {
    width: 200px;
    height: 120px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-contrast);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.mesa-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-high);
}

.mesa-card strong {
    font-size: 1.1rem;
}

.mesa-card .muted {
    font-size: 0.8rem;
    opacity: 0.9;
}

.mesa-card-footer {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Cores */
.mesa-card.status-livre {
    background-color: #22c55e;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.mesa-card.status-ocupada {
    background-color: #ef4444;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.mesa-card.status-aguardando {
    background-color: #f59e0b;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.mesa-card.status-reservada {
    background-color: #3b82f6;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .mesa-card {
        width: 48%;
        height: 100px;
    }
}
