/* =========================================
   1. CONFIGURAÇÕES GLOBAIS (RESET)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

h1, h2, h3 {
    color: #fff;
    margin-bottom: 15px;
    font-weight: 600;
}

/* =========================================
   2. SIDEBAR (Barra Lateral - Fixa)
   ========================================= */
.sidebar {
    width: 260px;
    background-color: #1e1e1e;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    border-right: 1px solid #333;
    z-index: 1000;
}

.logo-area {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #333;
    background: #181818;
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: #ffaa00;
    letter-spacing: 1px;
}

.menu-folder {
    background-color: #181818;
    border-bottom: 1px solid #252525;
    cursor: pointer;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
    font-weight: 600;
    transition: background 0.2s;
}

.menu-folder:hover { background-color: #222; color: #fff; }
.menu-folder .arrow { transition: transform 0.3s ease; font-size: 12px; color: #666; }
.menu-folder.active .arrow { transform: rotate(90deg); color: #ffaa00; }

.menu-link {
    display: block;
    padding: 10px 20px 10px 30px;
    color: #999;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.menu-link:hover { background-color: #2a2a2a; color: #fff; border-left-color: #ffaa00; }

.submenu {
    background-color: #121212;
    display: none;
    border-left: 1px solid #333;
}

.logout-btn {
    display: block;
    text-align: center;
    margin: 20px;
    padding: 10px;
    background: #330000;
    color: #ff4d4d;
    border-radius: 4px;
    font-weight: bold;
}

/* =========================================
   3. CONTEÚDO PRINCIPAL (Centralizado)
   ========================================= */
.content {
    margin-left: 260px; 
    padding: 30px;
    width: calc(100% - 260px);
    display: flex;
    flex-direction: column;
    align-items: center; 
    min-height: 100vh;
}

.content > * {
    width: 100%;
    max-width: 1200px;
}

.page-title {
    font-size: 24px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ffaa00;
    padding-bottom: 10px;
    display: block;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background-color: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin-bottom: 25px;
}

.filter-bar {
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center; 
    border: 1px solid #333;
}

/* =========================================
   4. TABELAS (Textos Centralizados)
   ========================================= */
.table-responsive { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
thead tr { background-color: #252525; }
th {
    padding: 15px;
    color: #ffaa00;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    text-align: center;
}
td {
    padding: 12px 15px;
    border-bottom: 1px solid #2a2a2a;
    color: #ddd;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
}
tbody tr:hover { background-color: #2a2a2a; }

/* =========================================
   5. ELEMENTOS DE FORMULÁRIO
   ========================================= */
input[type="text"], input[type="password"], input[type="date"], input[type="email"], input[type="number"], select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    outline: none;
}
input:focus, select:focus { border-color: #ffaa00; }

button {
    padding: 12px 20px;
    background-color: #ffaa00;
    color: #121212;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
button:hover { background-color: #ffcc00; transform: translateY(-1px); }

/* =========================================
   6. MODAL DE ÍCONES (Fixo e Centralizado)
   ========================================= */
.icon-modal {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.85); 
    z-index: 9999; 
    justify-content: center; 
    align-items: center;
}

.icon-box {
    background: #1e1e1e; 
    width: 500px; 
    max-width: 90%; 
    max-height: 80vh; 
    border-radius: 8px; 
    border: 1px solid #444; 
    padding: 25px; 
    display: flex; 
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.icon-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); 
    gap: 10px; 
    overflow-y: auto; 
    margin-top: 15px; 
    padding-right: 5px;
}
.icon-item {
    background: #2a2a2a; color: #aaa; border: 1px solid #333; border-radius: 4px;
    height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px;
}
.icon-item:hover { background: #ffaa00; color: #000; border-color: #ffaa00; }


/* =========================================
   7. PÁGINA DE LOGIN (Mais Larga e Bonita)
   ========================================= */
.login-page {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('back.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.login-box {
    background: rgba(30, 30, 30, 0.95);
    padding: 50px; /* Aumentado o padding interno */
    border-radius: 12px; /* Cantos um pouco mais arredondados */
    width: 450px; /* Aumentado de 350px para 450px (Mais largo) */
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8); /* Sombra mais profunda */
    border-top: 5px solid #ffaa00; /* Borda laranja um pouco mais grossa */
}

.login-box h2 { 
    color: #ffaa00; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    font-size: 28px; /* Título maior */
    margin-bottom: 10px;
}

.login-box .subtitle { 
    color: #888; 
    font-size: 14px; 
    margin-bottom: 35px; 
    font-weight: 300;
}

.login-box .footer-text { 
    font-size: 12px; 
    color: #555; 
    margin-top: 30px; 
}

/* =========================================
   8. UTILITÁRIOS
   ========================================= */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; background: #333; display: inline-block; }
.json-box { background: #000; color: #0f0; padding: 8px; border-radius: 4px; font-family: monospace; font-size: 12px; border: 1px solid #333; text-align: left; max-height: 150px; overflow-y: auto; }
.erro { color: #ff4d4d; background: rgba(255, 77, 77, 0.1); padding: 15px; border-radius: 4px; border: 1px solid #ff4d4d; text-align: center; margin-bottom: 20px; width: 100%; }
.sucesso { color: #4dff4d; background: rgba(77, 255, 255, 0.1); padding: 15px; border-radius: 4px; border: 1px solid #4dff4d; text-align: center; margin-bottom: 20px; width: 100%; }

/* Scrollbar Personalizada */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ffaa00; }