/* ===== RESET BÁSICO ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px; /* 🔹 Fonte base menor */
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #121212; /* fundo padrão */
    color: #f5f5f5;            /* texto padrão */
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== LINKS ===== */
a {
    color: #00bcd4;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

a:hover {
    color: #0097a7;
    text-decoration: underline;
}

/* ===== HEADER ===== */
header {
    background: #1f1f1f;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1f1f1f;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    z-index: 1000; /* 🔑 fica acima do conteúdo */
}


/* ===== AJUSTE NO CONTEÚDO ===== */
body {
    padding-top: 60px;   /* 🔑 espaço para o header */
    padding-bottom: 50px;/* 🔑 espaço para o footer */
}

/* ===== FOOTER ===== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 2px solid #333;
    background: #1f1f1f;
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    z-index: 1000;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

header .empresa {
    font-size: 1rem;
    font-weight: bold;
    color: #00bcd4;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap; /* 🔹 melhora responsividade */
}

nav a {
    color: #f5f5f5;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 0.9rem;
}

nav a:hover {
    background: #00bcd4;
    color: #121212;
}

/* ===== MAIN CONTAINER ===== */
main.container {
    flex: 1;                /* ocupa o espaço entre header e footer */
    display: block;         /* páginas decidem se querem grid/flex */
    width: 100%;
    padding: 20px;          /* padding mínimo */
    box-sizing: border-box;
}



/* ===== BOTÕES GERAIS ===== */
button,
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Padrão */
.btn-primary,
button {
    background: #00bcd4;
    color: #121212;
}
.btn-primary:hover,
button:hover {
    background: #0097a7;
}

/* Secundário */
.btn-secondary {
    background: #444;
    color: #fff;
}
.btn-secondary:hover {
    background: #666;
}

/* Perigo (excluir) */
.btn-danger {
    background: #ff5252;
    color: #fff;
}
.btn-danger:hover {
    background: #e53935;
}

/* ===== TABELAS ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.85rem; /* 🔹 fonte menor */
}

table th, 
table td {
    padding: 8px 10px;
    border: 1px solid #333;
    text-align: left;
    word-break: break-word; /* 🔹 evita overflow */
}

table th {
    background: #2a2a2a;
    color: #00bcd4;
    font-weight: bold;
}

/* ===== ALERTAS ===== */
.error {
    color: #ff5252;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.85rem;
}

.success {
    color: #4caf50;
    margin-bottom: 12px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    html {
        font-size: 13px;
    }
    nav ul {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 12px;
    }
    nav ul {
        flex-direction: column;
        gap: 6px;
    }
    header {
        flex-direction: column;
        gap: 8px;
    }
    table th, table td {
        padding: 6px;
        font-size: 0.8rem;
    }
    button, .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 11px;
    }
    nav ul {
        gap: 4px;
    }
    table, thead, tbody, th, td, tr {
        display: block; /* 🔹 transforma tabela em blocos */
    }
    table tr {
        margin-bottom: 10px;
    }
    table td {
        padding: 4px;
        border: none;
        border-bottom: 1px solid #333;
    }
}
