:root {
    --primary: #FFC700;
    --secondary: #333;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --gray: #F3F4F6;
    --border: #E5E7EB;
    --text: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F9FAFB;
    color: var(--text);
    line-height: 1.6;
}

/* LOGIN */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #FFD700 100%);
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: var(--secondary);
    font-size: 2.5rem;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.login-subtitle {
    color: #666;
    font-size: 1rem;
}

/* APP LAYOUT */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--secondary);
    color: white;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

.sidebar.closed {
    margin-left: -280px;
}

.logo {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--secondary);
    font-size: 1.5rem;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.user-info {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.875rem;
    opacity: 0.7;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
}

.nav {
    flex: 1;
    padding: 1rem;
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: var(--secondary);
    font-weight: 600;
}

/* MAIN CONTENT */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.header-title {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

/* FORMS */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* BUTTONS */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
}

.btn-primary:hover {
    background: #FFD700;
}

.btn-secondary {
    background: var(--gray);
    color: var(--text);
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #D97706;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* CARDS */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

/* TABLES */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
}

tr:hover {
    background: var(--gray);
}

/* MESSAGES */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.message-success {
    background: #D1FAE5;
    color: #065F46;
}

.message-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* STATUS BADGES */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-pendente {
    background: #FEF3C7;
    color: #92400E;
}

.status-aprovado {
    background: #D1FAE5;
    color: #065F46;
}

.status-rejeitado {
    background: #FEE2E2;
    color: #991B1B;
}

/* PROGRESS BAR */
.progress {
    height: 8px;
    background: var(--gray);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.progress-bar {
    height: 100%;
    background: var(--success);
    transition: width 0.3s;
}

.progress-bar.over {
    background: var(--danger);
}

/* STATS */
.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
}

/* EMPTY STATE */
.empty {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* TABS */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* LAYOUT */
.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.layout-full {
    display: block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;  /* ✅ começa escondido */
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show { left: 0; }

    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.show { display: block; }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body, .app { overflow-x: hidden; }
}


<style>
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    .sidebar.show { left: 0; }
    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    .sidebar-overlay.show { display: block; }
}
</style>/* ═══════════════════════════════════════════════════════════
   FIX SEGURO PARA MENU MOBILE
   Cole este código no FINAL do style.css
   NÃO substitui nada, apenas adiciona correções específicas
   ═══════════════════════════════════════════════════════════ */

/* Apenas para telas pequenas (mobile) */
@media (max-width: 768px) {
    
    /* 1. Sidebar começa escondido */
    body .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    /* 2. Sidebar visível quando tem classe 'show' */
    body .sidebar.show {
        left: 0;
    }
    
    /* 3. Overlay escuro quando menu abre */
    body .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    body .sidebar-overlay.show {
        display: block;
    }
    
    /* 4. Main content não precisa margem no mobile */
    body .main {
        margin-left: 0;
        width: 100%;
    }
    
    /* 5. Prevenir scroll horizontal */
    body {
        overflow-x: hidden;
    }
    
    body .app {
        overflow-x: hidden;
    }
}

/* Desktop: tudo normal (sem mudanças) */
@media (min-width: 769px){
  .main{
    margin-left: 0 !important;
    width: auto !important;
    min-width: 0;
  }
  .sidebar-overlay{ display:none !important; }
}


