/* ════════════════════════════════════════════════════════════════
   NexusCare · Tema Hospital Privado de Bragança (réplica fiel do site)
   Laranja (#ed8b00) + preto + branco · títulos slab-serif (Bitter)
   Carregado DEPOIS de app.css.
   ════════════════════════════════════════════════════════════════ */

:root {
  --hpb:        #ed8b00;
  --hpb-deep:   #d97e00;
  --hpb-dark:   #b9640a;
  --hpb-soft:   #fff6ea;
  --hpb-ink:    #2a2a2a;
  --hpb-ink2:   #6a7077;
  --hpb-line:   #e7e7e7;
  --serif: 'Bitter', Georgia, 'Times New Roman', serif;

  /* Re-skin do backoffice (sobrepõe app.css) */
  --brand: #ed8b00; --brand-2: #f4a52a; --brand-deep: #b9640a; --accent: #ed8b00;
}

body.pg-inicio, body.pg-especialidades, body.pg-corpo_clinico, body.pg-contactos,
body.pg-utente_login, body.pg-utente_registo, body.pg-marcar, body.pg-minhas_marcacoes,
body.pg-hospital, body.pg-convencoes, body.pg-noticias {
  background: #fff; color: var(--hpb-ink);
}

.hpb-container { width: min(1240px, 92%); margin-inline: auto; }
.pg-inicio h1, .pg-inicio h2, .pg-inicio h3,
.hpb-section-head h2, .hpb-page-head h1, .hpb-auth h1 { font-family: var(--serif); }

/* ════════════ TOPBAR ════════════ */
.hpb-topbar { background: #232323; color: #c8c8c8; font-size: .82rem; }
.hpb-topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; gap: 1rem; flex-wrap: wrap; }
.hpb-topbar i { color: var(--hpb); }
.hpb-topbar-right { display: flex; gap: 1.4rem; }
.hpb-topbar a:hover { color: #fff; }

/* ════════════ HEADER ════════════ */
.hpb-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #f0f0f0; box-shadow: 0 4px 18px -12px rgba(0,0,0,.35); }
.hpb-header-inner { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; gap: 1.5rem; }

.hpb-logo-lockup { display: inline-flex; align-items: center; gap: .7rem; }
.hpb-mark { width: 58px; height: 58px; flex: none; }
.hpb-word { display: flex; flex-direction: column; line-height: 1; }
.hpb-word b { font-size: 1.55rem; font-weight: 800; letter-spacing: .01em; color: #1a1a1a; }
.hpb-word small { font-size: .66rem; font-weight: 600; letter-spacing: .14em; margin-top: 3px; color: #1a1a1a; }

.hpb-nav { display: flex; align-items: center; gap: 1.5rem; }
.hpb-nav > a { font-weight: 500; font-size: 1rem; color: #3a3a3a; }
.hpb-nav > a:hover { color: var(--hpb); }
.hpb-nav > a.active { color: var(--hpb); font-weight: 600; }
.hpb-cta { display: inline-flex !important; align-items: center; gap: .45rem; background: linear-gradient(180deg, var(--hpb), var(--hpb-deep));
  color: #fff !important; padding: 1rem 1.8rem; border-radius: 7px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .95rem; box-shadow: 0 8px 20px -10px var(--hpb); }
.hpb-cta:hover { filter: brightness(1.05); }
.hpb-burger { display: none; font-size: 1.9rem; cursor: pointer; color: #1a1a1a; }
.hpb-nav-toggle { display: none; }

/* ════════════ BOTÕES ════════════ */
.hpb-btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem;
  padding: .85rem 1.7rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: .15s; }
.hpb-btn--primary { background: var(--hpb); color: #fff; }
.hpb-btn--primary:hover { background: var(--hpb-deep); }
.hpb-btn--ghost { background: transparent; border-color: var(--hpb); color: var(--hpb); }
.hpb-btn--ghost:hover { background: var(--hpb-soft); }
.hpb-btn--outline-white { background: transparent; border-color: #ffffff99; color: #fff; }
.hpb-btn--outline-white:hover { background: #ffffff22; border-color: #fff; }
.hpb-btn--dark { background: #232323; color: #fff; }
.hpb-btn--block { width: 100%; justify-content: center; }
.hpb-btn--sm { padding: .5rem 1rem; font-size: .85rem; }

/* ════════════ PAINÉIS DE DESTAQUE (3 colunas laranja) ════════════ */
.hpb-panels { display: grid; grid-template-columns: repeat(3, 1fr); }
.hpb-panel { padding: 2.6rem 2.2rem; color: #fff; min-height: 300px; display: flex; flex-direction: column; }
.hpb-panel:nth-child(1) { background: #e88a1a; }
.hpb-panel:nth-child(2) { background: #ee9622; }
.hpb-panel:nth-child(3) { background: #f0a338; }
.hpb-panel h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; margin-bottom: 1rem; }
.hpb-panel p { color: #fff; opacity: .95; line-height: 1.6; }
.hpb-panel .hpb-btn { margin-top: auto; align-self: flex-start; }
.hpb-panel-rows { margin-top: .5rem; }
.hpb-panel-rows .row { display: flex; justify-content: space-between; padding: .9rem 0; border-top: 1px solid #ffffff44; font-size: 1.05rem; }
.hpb-panel-rows .row:first-child { border-top: none; }

/* ════════════ SUBHEAD CENTRADO ════════════ */
.hpb-subhead { text-align: center; padding: 3.5rem 0; }
.hpb-subhead h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); color: #444; }

/* ════════════ FAIXA DE ESTATÍSTICAS ════════════ */
.hpb-stats { position: relative; background: linear-gradient(rgba(20,28,40,.62), rgba(20,28,40,.62)),
    linear-gradient(120deg, #5b6b86, #34507a); color: #fff; }
.hpb-stats-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 5rem 0; text-align: center; }
.hpb-stats strong { display: block; font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 300; line-height: 1; }
.hpb-stats strong sup { font-size: .5em; }
.hpb-stats span { font-size: 1.15rem; font-weight: 300; opacity: .95; }

/* ════════════ BANDA CTA ════════════ */
.hpb-cta-band { background: var(--hpb); color: #fff; }
.hpb-cta-band-inner { display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 2.4rem 0; flex-wrap: wrap; }
.hpb-cta-band h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.9rem); }

/* ════════════ SECÇÕES GENÉRICAS ════════════ */
.hpb-section { padding: clamp(3rem,6vw,4.5rem) 0; }
.hpb-section--soft { background: #faf9f7; }
.hpb-section-head { text-align: center; max-width: 60ch; margin: 0 auto 2.6rem; }
.hpb-section-kicker { color: var(--hpb); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; }
.hpb-section-head h2 { font-size: clamp(1.7rem,3.5vw,2.4rem); font-weight: 700; margin-top: .4rem; }
.hpb-section-head p { color: var(--hpb-ink2); margin-top: .7rem; }

/* ════════════ COMPROMISSO (imagem + checklist) ════════════ */
.hpb-compromisso { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hpb-compromisso-img { border-radius: 8px; min-height: 380px; background:
    radial-gradient(120% 120% at 30% 20%, #ffe9cf, #f6d3a6 60%, #eebf86);
    display: grid; place-items: center; color: #ffffffcc; position: relative; overflow: hidden; }
.hpb-compromisso-img i { font-size: 9rem; color: #ffffff; opacity: .55; }
.hpb-compromisso h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.2; color: #3a4a63; }
.hpb-compromisso > div > p { color: var(--hpb-ink2); margin: 1.2rem 0; line-height: 1.7; }
.hpb-checklist { list-style: none; display: grid; gap: .9rem; }
.hpb-checklist li { display: flex; align-items: center; gap: .7rem; color: #3a4a63; }
.hpb-checklist li i { color: var(--hpb); font-size: 1.3rem; }

/* ════════════ DUAS COLUNAS (Especialidades / Corpo Clínico) ════════════ */
.hpb-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.hpb-twocol h2 { font-family: var(--serif); font-size: 2rem; font-weight: 700; padding-bottom: .8rem; position: relative; }
.hpb-twocol h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 70px; height: 3px; background: var(--hpb); }
.hpb-twocol p { color: var(--hpb-ink2); margin: 1.2rem 0; line-height: 1.7; }

/* ════════════ NOTÍCIAS ════════════ */
.hpb-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.hpb-news-card { background: #fff; border: 1px solid #ededed; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 14px 30px -22px rgba(0,0,0,.4); }
.hpb-news-img { height: 180px; position: relative; background: linear-gradient(135deg, #ffd9a8, #f3b06a); display: grid; place-items: center; }
.hpb-news-img i { font-size: 3.6rem; color: #ffffffaa; }
.hpb-news-img::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--hpb); }
.hpb-news-date { position: absolute; left: 16px; bottom: 14px; background: var(--hpb); color: #fff; font-weight: 700; font-size: .75rem; padding: .4rem .7rem; border-radius: 3px; }
.hpb-news-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.hpb-news-body h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.hpb-news-body p { color: var(--hpb-ink2); font-size: .92rem; margin: .7rem 0 1rem; flex: 1; }
.hpb-readmore { color: var(--hpb); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }

/* Paginação */
.hpb-pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2.4rem; }
.hpb-pagination a, .hpb-pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #e3e3e3; border-radius: 6px; color: #555; font-weight: 600; }
.hpb-pagination .is-active { background: var(--hpb); color: #fff; border-color: var(--hpb); }

/* ════════════ CARTÕES DE POLÍTICA ════════════ */
.hpb-policies { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 900px; margin: 0 auto; text-align: center; }
.hpb-policy-ic { width: 150px; height: 150px; margin: 0 auto 1.2rem; border: 1px solid #ededed; border-radius: 8px; display: grid; place-items: center; color: var(--hpb); font-size: 4.5rem; }
.hpb-policy h3 { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; }
.hpb-policy p { color: var(--hpb-ink2); margin: .8rem 0 1rem; }

/* ════════════ ESPECIALIDADES / CORPO CLÍNICO (páginas) ════════════ */
.hpb-page { padding: clamp(2rem,5vw,3.5rem) 0; }
.hpb-page-head { margin-bottom: 1.8rem; }
.hpb-page-head h1 { font-family: var(--serif); font-size: clamp(1.6rem,3.5vw,2.2rem); font-weight: 700; }
.hpb-page-head p { color: var(--hpb-ink2); margin-top: .4rem; }

.hpb-esp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 1rem; }
.hpb-esp-card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--hpb-line); border-radius: 8px; padding: 1.1rem 1.2rem; transition: .15s; }
.hpb-esp-card:hover { border-color: var(--hpb); box-shadow: 0 12px 26px -18px rgba(237,139,0,.6); transform: translateY(-2px); }
.hpb-esp-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--hpb-soft); color: var(--hpb); font-size: 1.5rem; }
.hpb-esp-card strong { font-size: .98rem; }

.hpb-med-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 1.2rem; }
.hpb-med-card { background: #fff; border: 1px solid var(--hpb-line); border-radius: 10px; padding: 1.4rem; text-align: center; }
.hpb-med-avatar { width: 72px; height: 72px; margin: 0 auto .8rem; border-radius: 50%; background: var(--hpb-soft); display: grid; place-items: center; color: var(--hpb); font-size: 2rem; }
.hpb-med-card strong { display: block; }
.hpb-med-card small { color: var(--hpb-ink2); }

.hpb-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.hpb-contact-card { background: #fff; border: 1px solid var(--hpb-line); border-radius: 10px; padding: 1.5rem; }
.hpb-contact-card i { font-size: 1.8rem; color: var(--hpb); }
.hpb-contact-card h3 { margin: .6rem 0 .3rem; font-size: 1.05rem; }
.hpb-contact-card p, .hpb-contact-card a { color: var(--hpb-ink2); font-size: .95rem; }

/* ════════════ FORMULÁRIOS / PORTAL ════════════ */
.hpb-auth { max-width: 460px; margin: clamp(2rem,6vw,4rem) auto; background: #fff; border: 1px solid var(--hpb-line); border-radius: 12px; padding: 2.2rem; box-shadow: 0 24px 50px -30px rgba(0,0,0,.25); }
.hpb-auth h1 { font-size: 1.5rem; }
.hpb-auth .hpb-sub { color: var(--hpb-ink2); margin: .3rem 0 1.4rem; font-size: .92rem; }
.hpb-form { display: grid; gap: 1rem; }
.hpb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hpb-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--hpb-ink); margin-bottom: .35rem; }
.hpb-field input, .hpb-field select, .hpb-field textarea { width: 100%; border: 1px solid var(--hpb-line); border-radius: 8px; padding: .75rem .9rem; font: inherit; background: #fff; transition: .15s; }
.hpb-field input:focus, .hpb-field select:focus, .hpb-field textarea:focus { outline: none; border-color: var(--hpb); box-shadow: 0 0 0 4px #ed8b0022; }
.hpb-field textarea { resize: vertical; min-height: 90px; }
.hpb-form-aside { text-align: center; margin-top: 1.1rem; font-size: .9rem; color: var(--hpb-ink2); }
.hpb-form-aside a { color: var(--hpb); font-weight: 600; }

.hpb-alert { display: flex; align-items: center; gap: .5rem; border-radius: 8px; padding: .8rem 1rem; font-size: .92rem; margin-bottom: 1.2rem; }
.hpb-alert--erro { background: #fdecec; color: #b91c1c; border: 1px solid #f5b9b9; }
.hpb-alert--ok { background: #e9f9ef; color: #0f7a44; border: 1px solid #aee5c6; }

/* Slots de horário (agendamento inteligente) */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px,1fr)); gap: .5rem; margin-top: .4rem; }
.slot { padding: .6rem 0; text-align: center; border: 1px solid var(--hpb-line); border-radius: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; background: #fff; transition: .12s; }
.slot:hover:not(.is-busy) { border-color: var(--hpb); color: var(--hpb); }
.slot.is-busy { background: #f4f4f4; color: #bbb; cursor: not-allowed; text-decoration: line-through; }
.slot.is-sel { background: var(--hpb); color: #fff; border-color: var(--hpb); }
.slot-legend { display: flex; gap: 1.2rem; font-size: .8rem; color: var(--hpb-ink2); margin-top: .6rem; }
.slot-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: .3rem; }

/* Marcações do utente */
.hpb-marc-list { display: grid; gap: .9rem; }
.hpb-marc-card { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--hpb-line); border-radius: 10px; padding: 1rem 1.2rem; }
.hpb-marc-date { flex: none; text-align: center; background: var(--hpb-soft); border-radius: 8px; padding: .6rem .8rem; min-width: 70px; }
.hpb-marc-date b { display: block; font-size: 1.4rem; font-weight: 800; color: var(--hpb-dark); line-height: 1; }
.hpb-marc-date small { font-size: .72rem; color: var(--hpb-dark); text-transform: uppercase; }
.hpb-marc-info { flex: 1; }
.hpb-marc-info strong { display: block; }
.hpb-marc-info small { color: var(--hpb-ink2); }
.hpb-estado { font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; }
.hpb-estado.e-pendente { background: #fff4e0; color: #b45309; }
.hpb-estado.e-confirmada { background: #e6f6ed; color: #0f7a44; }
.hpb-estado.e-realizada { background: #eef2f7; color: #475569; }
.hpb-estado.e-cancelada { background: #fdecec; color: #b91c1c; }

/* ════════════ RODAPÉ ════════════ */
.hpb-footer { background: #1c1c1c; color: #c8c8c8; margin-top: 0; }
.hpb-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.hpb-footer-brand p { margin-top: 1rem; color: var(--hpb); font-weight: 700; }
.hpb-footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; font-family: var(--serif); }
.hpb-footer-col a, .hpb-footer-col p { display: block; color: #c8c8c8; font-size: .9rem; margin-bottom: .5rem; }
.hpb-footer-col i { color: var(--hpb); margin-right: .3rem; }
.hpb-footer-col a:hover { color: var(--hpb); }
.hpb-footer-base { border-top: 1px solid #2e2e2e; font-size: .8rem; color: #8a8a8a; }
.hpb-footer-base .hpb-container { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }

/* ════════════ BACKOFFICE (extras sobre app.css) ════════════ */
.fila-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 1rem; }
.fila-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--c, #94a3b8); border-radius: 14px; padding: 1.1rem; box-shadow: var(--shadow-sm); }
.fila-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.fila-card-top strong { font-size: 1.05rem; }
.fila-card .queixa { color: var(--ink-soft); font-size: .9rem; margin: .5rem 0; }
.fila-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); margin-bottom: .8rem; flex-wrap: wrap; }
.fila-meta b { color: var(--ink); }
.fila-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.fila-actions form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.fila-actions select, .fila-actions input { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .5rem; font: inherit; font-size: .82rem; }

.ficha-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.4rem; }
.ficha-form .field-block { margin-bottom: 1rem; }
.ficha-form label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.ficha-form input, .ficha-form select, .ficha-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; font: inherit; }
.ficha-form textarea { min-height: 90px; resize: vertical; }
.ficha-patient { display: grid; gap: .5rem; }
.ficha-patient .row { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: .5rem 0; font-size: .9rem; }
.ficha-patient .row span { color: var(--ink-soft); }
.hist-item { border-left: 3px solid var(--brand); padding: .6rem .8rem; background: var(--surface-2); border-radius: 8px; margin-bottom: .6rem; }
.hist-item time { font-size: .76rem; color: var(--muted); }
.hist-item strong { display: block; font-size: .9rem; }
.vitais-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px,1fr)); gap: .6rem; }
.vital { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; text-align: center; }
.vital span { font-size: .72rem; color: var(--muted); display: block; }
.vital strong { font-size: 1.1rem; }

.estado-tag { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.estado-tag.e-pendente { background: #fff4e0; color: #b45309; }
.estado-tag.e-confirmada { background: #e6f6ed; color: #0f7a44; }
.estado-tag.e-realizada { background: #eef2f7; color: #475569; }
.estado-tag.e-cancelada { background: #fdecec; color: #b91c1c; }

.flash { display: flex; align-items: center; gap: .5rem; border-radius: 10px; padding: .8rem 1rem; font-size: .92rem; }
.flash--ok { background: #e9f9ef; color: #0f7a44; border: 1px solid #aee5c6; }
.flash--erro { background: #fdecec; color: #b91c1c; border: 1px solid #f5b9b9; }
.flash--info { background: #eaf2fe; color: #1e4fa3; border: 1px solid #bcd4f5; }

/* Badge de perfil no menu */
.sb-role { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  background: var(--hpb); color: #fff; padding: .15rem .5rem; border-radius: 6px; margin-top: .3rem; }

/* Sino de notificações (topbar) */
.notif { position: relative; margin-left: auto; }
.topbar-meta { margin-left: 1rem !important; }
.notif summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; position: relative; color: var(--ink); }
.notif summary::-webkit-details-marker { display: none; }
.notif summary i { font-size: 1.4rem; }
.notif summary:hover { background: var(--surface-2); }
.notif-badge { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.notif-drop { position: absolute; right: 0; top: 50px; width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); font-size: .85rem; }
.notif-head a { color: var(--hpb); font-weight: 600; font-size: .78rem; }
.notif-empty { padding: 1.2rem; color: var(--muted); font-size: .88rem; text-align: center; }
.notif-item { display: block; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item strong { display: block; font-size: .85rem; }
.notif-item small { display: block; color: var(--ink-soft); font-size: .78rem; margin: .1rem 0; }
.notif-item time { font-size: .7rem; color: var(--muted); }
.notif-item.is-unread { background: #fff7ec; }
.notif-item.is-unread strong { color: var(--hpb-dark); }

/* Contexto situacional (IA / NLP) */
.situacao-card { border-left: 5px solid #94a3b8; }
.situacao-card.sit-elevado { border-left-color: #f59e0b; }
.situacao-card.sit-critico { border-left-color: #ef4444; }
.sit-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.sit-metric { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.sit-metric span { font-size: .76rem; color: var(--muted); display: block; }
.sit-metric strong { font-size: 1.3rem; }
.sit-eventos { list-style: none; display: grid; gap: .5rem; }
.sit-eventos li { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; border-left: 4px solid #94a3b8; }
.sit-eventos li.sev3 { border-left-color: #ef4444; background: #ef44440a; }
.sit-eventos li.sev2 { border-left-color: #f97316; background: #f973160a; }
.sit-eventos li.sev1 { border-left-color: #f59e0b; }
.sit-eventos a { color: var(--ink); font-weight: 500; flex: 1; }
.sit-eventos a:hover { color: var(--brand); }
.sit-fonte { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: #64748b; padding: .2rem .5rem; border-radius: 6px; flex: none; }
.sit-cat { font-size: .7rem; font-weight: 700; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); padding: .15rem .5rem; border-radius: 6px; flex: none; }
.sit-local { font-size: .72rem; color: var(--ink-soft); flex: none; white-space: nowrap; }
.sit-local i { color: var(--brand); }
.sit-sev { font-size: .72rem; color: var(--muted); flex: none; }
.sit-vazio { color: #047857; background: #10b9811a; border-color: #10b98133 !important; border-left-color: #10b981 !important; }
.sit-vazio i { font-size: 1.1rem; }
@media (max-width: 760px) { .sit-top { grid-template-columns: 1fr; } }

/* ── Hospital híbrido (v8) ─────────────────────────────────── */
/* Modalidade no formulário de marcação */
.modalidade-opts { display: flex; gap: .8rem; flex-wrap: wrap; }
.mod-opt { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--hpb-line); border-radius: 10px; padding: .7rem 1rem; cursor: pointer; font-weight: 600; flex: 1; justify-content: center; }
.mod-opt i { color: var(--hpb); font-size: 1.2rem; }
.mod-opt:has(input:checked) { border-color: var(--hpb); background: var(--hpb-soft); }
.mod-badge { font-size: .68rem; font-weight: 700; background: #2dd4bf22; color: #0f766e; padding: .15rem .5rem; border-radius: 6px; margin-left: .4rem; }

/* Videoconsulta (Jitsi) */
.video-wrap { position: relative; width: 100%; height: 64vh; min-height: 380px; background: #0b1220; border-radius: 12px; overflow: hidden; }
.video-wrap #jitsi { position: absolute; inset: 0; }

/* Sugestões de diagnóstico (teleconsulta) */
.sugestoes-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-sugestao { display: inline-flex; align-items: center; gap: .35rem; background: var(--hpb-soft); color: var(--hpb-dark); border: 1px solid #f3c98f; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.chip-sugestao:hover { background: #ffe9cf; }
.chip-sugestao:disabled { cursor: default; }

/* Salas (mapa físico + higienização) */
.salas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .8rem; }
.sala-card { border: 1px solid var(--line); border-top: 4px solid var(--c, #94a3b8); border-radius: 12px; padding: .9rem; text-align: center; background: #fff; }
.sala-card strong { font-size: 1.1rem; display: block; }
.sala-estado { font-size: .8rem; font-weight: 700; }
.sala-card small { display: block; color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.salas-limpeza { display: grid; gap: .7rem; }
.sala-limpeza-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-left: 4px solid #f59e0b; border-radius: 12px; padding: .9rem 1.1rem; background: #f59e0b08; }
.sala-limpeza-card small { display: block; color: var(--muted); font-size: .78rem; }

/* Reforço de equipas (Centro de Controlo) */
.reforco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.reforco-card { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; text-align: center; background: var(--surface-2); }
.reforco-card i { font-size: 1.8rem; color: var(--muted); }
.reforco-card strong { display: block; font-size: 1.6rem; margin: .2rem 0; color: var(--ink); }
.reforco-card span { font-size: .8rem; color: var(--ink-soft); }
.reforco-card.is-on { border-color: var(--brand); background: #ed8b0010; }
.reforco-card.is-on i, .reforco-card.is-on strong { color: var(--brand); }
@media (max-width: 600px) { .reforco-grid { grid-template-columns: 1fr; } }

/* ── Copiloto Clínico (v9) ─────────────────────────────────── */
/* Alerta de emergência (red flag no agendamento) */
.alerta-emergencia { display: flex; gap: 1rem; align-items: flex-start; background: #fdecec; border: 2px solid #ef4444;
  border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.alerta-emergencia > i { font-size: 2.4rem; color: #b91c1c; flex: none; }
.alerta-emergencia strong { color: #b91c1c; font-size: 1.1rem; }
.alerta-emergencia p { color: #7f1d1d; margin-top: .3rem; }

/* Briefing clínico (IA) */
.briefing-card { background: linear-gradient(120deg, #fff6ea, #fff); border: 1px solid #f3c98f;
  border-left: 5px solid var(--brand); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.briefing-head { font-weight: 700; color: var(--brand-deep); display: flex; align-items: center; gap: .4rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.briefing-resumo { margin: .6rem 0; color: var(--ink); line-height: 1.6; }
.briefing-sug { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.briefing-mcdt { background: #fff; border: 1px dashed #f3c98f; border-radius: 10px; padding: .6rem .9rem; font-size: .9rem; color: var(--ink-soft); }
.briefing-mcdt i { color: var(--brand); }

/* Copiloto em tempo real */
.copiloto-box { display: grid; gap: .5rem; }
.copiloto-sug { display: flex; align-items: flex-start; gap: .4rem; background: #eaf2fe; border: 1px solid #bcd4f5;
  border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; color: #1e4fa3; animation: fadeIn .3s ease; }
.copiloto-sug i { color: #2563eb; margin-top: .1rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Linha do tempo (histórico longitudinal) */
.timeline { list-style: none; position: relative; padding-left: 1.3rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 .9rem 1rem; }
.timeline li i { position: absolute; left: -1.3rem; top: 0; width: 22px; height: 22px; background: var(--brand); color: #fff;
  border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }
.timeline time { display: block; font-size: .74rem; color: var(--muted); }
.timeline span { font-size: .9rem; }

/* ── RAG · evidência clínica (v10) ─────────────────────────── */
.rag-card { margin-top: 1.4rem; border-left: 5px solid #6366f1; }
.rag-list { display: grid; gap: .7rem; }
.rag-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; transition: opacity .2s; }
.rag-item p { font-size: .9rem; color: var(--ink); }
.rag-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.rag-foot cite { font-style: normal; font-size: .76rem; color: #4f46e5; font-weight: 600; }
.rag-fb { display: flex; gap: .35rem; }
.rag-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.rag-ok { color: #10b981; } .rag-ok:hover { background: #10b9811a; border-color: #10b981; }
.rag-no { color: #ef4444; } .rag-no:hover { background: #ef44441a; border-color: #ef4444; }
.rag-item.rag-aceite { border-left: 3px solid #10b981; }
.rag-item.rag-ignorado { opacity: .5; }
.rag-tag-ok { color: #047857; font-size: .78rem; font-weight: 700; }
.rag-tag-no { color: var(--muted); font-size: .78rem; }

/* ── Escalas (gestão) ──────────────────────────────────────── */
.escala-dia { margin-bottom: 1.1rem; }
.escala-dia h3 { font-size: .9rem; color: var(--ink-soft); border-bottom: 2px solid var(--line); padding-bottom: .3rem; margin-bottom: .5rem; }
.escala-turno { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-left: 4px solid var(--c, #94a3b8); background: var(--surface-2); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .4rem; }
.escala-turno strong { display: inline-block; min-width: 96px; }
.escala-turno span { color: var(--ink-soft); font-size: .88rem; }
.escala-del { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1.1rem; }
.escala-del:hover { color: #b91c1c; }

/* ── Processo clínico (imprimível) ─────────────────────────── */
body.pg-processo { background: #f1f3f6; }
.processo { max-width: 820px; margin: 1.5rem auto; padding: 0 1rem; }
.processo-bar { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.processo-doc { background: #fff; border: 1px solid var(--hpb-line); border-radius: 6px; padding: 2.4rem; box-shadow: 0 10px 30px -18px rgba(0,0,0,.3); }
.processo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--hpb); padding-bottom: 1rem; margin-bottom: 1.4rem; }
.processo-head-meta { text-align: right; }
.processo-head-meta h1 { font-family: var(--serif); font-size: 1.6rem; }
.processo-head-meta small { color: var(--hpb-ink2); }
.processo-sec { margin-bottom: 1.6rem; }
.processo-sec h2 { font-family: var(--serif); font-size: 1.15rem; color: var(--hpb-dark); border-bottom: 1px solid var(--hpb-line); padding-bottom: .3rem; margin-bottom: .8rem; }
.processo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.4rem; }
.processo-grid span { font-size: .76rem; color: var(--hpb-ink2); display: block; }
.processo-ficha { border-left: 3px solid var(--hpb); padding: .5rem 0 .5rem .9rem; margin-bottom: 1rem; }
.processo-ficha-top { display: flex; justify-content: space-between; gap: 1rem; }
.processo-ficha-top span { color: var(--hpb-ink2); font-size: .85rem; }
.processo-ficha p { font-size: .9rem; margin-top: .35rem; line-height: 1.5; }
.processo-timeline { list-style: none; display: grid; gap: .35rem; }
.processo-timeline li { font-size: .88rem; padding-left: .8rem; border-left: 2px solid var(--hpb-line); }
.processo-foot { border-top: 1px solid var(--hpb-line); padding-top: 1rem; margin-top: 1.6rem; font-size: .78rem; color: var(--hpb-ink2); text-align: center; }
@media print {
  body { background: #fff !important; }
  .hpb-topbar, .hpb-header, .hpb-footer, .no-print, .app-shell .sidebar, .topbar { display: none !important; }
  .processo { margin: 0; max-width: none; padding: 0; }
  .processo-doc { border: none; box-shadow: none; padding: 0; }
}

/* ── Lean + aprendizagem (Centro de Controlo) ──────────────── */
.lean-card { border-left: 5px solid #6366f1; }
.lean-gargalo { font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.lean-gargalo i { color: #6366f1; font-size: 1.4rem; }
.lean-evidencia { color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.lean-cite { font-style: normal; font-size: .78rem; color: #4f46e5; font-weight: 600; display: inline-block; margin-top: .4rem; }
.aprend-stat { text-align: center; padding: .6rem 0; }
.aprend-stat strong { display: block; font-size: 2.6rem; font-weight: 900; color: var(--brand); line-height: 1; }
.aprend-stat span { color: var(--ink-soft); font-size: .85rem; }

/* Logótipo PNG */
.hpb-logo-img { height: 56px; width: auto; display: block; }
.hpb-logo-img--mono { filter: brightness(0) invert(1); }
.sidebar .hpb-logo-img { height: 40px; }

/* ════════════ RESPONSIVO ════════════ */
@media (max-width: 980px) {
  .hpb-panels { grid-template-columns: 1fr; }
  .hpb-stats-inner { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; }
  .hpb-compromisso, .hpb-twocol, .hpb-news, .hpb-policies, .hpb-footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .ficha-layout { grid-template-columns: 1fr; }
  .hpb-burger { display: block; }
  .hpb-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 88%); background: #fff; flex-direction: column;
    align-items: flex-start; padding: 5rem 1.6rem 2rem; gap: 1.2rem; transform: translateX(100%); transition: transform .25s;
    box-shadow: -10px 0 30px -15px rgba(0,0,0,.3); overflow-y: auto; }
  .hpb-nav-toggle:checked ~ .hpb-nav { transform: translateX(0); }
}
@media (max-width: 520px) {
  .hpb-form-row { grid-template-columns: 1fr; }
  .hpb-cta-band-inner { flex-direction: column; text-align: center; }
}

/* Componentes de IA (painel do Agente + métricas do RAG) → public/assets/css/components.css */
