/* ==========================================
   PASTOFORMA - Sistema de Gestão
   Paleta: Verde PastoForma + Complementares
========================================== */

:root {
    --verde-escuro: #1a6b2a;
    --verde-medio: #2d8a3e;
    --verde-claro: #4caf50;
    --verde-sidebar: #1e7a30;
    --verde-hover: #155c24;
    --verde-ativo: #0f4a1c;
    --cinza-bg: #f0f4f1;
    --cinza-card: #ffffff;
    --cinza-borda: #e2e8e4;
    --cinza-texto: #4a5568;
    --cinza-muted: #9ca3af;
    --amarelo: #f59e0b;
    --azul: #3b5bdb;
    --azul-claro: #4c6ef5;
    --laranja: #ef6c00;
    --roxo: #9c27b0;
    --ciano: #00838f;
    --verde-entrega: #2e7d32;
    --vermelho: #dc2626;
    --vermelho-claro: #ef4444;
    --texto-escuro: #1a202c;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 10px;
    --sidebar-w: 220px;
    --header-h: 64px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--cinza-bg);
    color: var(--texto-escuro);
    font-size: 14px;
    line-height: 1.5;
}

/* ============ LAYOUT ============ */
.app-layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--verde-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo img {
    width: 140px;
    background: white;
    border-radius: 8px;
    padding: 6px 10px;
}

.sidebar-toggle {
    color: rgba(255,255,255,0.7);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    margin-left: auto;
    display: flex;
    align-items: center;
}
.sidebar-toggle:hover { color: white; background: rgba(255,255,255,0.1); }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 0;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.18);
    color: white;
    font-weight: 600;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}

.nav-item .nav-arrow {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.6;
}

/* ============ HEADER ============ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    height: var(--header-h);
    background: white;
    border-bottom: 1px solid var(--cinza-borda);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.header-date {
    font-size: 13px;
    color: var(--cinza-muted);
    font-weight: 500;
}

.header-cidade {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cinza-texto);
    cursor: pointer;
}

.header-notif {
    position: relative;
    width: 36px; height: 36px;
    background: var(--cinza-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cinza-texto);
    font-size: 18px;
    transition: var(--transition);
    border: none;
}
.header-notif:hover { background: var(--cinza-borda); }

.notif-badge {
    position: absolute;
    top: 3px; right: 3px;
    width: 14px; height: 14px;
    background: var(--vermelho);
    border-radius: 50%;
    font-size: 9px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.header-avatar {
    width: 36px; height: 36px;
    background: var(--verde-medio);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--cinza-borda);
    min-width: 160px;
    display: none;
    z-index: 200;
}
.avatar-dropdown.show { display: block; }
.avatar-dropdown a, .avatar-dropdown button {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--cinza-texto);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}
.avatar-dropdown a:hover, .avatar-dropdown button:hover {
    background: var(--cinza-bg);
    color: var(--verde-escuro);
}

/* ============ PAGE CONTENT ============ */
.page-content {
    flex: 1;
    padding: 28px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--texto-escuro);
    margin-bottom: 24px;
}

.page-title svg, .page-title .icon {
    font-size: 26px;
    color: var(--cinza-texto);
}

/* ============ TOOLBAR ============ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left { display: flex; align-items: center; gap: 16px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }

.periodo-tabs { display: flex; gap: 4px; }
.periodo-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: var(--cinza-muted);
    transition: var(--transition);
    border: none;
    background: none;
}
.periodo-tab:hover { color: var(--texto-escuro); }
.periodo-tab.active { color: var(--texto-escuro); font-weight: 700; }

.aba-tabs { display: flex; gap: 16px; }
.aba-tab {
    padding: 6px 0;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: var(--cinza-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.aba-tab.active {
    color: var(--texto-escuro);
    border-bottom-color: var(--texto-escuro);
    font-weight: 700;
}

/* ============ SEARCH & FILTERS ============ */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box input {
    border: none;
    border-bottom: 1px solid var(--cinza-muted);
    border-radius: 0;
    padding: 7px 12px 7px 34px;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    min-width: 180px;
    background: transparent;
}
.search-box input:focus { border-bottom-color: var(--verde-medio); box-shadow: none; }
.search-box .search-icon {
    position: absolute;
    left: 10px;
    color: var(--cinza-muted);
    font-size: 16px;
}

.btn-filtros {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    color: var(--cinza-texto);
    transition: var(--transition);
}
.btn-filtros:hover { border-color: var(--verde-medio); color: var(--verde-escuro); }

/* ============ PEDIDO FORM STEPS ============ */
.pedido-step-nav-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--cinza-borda);
    background: #f8fafc;
    border-radius: 12px;
}

.pedido-step-kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--verde-escuro);
    font-weight: 700;
}

.pedido-step-hint {
    font-size: 13px;
    color: var(--cinza-texto);
    margin-top: 4px;
}

.pedido-step-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pedido-step-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--cinza-borda);
    background: white;
    cursor: pointer;
    min-width: 180px;
    color: var(--texto-escuro);
    transition: var(--transition);
}

.pedido-step-tab strong {
    display: block;
    font-size: 13px;
}

.pedido-step-tab small {
    display: block;
    color: var(--cinza-muted);
    font-size: 11px;
}

.pedido-step-tab:hover:not(:disabled) {
    border-color: var(--verde-medio);
    transform: translateY(-1px);
}

.pedido-step-tab.active {
    border-color: var(--verde-medio);
    background: #edf7ef;
}

.pedido-step-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pedido-step-tab-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--verde-medio);
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.pedido-step-pane {
    display: none;
}

.pedido-step-pane.active {
    display: block;
}

.pedido-step-pane-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.pedido-step-pane-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--texto-escuro);
}

.pedido-step-pane-subtitle {
    font-size: 13px;
    color: var(--cinza-texto);
    margin-top: 2px;
}

.pedido-section-card {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.pedido-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

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

.pedido-items-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--texto-escuro);
}

.pedido-items-list {
    display: grid;
    gap: 10px;
}

.pedido-item-card {
    padding: 12px;
    background: white;
    border: 1px solid var(--cinza-borda);
    border-radius: 10px;
}

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

.pedido-item-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--verde-escuro);
    text-transform: uppercase;
}

.pedido-item-grid {
    display: grid;
    grid-template-columns: 2fr repeat(5, minmax(110px, 1fr));
    gap: 10px;
    align-items: end;
}

.pedido-item-product {
    grid-column: span 2;
}

.pedido-summary-card {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--cinza-borda);
    border-radius: 10px;
}

.pedido-summary-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.pedido-summary-box {
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.pedido-summary-box span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--cinza-muted);
    margin-bottom: 4px;
}

.pedido-summary-box strong {
    font-size: 16px;
    color: var(--texto-escuro);
}

.pedido-summary-box.destaque {
    background: #edf7ef;
    border-color: rgba(45,138,62,0.25);
}

.pedido-upload-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.pedido-upload-list {
    margin-top: 8px;
    font-size: 13px;
    color: #4b5563;
    display: grid;
    gap: 6px;
}

.pedido-step-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 900px) {
    .pedido-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pedido-item-product {
        grid-column: 1 / -1;
    }
}

/* ============ DASHBOARD CARDS ============ */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.dash-card {
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.dash-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.dash-card.verde { background: linear-gradient(135deg, #2d8a3e, #1a6b2a); }
.dash-card.amarelo { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dash-card.azul { background: linear-gradient(135deg, #3b5bdb, #2f4acb); }

.dash-card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 8px;
}

.dash-card-number {
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.dash-card-sub {
    font-size: 13px;
    opacity: 0.8;
}

.dash-card-icon {
    font-size: 52px;
    opacity: 0.25;
}

/* ============ PEDIDO CARDS GRID ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pedido-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--cinza-borda);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}
.pedido-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.pedido-card-dot {
    position: absolute;
    top: 14px; right: 14px;
    width: 10px; height: 10px;
    border-radius: 50%;
}

.pedido-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.avatar-inicial {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--cinza-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--cinza-texto);
    flex-shrink: 0;
}

.pedido-card-nome {
    font-weight: 600;
    font-size: 14px;
    color: var(--texto-escuro);
    line-height: 1.3;
}

.pedido-card-sub {
    font-size: 12px;
    color: var(--cinza-muted);
}

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.status-fila       { background: #e8f5e9; color: #2e7d32; }
.status-analise    { background: #fff3e0; color: #e65100; }
.status-separacao  { background: #e3f2fd; color: #1565c0; }
.status-transportadora { background: #fce4ec; color: #880e4f; }
.status-faturamento { background: #e8eaf6; color: #283593; }
.status-preparando { background: #e0f7fa; color: #00695c; }
.status-entrega    { background: #e8f5e9; color: #1b5e20; }
.status-recusado   { background: #ffebee; color: #b71c1c; }
.status-entregue   { background: #e8f5e9; color: #1b5e20; }

.dot-analise       { background: var(--amarelo); }
.dot-separacao     { background: var(--azul); }
.dot-preparando    { background: var(--ciano); }
.dot-transportadora { background: #e91e63; }
.dot-faturamento   { background: var(--azul); }
.dot-entrega       { background: var(--verde-claro); }
.dot-recusado      { background: var(--vermelho); }
.dot-default       { background: var(--cinza-muted); }

/* ============ TABLE ============ */
.table-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--cinza-borda);
    overflow: hidden;
}

.table-responsive { overflow-x: auto; }

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

table thead th {
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--cinza-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--cinza-bg);
    border-bottom: 1px solid var(--cinza-borda);
}

table tbody td {
    padding: 13px 20px;
    font-size: 13.5px;
    color: var(--cinza-texto);
    border-bottom: 1px solid var(--cinza-borda);
}

table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: #f9fafb; }

.td-acoes { text-align: right; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--verde-medio);
    color: white;
}
.btn-primary:hover { background: var(--verde-escuro); }

.btn-secondary {
    background: var(--cinza-bg);
    color: var(--cinza-texto);
    border: 1px solid var(--cinza-borda);
}
.btn-secondary:hover { background: var(--cinza-borda); }

.btn-danger { background: var(--vermelho); color: white; }
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 52px; height: 52px;
    border-radius: 50% !important;
    background: var(--verde-medio);
    color: white !important;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    z-index: 90;
    text-decoration: none;
}
.btn-fab:hover { background: var(--verde-hover); transform: scale(1.1); color: white; }
.btn-fab .icon, .btn-fab svg { color: white; fill: white; }

/* ============ MENU 3 PONTOS ============ */
.dropdown-menu-3pts {
    position: relative;
    display: inline-block;
}

.btn-3pts {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--cinza-muted);
    font-size: 18px;
    line-height: 1;
    transition: var(--transition);
}
.btn-3pts:hover { background: var(--cinza-bg); color: var(--cinza-texto); }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--cinza-borda);
    min-width: 160px;
    z-index: 150;
    display: none;
}
.dropdown-menu.show { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--cinza-texto);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.dropdown-item:hover { background: var(--cinza-bg); color: var(--verde-escuro); }
.dropdown-item.danger { color: var(--vermelho); }
.dropdown-item.danger:hover { background: #fff5f5; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal-box {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 0;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-numero {
    font-size: 14px;
    color: var(--cinza-muted);
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--cinza-muted);
    line-height: 1;
    padding: 2px;
    transition: var(--transition);
}
.modal-close:hover { color: var(--texto-escuro); }

.modal-body { padding: 20px 28px; }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 28px 24px;
}

/* ============ FORM ============ */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cinza-texto);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    font-size: 13.5px;
    background: #f8faf9;
    outline: none;
    transition: var(--transition);
    color: var(--texto-escuro);
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--verde-medio);
    background: white;
    box-shadow: 0 0 0 3px rgba(45,138,62,0.1);
}

.form-control-icon {
    position: relative;
}
.form-control-icon .form-control { padding-right: 36px; }
.form-control-icon .icon-suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cinza-muted);
    font-size: 16px;
    cursor: pointer;
}

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

/* ============ PAGINAÇÃO ============ */
.pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 6px;
}
.pagination-wrap .page-link {
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cinza-texto);
    background: white;
    border: 1px solid var(--cinza-borda);
    text-decoration: none;
    transition: var(--transition);
}
.pagination-wrap .page-link:hover { background: var(--cinza-bg); }
.pagination-wrap .page-link.active {
    background: var(--verde-medio);
    color: white;
    border-color: var(--verde-medio);
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.alert-error { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }

/* ============ RELATÓRIO ============ */
.relatorio-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-bottom: 24px;
}

.card-relatorio {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--cinza-borda);
    padding: 24px;
}

.card-relatorio-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.status-bar-label {
    font-size: 12.5px;
    color: var(--cinza-texto);
    min-width: 130px;
}
.status-bar-track {
    flex: 1;
    height: 8px;
    background: var(--cinza-borda);
    border-radius: 4px;
    overflow: hidden;
}
.status-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.status-bar-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--texto-escuro);
    min-width: 24px;
    text-align: right;
}

/* ============ FILTRO CIDADE ============ */
.select-cidade {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    padding: 6px 12px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    color: var(--cinza-texto);
    font-weight: 600;
}
.select-cidade:focus { border-color: var(--verde-medio); }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--cinza-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .relatorio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform: translateX(-220px);
        width: 220px;
    }
    .sidebar.open {
        transform: translateX(0);
        --sidebar-w: 220px;
    }

    .main-content { margin-left: 0; }

    .dashboard-cards { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .header { padding: 0 16px; }

    .toolbar { flex-direction: column; align-items: flex-start; }

    .btn-mobile-menu {
        display: flex !important;
    }
}

.btn-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--cinza-texto);
    margin-right: auto;
    padding: 6px;
    border-radius: 6px;
}
.btn-mobile-menu:hover { background: var(--cinza-bg); }

/* ============ SIDEBAR OVERLAY (mobile) ============ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }
