body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f5f1ea;
    color: #2b241f;
}

a {
    color: #8a4b26;
    text-decoration: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, #f8e1d0, #f2eee8 42%, #eadccf 100%);
}

.login-card,
.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(74, 53, 39, 0.12);
}

.login-card {
    width: min(980px, 92vw);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    overflow: hidden;
}

.login-hero {
    padding: 48px;
    background: linear-gradient(135deg, #241712, #8a4b26);
    color: #fff7ef;
}

.login-form {
    padding: 40px;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #201410;
    color: #f9eadb;
    padding: 24px 18px;
}

.sidebar h1 {
    font-size: 20px;
    margin: 0 0 18px;
}

.sidebar nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #f3e3d3;
    margin-bottom: 6px;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.09);
}

.main {
    padding: 26px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.card {
    padding: 20px;
}

.metric {
    font-size: 28px;
    font-weight: 700;
    margin-top: 8px;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    margin-top: 20px;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #ece5de;
    text-align: left;
    font-size: 14px;
}

form .grid,
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

input,
select,
textarea,
button {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d3c4b7;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
}

textarea {
    min-height: 94px;
}

button,
.button {
    background: #8a4b26;
    color: #fff;
    border: none;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #6c757d;
}

.button.danger,
button.danger {
    background: #bb3b3b;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.flash.success { background: #daf5df; color: #1f5b28; }
.flash.error { background: #fbe0df; color: #7e241f; }
.flash.info { background: #e4eefc; color: #1e4673; }

.status-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f2e4d8;
}

.status-ativo, .status-finalizado, .status-confirmado { background: #daf5df; color: #1f5b28; }
.status-suspenso, .status-cancelado, .status-nao_compareceu { background: #fbe0df; color: #7e241f; }
.status-agendado { background: #e4eefc; color: #1e4673; }

.inline-form {
    display: inline;
}

.inline-form button,
.inline-form .button {
    width: auto;
    padding: 8px 12px;
}

.muted {
    color: #7d7168;
}

@media (max-width: 960px) {
    .app-shell,
    .login-card,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}
