/* ===========================
   LAYOUT GERAL
=========================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: #fff;
}

h1, h2 {
    margin: 0;
}

/* ===========================
   TOPO (INDEX + GESTORES)
=========================== */

.top-bar, .topo-acoes {
    width: 100%;
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
}

.top-actions button,
.topo-acoes button {
    margin-left: 10px;
    padding: 8px 16px;
    background: #222;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.top-actions button:hover,
.topo-acoes button:hover {
    background: #333;
}

/* ===========================
   INDEX – CONTEÚDO CENTRAL
=========================== */

.main-index {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.titulo-principal {
    text-align: center;
    margin-bottom: 20px;
}

/* ===========================
   FILTROS
=========================== */

.filtros {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.filtros-centro {
    justify-content: center;
}

.filtros select,
.filtros input[type="date"] {
    padding: 10px;
    background: #222;
    border: none;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ===========================
   TABELA DA ESCALA
=========================== */

.tabela {
    background: #1a1a1a;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.titulo-dia {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

/* GRID CORRIGIDO PARA 6 COLUNAS */
.linha {
    display: grid;
    grid-template-columns: 120px 1fr 90px 160px 120px 80px;
    padding: 8px 0;
    border-bottom: 1px solid #333;
    align-items: center;
}

.linha.header {
    font-weight: bold;
    border-bottom: 2px solid #555;
}

.linha div {
    display: flex;
    align-items: center;
}

/* ===========================
   MENU LATERAL (GESTORES)
=========================== */

.btn-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    background: #222;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.btn-menu:hover {
    background: #333;
}

.menu-lateral {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background: #1a1a1a;
    padding: 20px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    z-index: 9998;
    box-shadow: 4px 0 12px rgba(0,0,0,0.5);
}

.menu-lateral.fechado {
    transform: translateX(-260px);
}

.menu-lateral.aberto {
    transform: translateX(0);
}

.menu-lateral h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.menu-lateral button {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #333;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.menu-lateral button:hover {
    background: #444;
}

/* ===========================
   POPUPS
=========================== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9997;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 25px;
    border-radius: 10px;
    width: 350px;
    z-index: 9999;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.popup label {
    display: block;
    margin-top: 10px;
}

.popup select,
.popup input[type="date"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background: #333;
    border: none;
    color: #fff;
    border-radius: 6px;
}

.popup button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #444;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
}

.btn-cancelar {
    background: #660000 !important;
}

/* ===========================
   LOGIN
=========================== */

.login-container {
    width: 350px;
    margin: 120px auto;
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
    text-align: center;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #222;
    border: none;
    color: #fff;
    border-radius: 6px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #444;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
}

.login-container button:hover {
    background: #555;
}

#erro-login {
    color: #ff4444;
    margin-top: 10px;
}

/* ===========================
   TEMA CLARO
=========================== */

body.tema-claro {
    background-color: #f5f5f5;
    color: #222;
}

body.tema-claro .tabela {
    background-color: #ffffff;
    color: #222;
    border: 1px solid #ccc;
}

body.tema-claro .linha.header {
    background-color: #e0e0e0;
    color: #000;
}

body.tema-claro .linha {
    background-color: #fafafa;
    border-bottom: 1px solid #ddd;
}

body.tema-claro select,
body.tema-claro input[type="date"] {
    background-color: #fff;
    color: #000;
    border: 1px solid #aaa;
}

body.tema-claro button {
    background-color: #ddd;
    color: #000;
    border: 1px solid #999;
}

/* Ajustes do topo */
.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-actions button {
    white-space: nowrap;
}

#btn-login {
    min-width: 80px;
    text-align: center;
}

.top-bar {
    width: auto !important;
    max-width: 100% !important;
    display: flex;
    justify-content: flex-end;
}

body > header.top-bar {
    max-width: 100% !important;
}
