/* ============================================================
   Controle de Aluguéis — estilos da aplicação
   (sobreposição leve ao Bootstrap; sem gradientes, sem animações)
   ============================================================ */

:root {
    --sidebar-width: 250px;
    --topbar-height: 56px;
    --brand-dark: #1f2a37;
    --brand: #2563eb;
    --surface: #ffffff;
    --bg-page: #f4f6f9;
    --border: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
}

html, body {
    height: 100%;
}

body.app-body {
    background: var(--bg-page);
    color: var(--text-main);
    font-size: .925rem;
}

/* ---------------- Estrutura ---------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    padding: 1.25rem;
    flex: 1;
}

@media (min-width: 768px) {
    .app-content {
        padding: 1.75rem;
    }
}

/* ---------------- Sidebar ---------------- */
.app-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: var(--brand-dark);
    color: #cbd5e1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.app-nav-title {
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .55;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: .25rem;
    color: #cbd5e1;
    border-radius: .5rem;
    padding: .5rem .75rem;
    font-size: .9rem;
    text-decoration: none;
    margin-bottom: 2px;
    transition: background-color .12s ease, color .12s ease;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.app-nav-link.active {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

.app-nav-link.disabled {
    opacity: .45;
    background: transparent;
    color: #cbd5e1;
}

.app-nav-link.disabled:hover {
    background: transparent;
    color: #cbd5e1;
}

.app-nav-link .badge {
    font-weight: 500;
    font-size: .65rem;
}

/* Offcanvas mobile herda o mesmo menu (fundo claro) */
.app-sidebar-canvas .app-nav-link {
    color: #374151;
}

.app-sidebar-canvas .app-nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.app-sidebar-canvas .app-nav-link.active {
    background: var(--brand);
    color: #fff;
}

.app-sidebar-canvas .app-nav-title {
    color: var(--text-muted);
    opacity: 1;
}

/* ---------------- Topbar ---------------- */
.app-topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* ---------------- Cartões ---------------- */
.card {
    border-radius: .65rem;
}

.card-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.app-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

/* ---------------- Login ---------------- */
.app-body-auth {
    background: var(--bg-page);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem;
}

.auth-brand {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e8f0fe;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-inline: auto;
}

/* ---------------- Utilidades ---------------- */
.form-control:focus,
.form-select:focus {
    border-color: #93b4f5;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

#flash-region .alert {
    border: 0;
}

.badge.border {
    border-width: 1px !important;
}

code {
    font-size: .85em;
    word-break: break-all;
}

/* Conteúdo carregado via HTMX: evita "pulo" de layout */
#content > .card:last-child {
    margin-bottom: .5rem;
}
