/* Estrutura responsiva adaptada da base Aldeia; regras sem uso foram removidas. */
:root { --brand:#1744c7; --brand-dark:#102d84; --ink:#17243b; --muted:#667085; --line:#e5e7eb; --surface:#fff; --page:#f3f6fc; }
html { scroll-behavior:smooth; }
body { min-height:100vh; overflow-x:hidden; background:var(--page); color:var(--ink); }
.btn { min-height:42px; padding:.55rem .9rem; border-radius:.5rem; font-weight:700; }
.btn-sm { min-height:34px; padding:.35rem .65rem; }
.btn-primary { --bs-btn-bg:var(--brand); --bs-btn-border-color:var(--brand); --bs-btn-hover-bg:var(--brand-dark); --bs-btn-hover-border-color:var(--brand-dark); color:#fff; }
.alert { overflow-wrap:anywhere; }
.app-layout { display:grid; grid-template-columns:264px minmax(0,1fr); min-height:100vh; }
.app-sidebar { position:sticky; top:0; height:100vh; flex-direction:column; gap:1.5rem; padding:1.25rem; background:#111c35; border-right:1px solid rgba(255,255,255,.08); }
.brand { display:flex; align-items:center; gap:.75rem; color:#fff; text-decoration:none; font-weight:700; }
.nav-link { display:flex; align-items:center; gap:.75rem; min-height:42px; border-radius:.5rem; color:rgba(255,255,255,.78); font-weight:600; }
.offcanvas .nav-link { color:var(--ink); }
.nav-link:hover,.nav-link.active { color:#fff; background:rgba(255,255,255,.12); }
.offcanvas .nav-link:hover { color:var(--brand-dark); background:#eef2ff; }
.app-main { min-width:0; }
.app-topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:68px; padding:.85rem 1.25rem; background:rgba(255,255,255,.94); border-bottom:1px solid var(--line); backdrop-filter:blur(8px); }
.app-content { padding:1.25rem; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.page-heading h1 { margin:0; font-size:1.65rem; font-weight:750; }
.page-heading p { margin:.2rem 0 0; color:var(--muted); }
.metric-card,.login-panel { background:var(--surface); border:1px solid var(--line); border-radius:.5rem; box-shadow:0 12px 30px rgba(16,24,40,.06); }
.metric-card { display:grid; gap:.35rem; min-height:132px; padding:1rem; }
.metric-card i { width:38px; height:38px; display:grid; place-items:center; border-radius:.5rem; color:var(--brand-dark); background:#e9efff; font-size:1.15rem; }
.metric-card span { color:var(--muted); font-weight:600; }
.metric-card strong { font-size:1.65rem; }
.metric-card-link { color:inherit; transition:transform .15s ease,box-shadow .15s ease; }
.metric-card-link:hover { color:inherit; transform:translateY(-2px); box-shadow:0 16px 32px rgba(16,24,40,.1); }
.login-page { min-height:100vh; display:grid; place-items:center; padding:1rem; background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(243,246,252,.92)),#eef2ff; }
.login-panel { width:min(100%,440px); padding:1.4rem; }
.login-brand { display:flex; align-items:center; gap:.9rem; margin-bottom:1.25rem; }
.login-brand h1 { margin:0; font-size:1.45rem; font-weight:800; }
.login-brand p { margin:.15rem 0 0; color:var(--muted); }
.loading-overlay { position:fixed; inset:0; z-index:2000; display:grid; place-items:center; background:rgba(247,250,255,.94); opacity:0; visibility:hidden; transition:opacity .18s ease,visibility .18s ease; }
.loading-overlay.is-visible { opacity:1; visibility:visible; }
.loading-card { display:grid; justify-items:center; gap:.75rem; color:var(--brand-dark); }
.loading-spinner { width:28px; height:28px; border:3px solid #dbe4fb; border-top-color:var(--brand); border-radius:50%; animation:loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform:rotate(360deg); } }
@media (max-width:991.98px) { .app-layout { display:block; } .app-content { padding:1rem; } .page-heading { align-items:stretch; flex-direction:column; } .page-heading .btn { width:100%; } }
@media (max-width:575.98px) { .metric-card { min-height:108px; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .loading-spinner { animation:none; } .loading-overlay,.metric-card-link { transition:none; } }
