:root {
  --sidebar-w: 248px;
  --brand: #1668b3;      /* azul da marca Asclepi */
  --brand-2: #14b3cf;    /* teal */
  --brand-3: #52c98a;    /* verde */
  --brand-soft: #e7f1fb;
  --page-bg: #f5f8fc;
  --line: #e7ecf3;
}

/* ===== Tipografia (humanista, suave) ===== */
html { font-size: 15px; }
body {
  font-family: 'Figtree Variable', 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg); color: #414a59;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -.01em; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, #f4f8fd 0%, #eef4fb 100%);
  color: #56617a; position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; transition: transform .2s ease; z-index: 1030;
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem; font-weight: 500;
  font-size: 1.2rem; color: #143a63; padding: .9rem 1.15rem;
  border-bottom: 1px solid rgba(22,104,179,.12);
}
.sidebar-brand .brand-txt { line-height: 1; }
.sidebar-brand .brand-txt small { display: block; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); font-weight: 600; }
.sidebar-brand i { color: var(--brand); font-size: 1.45rem; }
.sidebar-brand img { width: 40px; height: 40px; flex-shrink: 0; }
.sidebar-nav { padding: .75rem .5rem 2rem; }
.sidebar-heading {
  text-transform: uppercase; font-size: .66rem; letter-spacing: .09em;
  color: #a7b0be; padding: 1rem .85rem .35rem; font-weight: 600;
}
.sidebar .nav-link {
  color: #5c6675; border-radius: .55rem; padding: .55rem .85rem; margin: .12rem 0;
  display: flex; align-items: center; gap: .7rem; font-size: .9rem; font-weight: 450;
}
.sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #97a1b0; }
.sidebar .nav-link:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar .nav-link:hover i { color: var(--brand); }
.sidebar .nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar .nav-link.active i { color: var(--brand); }

/* Modo escuro: mantém a lateral legível */
[data-bs-theme="dark"] body { background: #0e1420; color: #c3ccd8; }
[data-bs-theme="dark"] .sidebar { background: #121a29; color: #b9c3d1; border-right-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .sidebar-brand { color: #fff; border-bottom-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .sidebar-heading { color: #7d8a9c; }
[data-bs-theme="dark"] .sidebar .nav-link, [data-bs-theme="dark"] .sidebar .nav-link i { color: #b9c3d1; }
[data-bs-theme="dark"] .sidebar .nav-link:hover, [data-bs-theme="dark"] .sidebar .nav-link.active { background: rgba(59,120,240,.20); color: #dbe6ff; }
[data-bs-theme="dark"] .sidebar .nav-link:hover i, [data-bs-theme="dark"] .sidebar .nav-link.active i { color: #dbe6ff; }

.content { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

/* ===== Topbar ===== */
.topbar {
  height: 62px; display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color);
  position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 600; font-size: 1.05rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.btn-icon { border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); }
.inst-switch { display: flex; align-items: center; gap: .4rem; }
.inst-switch .form-select { min-width: 180px; }

.user-btn { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; text-transform: uppercase;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.user-name { font-size: .85rem; font-weight: 600; }
.user-role { font-size: .72rem; color: var(--bs-secondary-color); }

.main { padding: 1.5rem; flex: 1; }
.footer { padding: .75rem 1.5rem; border-top: 1px solid var(--bs-border-color); }

/* ===== KPI cards ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 1rem; }
.kpi-card {
  background: var(--bs-body-bg); border: 1px solid var(--line); border-radius: .85rem;
  padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.kpi-icon { width: 48px; height: 48px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.kpi-value { font-size: 1.7rem; font-weight: 600; line-height: 1; }
.kpi-label { font-size: .82rem; color: var(--bs-secondary-color); }
.bg-brand { background: var(--brand); } .bg-danger2 { background:#dc3545; }
.bg-warn { background:#fd7e14; } .bg-teal { background:#0aa2c0; }
.bg-green { background:#198754; } .bg-purple { background:#6f42c1; }

/* ===== Paginação de tabelas ===== */
.pg-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem .9rem; border-top: 1px solid var(--line); font-size: .84rem; }
.pg-bar .pg-info { color: var(--bs-secondary-color); }
.pg-bar .pg-right { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pg-bar .pg-per { margin: 0; display: inline-flex; align-items: center; gap: .4rem; color: var(--bs-secondary-color); white-space: nowrap; }
.pg-bar .pg-per select { width: auto; display: inline-block; }
.pg-bar .pagination { flex-wrap: wrap; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem; }
.page-header h1 { font-size: 1.4rem; font-weight: 600; margin: 0; }
.card { border-color: var(--line); border-radius: .7rem; box-shadow: 0 1px 2px rgba(16,24,40,.03); }

/* ===== Leitos ===== */
.leito-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.leito-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--bs-border-color); border-radius: .5rem;
  padding: .35rem .6rem; font-size: .88rem; background: var(--bs-body-bg);
}
.leito-chip.ocupado { border-color: #dc3545; background: rgba(220,53,69,.06); }
.leito-chip.livre   { border-color: #198754; }

/* ===== Acompanhamento diário (planilha) ===== */
.acomp-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; color: var(--bs-secondary-color); }
.acomp-table td { font-size: .82rem; vertical-align: middle; }
.acomp-cell { cursor: pointer; transition: background .1s; }
.acomp-cell:hover { background: rgba(13,110,253,.06); }
.acomp-add { color: #0d6efd; font-size: .78rem; opacity: .55; white-space: nowrap; }
.acomp-cell:hover .acomp-add { opacity: 1; }
/* Dispositivos: uma faixa fixa por dispositivo (ordem de inserção), lado a lado, alinhadas verticalmente */
.dev-lanes { display: flex; flex-wrap: nowrap; align-items: center; gap: 3px; }
.dev-lane { flex: 0 0 46px; display: flex; }
.dev-lane .dev-badge { width: 100%; cursor: pointer; font-size: .72rem; padding: .3em .2em; }

/* ===== Mapa de leitos ===== */
.bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .4rem; }
.bed {
  border: 1.5px solid transparent; border-radius: .5rem; padding: .35rem .45rem;
  min-height: 62px; display: flex; flex-direction: column; gap: .05rem; position: relative;
  transition: transform .1s ease, box-shadow .1s ease;
}
.bed-top { display: flex; align-items: center; justify-content: space-between; }
.bed-code { font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.bed-icons { display: flex; gap: .2rem; align-items: center; color: #b02a37; font-size: .75rem; }
.bed-grip { cursor: grab; color: #98a2b3; }
.bed-patient { font-size: .76rem; font-weight: 600; text-decoration: none; color: inherit;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; }
.bed-patient:hover { text-decoration: underline; }
.bed-meta { font-size: .68rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bed-free-label { font-size: .74rem; font-weight: 600; color: #0f7b43; }
.bed-prec { margin-top: .15rem; font-size: .62rem; font-weight: 600; color: #fff; background: #6c757d;
  border-radius: 1rem; padding: .02rem .4rem; display: inline-block; align-self: flex-start;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cores dos estados */
.bed.free     { background: #d7f5e3; border-color: #7ed6a5; }
.bed.occupied { background: #fbd9dd; border-color: #ef9aa4; cursor: grab; }
.bed.occupied:active { cursor: grabbing; }
.bed.occupied:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-1px); }
.bed.dragging { opacity: .4; }
.bed.drop-hover { outline: 3px dashed #0d6efd; outline-offset: 2px; }
.bed.bed-loading { opacity: .5; pointer-events: none; }

/* Leito livre clicável → inicia admissão naquele leito */
a.bed.free { text-decoration: none; color: inherit; cursor: pointer; }
a.bed.free:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-1px); border-color: #0f7b43; }
a.bed.free .bed-admit-hint { margin-top: .1rem; font-size: .62rem; font-weight: 600; opacity: 0; color: #0f7b43; transition: opacity .1s ease; }
a.bed.free:hover .bed-admit-hint { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .bed.free     { background: rgba(25,135,84,.18); border-color: #2e7d54; }
  .bed.occupied { background: rgba(220,53,69,.20); border-color: #a13b45; }
  .bed-free-label { color: #4ade80; }
}
:root[data-bs-theme="dark"] .bed.free     { background: rgba(25,135,84,.18); border-color: #2e7d54; }
:root[data-bs-theme="dark"] .bed.occupied { background: rgba(220,53,69,.20); border-color: #a13b45; }
:root[data-bs-theme="dark"] .bed-free-label { color: #4ade80; }

.legend-box { display: inline-block; width: 16px; height: 12px; border-radius: 3px; vertical-align: middle; }
.legend-box.free     { background: #d7f5e3; border: 1.5px solid #7ed6a5; }
.legend-box.occupied { background: #fbd9dd; border: 1.5px solid #ef9aa4; }

/* ===== Login (split-screen, vitrine da plataforma) ===== */
.guest-body { min-height: 100vh; margin: 0; }
.login-split { min-height: 100vh; display: flex; }

/* Painel de marca (esquerda) */
.login-hero {
  flex: 1 1 58%; position: relative; overflow: hidden; color: #fff;
  display: flex; align-items: center; padding: 3rem 3.25rem;
  background:
    radial-gradient(ellipse 60% 50% at 28% 24%, rgba(46,230,214,.10), transparent 70%),
    linear-gradient(150deg, #05090f 0%, #081420 45%, #0b2231 78%, #0d3040 100%);
}

/* Fundo vivo: blobs "aurora" + malha técnica sutil */
.login-aurora {
  position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
  opacity: .55; will-change: transform;
}
.login-aurora--1 {
  width: 620px; height: 620px; left: -160px; top: -180px;
  background: radial-gradient(circle, rgba(46,230,214,.28), rgba(20,104,143,.14) 55%, transparent 72%);
  animation: login-drift 26s ease-in-out infinite alternate;
}
.login-aurora--2 {
  width: 560px; height: 560px; right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(124,58,237,.22), rgba(29,78,216,.16) 55%, transparent 72%);
  animation: login-drift 32s ease-in-out infinite alternate-reverse;
}
@keyframes login-drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(90px,60px,0) scale(1.15); }
}
.login-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 40% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 40% 40%, #000 30%, transparent 75%);
}

.login-hero-inner { position: relative; z-index: 1; max-width: 560px; margin: auto; }
.login-hero-brand { display: flex; align-items: center; gap: 1rem; font-size: 2rem; font-weight: 500; margin-bottom: 1.6rem; animation: login-fadeup .6s .05s both; }
.login-hero-brand img { width: 84px; height: 84px; filter: drop-shadow(0 0 22px rgba(46,230,214,.30)); }
.login-hero-brand small { display: block; font-size: .82rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.login-hero h2 { font-size: 1.85rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; margin-bottom: .8rem; animation: login-fadeup .6s .12s both; }
.login-hero .lead { opacity: .9; font-size: .98rem; margin-bottom: 1.7rem; animation: login-fadeup .6s .2s both; }

/* Termos em destaque no título */
.login-hl { color: #2ee6d6; white-space: nowrap; }

/* Vitrine de módulos */
.login-mods { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: 1.6rem; }
.login-mod {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem;
  border: 1px solid rgba(255,255,255,.10); border-radius: .8rem;
  background: rgba(255,255,255,.055); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  animation: login-fadeup .55s both; animation-delay: calc(.28s + var(--d, 0ms));
}
.login-mod:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--mc) 65%, #fff 10%);
  background: rgba(255,255,255,.09);
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--mc) 70%, transparent);
}
.login-mod-icon {
  width: 2.35rem; height: 2.35rem; border-radius: .65rem; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.1rem; color: #fff;
  background: linear-gradient(135deg, var(--mc), color-mix(in srgb, var(--mc) 65%, #000 20%));
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--mc) 85%, transparent);
}
.login-mod-text { min-width: 0; }
.login-mod-text strong { display: block; font-size: .86rem; font-weight: 600; line-height: 1.2; }
.login-mod-text span { display: block; font-size: .72rem; opacity: .72; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-mod--soon { opacity: .58; }
.login-mod--soon:hover { transform: none; box-shadow: none; }
.login-mod-soon {
  position: absolute; top: .4rem; right: .5rem; font-size: .58rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; padding: .12rem .4rem;
  border-radius: 99px; background: rgba(255,255,255,.14);
}

.login-hero-foot { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .76rem; opacity: .72; animation: login-fadeup .6s .9s both; }
.login-hero-foot i { margin-right: .3rem; }

@keyframes login-fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Formulário (direita) */
.login-form-side {
  flex: 1 1 42%; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background:
    radial-gradient(ellipse 70% 55% at 70% 20%, rgba(46,230,214,.07), transparent 70%),
    var(--page-bg, #f6f8fc);
}
.login-card {
  width: 100%; max-width: 390px; background: var(--bs-body-bg); border-radius: 1.1rem;
  padding: 2.25rem 2rem; border: 1px solid var(--bs-border-color-translucent);
  animation: login-fadeup .55s .15s both;
}
.login-brand { margin-bottom: 1.5rem; }
.login-brand h1 { font-size: 1.6rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.login-brand p { color: var(--bs-secondary-color); font-size: .88rem; margin: .3rem 0 0; }
.login-input .form-control, .login-input .input-group-text { transition: border-color .15s ease, box-shadow .15s ease; }
.login-input:focus-within .input-group-text { border-color: #14688f; color: #14688f; }
.login-eye { border-color: var(--bs-border-color); color: var(--bs-secondary-color); }
.login-eye:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border-color: var(--bs-border-color); }
.login-submit {
  position: relative; overflow: hidden; font-weight: 500;
  background: linear-gradient(135deg, #14688f, #0d9488); border: 0;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 20px -8px rgba(20,104,143,.55); }
.login-submit::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .45s ease;
}
.login-submit:hover::after { left: 130%; }
.login-card-foot { margin-top: 1.4rem; text-align: center; font-size: .74rem; color: var(--bs-secondary-color); }
.login-mobile-brand { display: none; }
.login-mobile-mods { display: none; }

@media (max-width: 900px) and (min-width: 861px) {
  .login-mods { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login-hero { display: none; }
  .login-form-side { flex: 1; background: linear-gradient(150deg, #05090f, #081420 45%, #0b2231 80%, #0d3040); }
  .login-mobile-brand { display: flex; align-items: center; justify-content: center; gap: .7rem; color: #fff; font-size: 1.7rem; font-weight: 500; margin-bottom: 1.25rem; }
  .login-mobile-brand img { width: 64px; height: 64px; filter: drop-shadow(0 0 16px rgba(46,230,214,.30)); }
  .login-card .login-mobile-brand { color: var(--bs-body-color); }
  .login-mobile-mods { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.3rem; }
  .login-mobile-mod {
    display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 500;
    padding: .28rem .6rem; border-radius: 99px;
    color: var(--mc); background: color-mix(in srgb, var(--mc) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--mc) 30%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-aurora { animation: none; }
  .login-hero-brand, .login-hero h2, .login-hero .lead, .login-mod, .login-hero-foot, .login-card { animation: none; }
}

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .user-meta { display: none; }
}

/* ===== Tipografia compacta padronizada =====
   Escala reduzida e uniforme (referência: menu ~.9rem). Nada muito grande,
   para melhor aproveitamento das telas. */
body { font-size: .92rem; }

h1, .h1 { font-size: 1.4rem; }
h2, .h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.12rem; }
h4, .h4 { font-size: 1.02rem; }
h5, .h5 { font-size: .94rem; }
h6, .h6 { font-size: .86rem; }

/* Utilitários de tamanho grandes do Bootstrap → limitados */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.fs-1 { font-size: 1.35rem !important; }
.fs-2 { font-size: 1.2rem  !important; }
.fs-3 { font-size: 1.08rem !important; }
.fs-4 { font-size: 1rem    !important; }
.lead { font-size: 1rem; }

/* Números/KPIs e cabeçalhos de página */
.kpi-value { font-size: 1.4rem; }
.page-header h1 { font-size: 1.25rem; }

/* Componentes densos e consistentes */
.card-header { font-size: .92rem; }
.table { font-size: .9rem; }
.form-control, .form-select { font-size: .9rem; }
.btn { font-size: .9rem; }
.btn-sm { font-size: .82rem; }
.badge { font-weight: 600; }

/* ===== Hub do Asclepi (seletor de módulos, pós-login) ===== */
.asclepi-hub { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg,#eef4f8,#f7fafc); }
.asclepi-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,.06); background: rgba(255,255,255,.7); }
.asclepi-brand { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; font-weight: 600; color: #14688f; letter-spacing: -.01em; }
.asclepi-brand img { width: 42px; height: 42px; }
.asclepi-user { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.asclepi-user-name { font-size: .9rem; color: #495057; }

/* Menus suspensos do topo do HUB (<details>, sem depender de Bootstrap JS) */
.asclepi-menu { position: relative; }
.asclepi-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asclepi-menu > summary::-webkit-details-marker { display: none; }
.asclepi-menu[open] > summary { background: #14688f; color: #fff; border-color: #14688f; }
.asclepi-menu[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.asclepi-menu-list { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 220px; background: #fff;
  border: 1px solid rgba(0,0,0,.1); border-radius: .6rem; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: .35rem; z-index: 1000; }
.asclepi-menu--end .asclepi-menu-list { right: 0; }
.asclepi-menu-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; padding: .35rem .65rem .2rem; }
.asclepi-menu-list a, .asclepi-menu-list button { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left;
  padding: .5rem .65rem; border-radius: .4rem; color: #334155; font-size: .9rem; text-decoration: none; background: none; border: 0; cursor: pointer; }
.asclepi-menu-list a:hover, .asclepi-menu-list button:hover { background: #eef4f8; color: #14688f; }
.asclepi-menu-list a .bi, .asclepi-menu-list button .bi { width: 1.1rem; text-align: center; color: #64748b; }
.asclepi-menu-list a:hover .bi, .asclepi-menu-list button:hover .bi { color: #14688f; }
.asclepi-menu-list hr { margin: .35rem .25rem; border: 0; border-top: 1px solid rgba(0,0,0,.08); }
:root[data-bs-theme="dark"] .asclepi-menu-list { background: #1a232e; border-color: rgba(255,255,255,.1); }
:root[data-bs-theme="dark"] .asclepi-menu-label { color: #7d8a9c; }
:root[data-bs-theme="dark"] .asclepi-menu-list a, :root[data-bs-theme="dark"] .asclepi-menu-list button { color: #cdd6df; }
:root[data-bs-theme="dark"] .asclepi-menu-list a:hover, :root[data-bs-theme="dark"] .asclepi-menu-list button:hover { background: #223041; color: #7fc4e6; }
:root[data-bs-theme="dark"] .asclepi-menu-list hr { border-top-color: rgba(255,255,255,.1); }
.asclepi-main { flex: 1; max-width: 1040px; width: 100%; margin: 0 auto; padding: 2.5rem 1.5rem; }
.asclepi-welcome { text-align: center; margin-bottom: 2rem; }
.asclepi-welcome h1 { font-size: 1.7rem; font-weight: 600; }
.asclepi-welcome p { color: #6c757d; }
.asclepi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px,1fr)); gap: .9rem; }
.asclepi-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: .9rem; padding: 1.1rem .7rem 1rem; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(16,24,40,.05); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.asclepi-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--mc, #14688f); opacity: .9; }
.asclepi-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(16,24,40,.16); }
.asclepi-card--soon { opacity: .75; cursor: default; }
.asclepi-card--soon::before { background: #cbd3dd; }
.asclepi-card--soon:hover { transform: none; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
/* Módulo existente, mas sem acesso para o usuário: cinza/escurecido + cadeado. */
.asclepi-card--locked { cursor: not-allowed; background: #eef1f4; border-color: rgba(0,0,0,.08); box-shadow: none; }
.asclepi-card--locked::before { background: #9aa6b2; opacity: .8; }
.asclepi-card--locked:hover { transform: none; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.asclepi-card--locked .asclepi-card-icon { filter: grayscale(1); opacity: .7; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.asclepi-card--locked .asclepi-card-title { color: #6b7683; }
.asclepi-card--locked .asclepi-card-sub .badge { background: #8a95a1 !important; }
.asclepi-card-lock { position: absolute; top: .5rem; right: .55rem; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); color: #6b7683; font-size: .72rem; box-shadow: 0 1px 3px rgba(16,24,40,.18); }
:root[data-bs-theme="dark"] .asclepi-card--locked { background: #141b23; border-color: rgba(255,255,255,.06); }
:root[data-bs-theme="dark"] .asclepi-card--locked .asclepi-card-title { color: #8a94a6; }
:root[data-bs-theme="dark"] .asclepi-card-lock { background: rgba(20,28,38,.9); color: #9aa6b2; }
.asclepi-card-icon { width: 58px; height: 58px; border-radius: 1rem; display: grid; place-items: center; font-size: 1.9rem; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.18); margin-top: .3rem; }
.asclepi-card-title { font-weight: 700; font-size: .98rem; color: #1c2b38; line-height: 1.12; }
.asclepi-card-sub { font-size: .62rem; text-transform: uppercase; letter-spacing: .03em; color: #90a0af; font-weight: 600; line-height: 1.25; }
:root[data-bs-theme="dark"] .asclepi-card-title { color: #e9eef3; }
.asclepi-footer { text-align: center; padding: 1rem; color: #8a94a6; }
:root[data-bs-theme="dark"] .asclepi-hub { background: linear-gradient(160deg,#0f1720,#131b24); }
:root[data-bs-theme="dark"] .asclepi-topbar { background: rgba(20,28,38,.7); border-color: rgba(255,255,255,.06); }
:root[data-bs-theme="dark"] .asclepi-card { background: #1a232e; border-color: rgba(255,255,255,.08); }

/* Painel de administração da SIGTAP no hub */
.asclepi-sigtap { max-width: 1040px; width: 100%; margin: 1.5rem auto 0; padding: 0 1.5rem; }
.asclepi-sigtap-card { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .9rem; padding: 1.25rem 1.4rem; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.asclepi-sigtap-head { display: flex; gap: 1rem; align-items: flex-start; }
.asclepi-sigtap-icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: .7rem; display: grid; place-items: center; color: #fff; font-size: 1.4rem; background: linear-gradient(135deg,#14688f,#0ea5a3); }
.asclepi-sigtap-head h2 { font-size: 1.15rem; font-weight: 600; margin: 0; }
.asclepi-sigtap-head p { color: #6c757d; margin: .2rem 0 0; font-size: .9rem; max-width: 70ch; }
.asclepi-sigtap-status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 .25rem; }
.asclepi-sigtap-meta { color: #6c757d; font-size: .86rem; }
.asclepi-sigtap-actions { display: flex; align-items: center; gap: .8rem; margin-top: .75rem; flex-wrap: wrap; }
.asclepi-sigtap-log { margin: 1rem 0 0; max-height: 260px; overflow: auto; background: #0b2135; color: #cfe0f0; border-radius: .6rem; padding: .8rem 1rem; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; }
:root[data-bs-theme="dark"] .asclepi-sigtap-card { background: #1a232e; border-color: rgba(255,255,255,.08); }
