:root {
    --color-bg: #f6f8f6;
    --color-surface: #ffffff;
    --color-border: #e3e6e3;
    --color-text: #1f2421;
    --color-text-muted: #5b6760;
    --color-primary: #2e7d32;
    --color-primary-hover: #256728;
    --color-danger: #c62828;
    --color-row-alt: #f9faf9;
    --radius: 8px;
    --shadow-card: 0 4px 18px rgba(15, 30, 20, 0.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ---------- Login ---------- */

.tela-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 360px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 32px;
}

.card h1 {
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 600;
}

/* ---------- Forms ---------- */

.campo {
    display: block;
    margin-bottom: 16px;
}

.campo label {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* ---------- Botões ---------- */

button {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    background: var(--color-primary);
    color: white;
}

button:hover {
    background: var(--color-primary-hover);
}

button.secundario {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

button.secundario:hover {
    background: var(--color-row-alt);
    border-color: var(--color-text-muted);
}

button.bloco {
    width: 100%;
}

/* ---------- Mensagens ---------- */

.mensagem-erro {
    color: var(--color-danger);
    font-size: 13px;
    margin: 12px 0 0;
    min-height: 18px;
}

/* ---------- Página de gestão ---------- */

.tela-gestao {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.barra-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.barra-topo h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* ---------- Tabela ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    padding: 12px 16px;
    background: var(--color-row-alt);
    border-bottom: 1px solid var(--color-border);
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--color-row-alt);
}

/* ---------- Badge de role ---------- */

.role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.1);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 500;
}
