:root {
    --azul: #1a3c6e;
    --azul-claro: #2c5aa0;
    --cinza: #f4f5f7;
    --borda: #dde1e6;
    --texto: #1f2430;
    --verde: #1d8a4e;
    --vermelho: #c0392b;
    --amarelo: #b8860b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--cinza);
    color: var(--texto);
}

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    background: var(--azul);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

.sidebar .brand {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 0 1.5rem 1.5rem;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; flex: 1; }

.sidebar li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #d7e3f4;
    text-decoration: none;
}

.sidebar li a:hover, .sidebar li a.active {
    background: var(--azul-claro);
    color: white;
}

.user-box {
    padding: 1rem 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-btn {
    background: none;
    border: none;
    color: #d7e3f4;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: 0.85rem;
}

.content { flex: 1; padding: 2rem; overflow-x: auto; }

.content-solo {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 { margin-top: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

th, td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--borda);
    font-size: 0.9rem;
}

th { background: #eef1f6; }

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
}

.badge-free { background: var(--verde); }
.badge-atencao { background: var(--amarelo); }
.badge-pagando { background: var(--vermelho); }

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

form.form-simples {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 480px;
}

label { font-size: 0.85rem; font-weight: 600; }

input, select {
    padding: 0.5rem;
    border: 1px solid var(--borda);
    border-radius: 4px;
    font-size: 0.95rem;
}

button.primary {
    background: var(--azul);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    width: fit-content;
}

button.primary:hover { background: var(--azul-claro); }

.flash {
    background: #eafaf0;
    border: 1px solid var(--verde);
    color: #135c31;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error { color: var(--vermelho); font-size: 0.85rem; }

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.filtros { display: flex; gap: 0.5rem; align-items: end; }

a.btn {
    background: var(--azul);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 340px;
}

.login-box h1 { font-size: 1.4rem; text-align: center; }
