/* Reset + base */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    color:#333;
}

/* ====== LAYOUT GERAL (Grid) ====== */
.app {
    display: grid;
    grid-template-columns: 280px 1fr; /* sidebar + conteúdo */
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    overflow: auto;
    background: transparent;
    position: relative;
    z-index: 100;
}

.app-main {
    min-width: 0; /* evita overflow em grid */
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
}

/* ====== OVERRIDES DO MENU para NÃO sobrepor ====== */
.app-sidebar .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 280px !important;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

/* Se o menu tiver largura definida, respeite dentro da coluna (280px) */
.app-sidebar .sidebar,
.app-sidebar .sidebar * {
    max-width: 100%;
}

/* ====== CONTEÚDO ====== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    margin-left: 310px; /* acompanha a largura do menu fixo */
}

.header {
    background-color: #fcb900;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-card {
    background-color: #000;
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.stat-card h3 { font-size: 1.8rem; margin-bottom: 5px; }

.filters-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group { display:flex; flex-direction:column; }
.filter-group label { font-weight: 600; margin-bottom: 8px; color: #2c3e50; }
.filter-group input, .filter-group select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all .3s ease;
    background: #fff;
}
.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-primary { background-color:#000; color:#fff; }
.btn-secondary { background: linear-gradient(135deg, #95a5a6, #7f8c8d); color:#fff; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,.2); }

.orders-section {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    border: 1px solid rgba(255,255,255,.2);
}

.orders-grid { display: grid; gap: 20px; }

.order-card {
    background:#fff;
    border-radius:12px;
    padding:20px;
    box-shadow:0 4px 20px rgba(0,0,0,.08);
    border-left:4px solid #3498db;
    transition: all .3s ease;
}
.order-card:hover { transform: translateY(-2px); box-shadow:0 8px 30px rgba(0,0,0,.12); }

.order-header {
    display:flex; justify-content: space-between; align-items:flex-start;
    margin-bottom:15px; flex-wrap:wrap; gap:10px;
}
.order-number { font-size:1.4rem; font-weight:700; color:#2c3e50; }

.status {
    padding:6px 12px; border-radius:20px; font-size:12px; font-weight:600; text-transform:uppercase;
}
.status.pendente { background:#fff3cd; color:#856404; }
.status.em-andamento { background:#d1ecf1; color:#0c5460; }
.status.concluido { background:#d4edda; color:#155724; }
.status.cancelado { background:#f8d7da; color:#721c24; }

.order-details {
    display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap:15px; margin-bottom:15px;
}
.detail-item { display:flex; flex-direction:column; }
.detail-label { font-size:12px; font-weight:600; color:#7f8c8d; text-transform:uppercase; margin-bottom:4px; }
.detail-value { font-size:14px; color:#2c3e50; font-weight:500; }

.services-section { margin-top:15px; padding-top:15px; border-top:1px solid #ecf0f1; }
.services-title { font-size:14px; font-weight:600; color:#2c3e50; margin-bottom:8px; }
.services-list { display:flex; flex-wrap:wrap; gap:8px; }
.service-tag { background:#f8f9fa; border:1px solid #e9ecef; padding:4px 8px; border-radius:6px; font-size:12px; color:#495057; }

.no-orders { text-align:center; padding:60px 20px; color:#7f8c8d; }
.no-orders h3 { font-size:1.5rem; margin-bottom:10px; }

/* ====== RESPONSIVO ====== */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 1024px) {
    .app { 
        grid-template-columns: 240px 1fr; 
    }
    .app-sidebar .sidebar { 
        width: 240px !important; 
    }
}

@media (max-width: 900px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app { 
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .app-sidebar { 
        position: static;
        order: -1;
        height: auto;
    }
    
    .app-sidebar .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto;
    }
    
    .app-main {
        margin-left: 0;
        padding-top: 0;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .order-header { 
        flex-direction: column; 
        align-items: stretch; 
    }
    
    .order-details { 
        grid-template-columns: 1fr; 
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
        border-radius: 10px;
    }
    
    .filters-section,
    .orders-section {
        padding: 15px;
        border-radius: 10px;
    }
    
    .order-card {
        padding: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .actions {
        flex-direction: column;
    }


    @media (max-width: 768px) {
    .container {
        margin-left: 0; /* remove espaço do menu */
    }
}
}