/* =============================================================================
   app.css : Sistema de Gestão Interna, Administração Municipal de Belas
   Software de gestão: denso, funcional. Suporta tema claro/escuro via
   [data-theme="dark"] no <html>.
============================================================================= */

:root {
  --primary: #B3001B;
  --primary-dark: #8C0016;
  --gold: #C8963E;
  --ink: #1C1B1A;
  --muted: #6B6862;
  --border: #E4E1DB;
  --surface: #FFFFFF;
  --bg: #F7F6F3;
  --bg-sidebar: #FFFFFF;
  --ok: #1F7A47;
  --ok-bg: #EAF5EE;
  --warn: #96731E;
  --warn-bg: #FBF3E2;
  --danger: #B3001B;
  --danger-bg: #FBEAEC;
  --overlay: #FFFFFF;
  --radius: 6px;
  --shadow: 0 4px 16px rgba(20,20,20,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[data-theme="dark"] {
  --ink: #EDECE9;
  --muted: #9C988F;
  --border: #34322D;
  --surface: #201F1C;
  --bg: #171614;
  --bg-sidebar: #1B1A17;
  --ok-bg: rgba(31,122,71,0.16);
  --warn-bg: rgba(150,115,30,0.18);
  --danger-bg: rgba(179,0,27,0.18);
  --overlay: #26241F;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 0.95rem; line-height: 1.55; -webkit-font-smoothing: antialiased;
  transition: background .15s, color .15s;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
button, select, input, textarea { color: var(--ink); }

/* ── Estrutura geral: sidebar + topbar + conteúdo ─────────────────────────── */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar-backdrop { display: none; }

.sidebar { background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar__brand { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: .65rem; padding: .7rem 1rem; min-height: 68px; box-sizing: border-box; border-bottom: 1px solid var(--border); }
.sidebar__brand > img { display: block; flex: 0 1 auto; height: 26px; width: auto; max-width: 110px; object-fit: contain; object-position: left center; }
.sidebar__brand-version { flex: 0 0 auto; border-left: 1px solid var(--border); padding-left: .65rem; color: var(--ink); font-size: .8rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1.1; }
.brand-lockup strong { font-size: .78rem; letter-spacing: .01em; }
.brand-lockup small { font-size: .57rem; color: var(--muted); margin-top: .16rem; white-space: nowrap; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 0.85rem 0.6rem; }
.sidebar__group-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0.9rem 0.6rem 0.35rem; }
.sidebar__group-label:first-child { padding-top: 0.2rem; }
.sidebar__link { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: var(--radius); font-size: 0.86rem; font-weight: 500; color: var(--ink); margin-bottom: 2px; border-left: 2px solid transparent; scroll-margin-top: 3rem; scroll-margin-bottom: 3rem; }
.sidebar__link svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.sidebar__link:hover { background: var(--bg); }
.sidebar__link.is-active { background: var(--danger-bg); color: var(--primary); font-weight: 700; border-left-color: var(--primary); }
.sidebar__link.is-active svg { color: var(--primary); }
.sidebar__foot { border-top: 1px solid var(--border); padding: 0.7rem; }

.main { display: flex; flex-direction: column; min-width: 0; position: relative; }

/* Marca de água institucional : centrada, grande, subtil */
.main::before {
  content: '';
  position: fixed;
  top: 50%; left: calc(240px + (100% - 240px) / 2);
  width: 640px; height: 640px;
  transform: translate(-50%, -50%);
  background: url('../img/insignia-angola.png') center/contain no-repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="dark"] .main::before { opacity: 0.05; filter: brightness(1.6); }
.topbar { position: relative; z-index: 5; }
.content { position: relative; z-index: 1; }

.topbar { display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; height: 61px; box-sizing: border-box; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar__crumb { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.1rem; }
.topbar__title { font-size: 1.15rem; font-weight: 700; }
.topbar__search { display: flex; align-items: center; gap: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.7rem; font-size: 0.85rem; color: var(--muted); flex: 1; max-width: 340px; margin-left: 1rem; position: relative; }
.search-results { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 28px rgba(0,0,0,.16); max-height: 360px; overflow-y: auto; z-index: 80; }
.search-results.is-open { display: block; }
.search-results__empty { padding: .9rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.search-results__item { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .8rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--border); }
.search-results__item:last-child { border-bottom: none; }
.search-results__item:hover { background: var(--bg); }
.search-results__type { flex: 0 0 auto; font-size: 0.6rem; text-transform: uppercase; font-weight: 700; letter-spacing: .03em; color: var(--danger); background: var(--danger-bg); border-radius: 4px; padding: .15rem .4rem; margin-top: .1rem; }
.search-results__body { display: flex; flex-direction: column; min-width: 0; }
.search-results__title { font-size: 0.82rem; font-weight: 600; }
.search-results__sub { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__search svg { width: 15px; height: 15px; flex-shrink: 0; }
.topbar__search input { border: 0; background: none; outline: none; font-size: 0.85rem; width: 100%; font-family: var(--font); color: var(--ink); }
.topbar__actions { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.topbar__icon-btn { position: relative; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0.35rem; display: flex; border-radius: var(--radius); }
.topbar__icon-btn:hover { background: var(--bg); }
.topbar__icon-btn svg { width: 18px; height: 18px; }
.topbar__icon-btn .dot { position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }
.topbar__user { display: flex; align-items: center; gap: 0.55rem; padding-left: 0.9rem; border-left: 1px solid var(--border); }
.topbar__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.topbar__user-name { font-size: 0.82rem; font-weight: 700; line-height: 1.2; }
.topbar__user-role { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }

.content { padding: 1.6rem; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.25rem; }
.page-head p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 0.75rem; }
.back-link svg { width: 14px; height: 14px; }
.back-link:hover { color: var(--primary); }

/* ── Botões ────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font); font-size: 0.82rem; font-weight: 700; padding: 0.5rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ok { border-color: var(--ok); color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-danger { border-color: var(--primary); color: var(--primary); }
.btn-danger:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.32rem 0.65rem; font-size: 0.76rem; }
.btn-ghost { border-color: transparent; }

/* ── Cartões / KPIs ────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; }
.stat-card__icon { width: 32px; height: 32px; border-radius: var(--radius); background: var(--danger-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-card__icon svg { width: 16px; height: 16px; }
.stat-card__value { font-size: 1.65rem; font-weight: 800; line-height: 1; }
.stat-card__label { font-size: 0.82rem; color: var(--muted); }
a.stat-card { transition: box-shadow .15s, border-color .15s; }
a.stat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.stat-card__link { font-size: 0.75rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 0.25rem; }
.stat-card__link svg { width: 12px; height: 12px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--border); gap: 1rem; flex-wrap: wrap; }
.panel__head h2 { font-size: 0.92rem; font-weight: 700; margin: 0; }
.panel__head .see-all { font-size: 0.78rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 0.25rem; }
.panel__body { padding: 1.15rem; }

/* ── Filtros ───────────────────────────────────────────────────────────────── */
.filters { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.filters__search { display: flex; align-items: center; gap: 0.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.7rem; font-size: 0.82rem; color: var(--muted); flex: 1 1 260px; min-width: 0; max-width: none; }
.filters__search svg { width: 14px; height: 14px; flex-shrink: 0; }
.filters__search input { border: 0; outline: none; background: none; font-family: var(--font); font-size: 0.82rem; width: 100%; color: var(--ink); }
.context-help__toggle { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 70; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.25rem; font-weight: 800; line-height: 1; box-shadow: 0 8px 20px rgba(0,0,0,.2); cursor: pointer; }
.context-help__toggle:hover { background: var(--primary-dark); }
.context-help { position: fixed; right: 4.75rem; bottom: 1.25rem; z-index: 69; width: min(340px, calc(100vw - 6rem)); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateX(10px); transition: opacity .15s, transform .15s, visibility .15s; }
.context-help.is-open { opacity: 1; visibility: visible; transform: translateX(0); }
.context-help__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.context-help__head h2 { margin: 0; font-size: .92rem; }
.context-help p { margin: .55rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.context-help__close { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.filters .btn { min-height: 36px; align-self: center; }

/* ── Tabela ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 560px; }
table.grid th, table.grid td { padding: 0.7rem 1.15rem; text-align: left; font-size: 0.84rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; background: var(--bg); }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: var(--bg); }
table.grid td.num, table.grid th.num { text-align: center; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: 0.76rem; color: var(--muted); margin-top: 0.15rem; }
.row-actions { display: flex; gap: 0.4rem; }

/* ── Paginação ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.15rem; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; gap: 0.75rem; }
.pagination__pages { display: flex; gap: 0.25rem; }
.pagination__pages a, .pagination__pages span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius); border: 1px solid var(--border); font-weight: 600; }
.pagination__pages a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination__pages .ellipsis { border: none; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* ── Notice ────────────────────────────────────────────────────────────────── */
.notice { display: flex; gap: 0.6rem; align-items: flex-start; background: var(--warn-bg); border: 1px solid rgba(150,115,30,0.25); color: #6B5316; border-radius: var(--radius); padding: 0.75rem 0.95rem; font-size: 0.82rem; margin-bottom: 1.15rem; }
html[data-theme="dark"] .notice { color: #E4C77E; }
.notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.notice--danger { background: var(--danger-bg); border-color: rgba(179,0,27,0.2); color: #7A0313; }
html[data-theme="dark"] .notice--danger { color: #F4A2AC; }
.reply-editor:empty:before { content: attr(data-placeholder); color: var(--muted); }
.reply-editor:focus { outline: none; border-color: var(--primary); }
.reply-editor { max-height: 260px; overflow-y: auto; }
.reply-counter { font-size: 0.7rem; color: var(--muted); text-align: right; margin-top: .3rem; }
.reply-counter.is-limit { color: var(--danger); }
.reply-toolbar .topbar__icon-btn { border: 1px solid var(--border); }
.reply-toolbar .topbar__icon-btn:hover { background: var(--danger-bg); }
.code-strong { font-weight: 700; color: var(--danger); }

/* ── Mensagens (chat entre utilizadores) ─────────────────────────────────── */
.msg-app { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; height: 68vh; min-height: 420px; }
.mail-layout { display: grid; grid-template-columns: 300px 1fr; }
.msg-thread__back, .mail-back { display: none; }
@media (max-width: 760px) {
  .msg-app { grid-template-columns: 1fr; height: auto; }
  .msg-app .msg-app__thread { display: none; height: 70vh; }
  .msg-app.is-detail .msg-app__contacts { display: none; }
  .msg-app.is-detail .msg-app__thread { display: flex; }
  .msg-thread__back { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--radius); margin-right: .3rem; }
  .msg-thread__back:hover { background: var(--bg); }

  .mail-layout { grid-template-columns: 1fr; }
  .mail-layout__list { border-right: none !important; }
  [data-mail-reading] { display: none; }
  .mail-layout.is-detail .mail-layout__list { display: none; }
  .mail-layout.is-detail [data-mail-reading] { display: block; }
  .mail-back { display: flex; align-items: center; gap: .3rem; border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 0.84rem; cursor: pointer; padding: 0; margin-bottom: 1rem; }
}
.msg-app__contacts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem; overflow-y: auto; }
.msg-contact { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: .55rem .5rem; cursor: pointer; color: var(--ink); font-family: var(--font); }
.msg-contact:hover { background: var(--bg); }
.msg-contact.is-active { background: var(--primary-soft, var(--danger-bg)); }
.msg-contact__avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; }
.msg-contact__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-contact__name { font-size: 0.84rem; font-weight: 600; }
.msg-contact__preview { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-contact__meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.msg-contact__time { font-size: 0.65rem; color: var(--muted); }
.msg-contact__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.msg-app__thread { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.msg-thread__head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.msg-thread__name { font-size: 0.88rem; font-weight: 700; }
.msg-thread__role { font-size: 0.72rem; color: var(--muted); }
.msg-thread__body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.msg-bubble { max-width: 70%; }
.msg-bubble--in { align-self: flex-start; }
.msg-bubble--out { align-self: flex-end; }
.msg-bubble__text { padding: .55rem .75rem; border-radius: 12px; font-size: 0.82rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.msg-bubble--in .msg-bubble__text { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.msg-bubble--out .msg-bubble__text { background: var(--danger); color: #fff; border-bottom-right-radius: 3px; }
.msg-bubble__time { font-size: 0.62rem; color: var(--muted); margin-top: .2rem; }
.msg-bubble--out .msg-bubble__time { text-align: right; }
.msg-thread__composer { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem; border-top: 1px solid var(--border); }
.msg-thread__composer textarea { flex: 1; font-family: var(--font); font-size: 0.84rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--ink); resize: none; max-height: 120px; overflow-y: auto; line-height: 1.4; }

/* ── Formulários ───────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-size: 0.8rem; font-weight: 700; }
.field .hint { font-size: 0.74rem; color: var(--muted); font-weight: 400; }
.field input[type=text], .field input[type=number], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=date], .field textarea {
  font-family: var(--font); font-size: 0.86rem; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 70px; }
.dropzone { border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 1.6rem; text-align: center; color: var(--muted); font-size: 0.84rem; background: var(--bg); cursor: pointer; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--primary); background: var(--surface-hover, var(--bg)); }
.dropzone.is-filled { color: var(--ink); border-style: solid; }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 0.5rem; color: var(--muted); }
.radio-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-opt { display: flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.8rem; cursor: pointer; user-select: none; background: var(--surface); }
.radio-opt.is-selected { border-color: var(--primary); color: var(--primary); font-weight: 700; background: var(--danger-bg); }
.stepper { display: flex; align-items: center; gap: 0.5rem; }
.stepper button { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--bg); }
.stepper input { width: 50px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0; font-family: var(--font); background: var(--surface); color: var(--ink); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }

/* ── Itens (linhas de pedido) ─────────────────────────────────────────────── */
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 1rem; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: none; }
.item-row__name { font-weight: 600; font-size: 0.86rem; }
.item-row__stock { font-size: 0.76rem; color: var(--muted); }
.item-row__stock.is-warning { color: var(--primary); font-weight: 700; }
.item-row-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 1rem; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); letter-spacing: .03em; }
.item-row-head span:nth-child(2) { text-align: right; }
.item-row .csel { min-width: 0; width: 100%; }
.item-row .stepper { justify-self: end; }
.item-row [data-remove-item] { justify-self: end; }
table.grid td:last-child, table.grid th:last-child { text-align: right; }

/* ── Timeline / actividade ─────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); margin-left: 0.4rem; }
.timeline li { position: relative; padding: 0 0 1.05rem 1.2rem; font-size: 0.84rem; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }
.timeline time { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }

/* ── Visualizador de documento ─────────────────────────────────────────────── */
.viewer-layout { display: grid; grid-template-columns: 1fr 310px; gap: 1.1rem; align-items: start; }
.viewer-toolbar { display: flex; align-items: center; gap: 0.5rem; background: var(--ink); color: var(--bg); border-radius: var(--radius) var(--radius) 0 0; padding: 0.55rem 0.9rem; font-size: 0.8rem; }
html[data-theme="dark"] .viewer-toolbar { background: #000; }
.viewer-toolbar button { background: rgba(255,255,255,0.12); border: 0; color: inherit; border-radius: 4px; padding: 0.35rem 0.65rem; cursor: pointer; display: flex; align-items:center; gap:0.4rem; }
.viewer-toolbar button svg { width: 14px; height: 14px; }
.viewer-toolbar button:hover { background: rgba(255,255,255,0.22); }
.viewer-frame { background: #EDEBE6; border: 1px solid var(--border); border-top: none; min-height: 460px; display: flex; align-items: center; justify-content: center; padding:2rem; }
html[data-theme="dark"] .viewer-frame { background: #0E0D0C; }
.doc-page { width: 100%; max-width:420px; min-height:560px; background:#fff; box-shadow:0 4px 18px rgba(0,0,0,.18); padding:2.2rem 2rem; color:#1a1a1a; font-size:0.72rem; line-height:1.6; display:flex; flex-direction:column; }
.doc-page__seal{width:40px;margin-bottom:.5rem}
.doc-page h4{font-family:var(--font);font-size:0.82rem;text-align:center;margin:.4rem 0 .1rem;text-transform:uppercase}
.doc-page .sub{text-align:center;font-size:0.65rem;color:#666;margin-bottom:1rem}
.doc-page__head { text-align: center; }
.doc-page__body { flex: 1; }
.doc-page p{margin:0 0 .7rem}
.doc-page .sign{margin-top:2.2rem;text-align:center}
.doc-page .sign .line{border-top:1px solid #999;width:60%;margin:1.6rem auto .3rem}
.doc-page .sign .esign { margin: 1rem auto .5rem; }
.doc-page__foot { border-top: 1px solid #ccc; margin-top: 1.5rem; padding-top: .5rem; font-size: 0.58rem; color: #555; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.doc-page__foot-address { flex: 1; }
.doc-page__foot-logos { display: flex; align-items: center; justify-content: center; gap: .7rem; }
.doc-page__foot-logos img:first-child { height: 30px; width: auto; }
.doc-page__foot-logos img:not(:first-child) { height: 24px; width: auto; }
.doc-page__foot-logos img.for-dark { display: none; }
html[data-theme="dark"] .doc-page__foot-logos img.for-light { display: none; }
html[data-theme="dark"] .doc-page__foot-logos img.for-dark { display: block; }
.doc-page__page-num::after { content: "Página 1"; }
.checkbox{width:16px;height:16px;border:1.5px solid var(--border);border-radius:4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.checkbox.is-checked{background:var(--primary);border-color:var(--primary)}
.checkbox.is-checked::after{content:'';width:8px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.tabs{display:flex;gap:.35rem;padding:0 1.15rem;border-bottom:1px solid var(--border);background:var(--bg)}
.tab-btn{padding:.7rem .2rem;margin-right:1.1rem;font-size:.82rem;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;cursor:pointer;background:none;border-top:0;border-left:0;border-right:0}
.tab-btn.is-active{color:var(--primary);border-bottom-color:var(--primary)}
.activity-tabs{flex-wrap:wrap}
.activity-tabs .tab-btn{margin-right:.65rem}
@media print {
  body { background: #fff !important; }
  .sidebar, .sidebar-backdrop, .topbar, .page-head, .site-footer, .content { padding: 0 !important; margin: 0 !important; }
  .app { display: block !important; }
  .main { display: block !important; }
  .sidebar, .sidebar-backdrop, .topbar, .page-head, .site-footer { display: none !important; }
  .viewer-frame { padding: 0 !important; min-height: auto !important; background: none !important; border: none !important; }
  body * { visibility: hidden; }
  #printable-doc, #printable-doc * { visibility: visible; }
  #printable-doc { position: static !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
}
.print-opt-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; gap: 1rem; }
.print-opt-row:last-child { border-bottom: none; }

/* ── Toggle switch ─────────────────────────────────────────────────────────── */
.toggle { position: relative; width: 36px; height: 20px; background: var(--border); border-radius: 999px; cursor: pointer; flex-shrink: 0; }
.toggle::after { content:''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.is-on { background: var(--primary); }
.toggle.is-on::after { transform: translateX(16px); }

/* ── Métricas ──────────────────────────────────────────────────────────────── */
.metric-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); gap: 0.75rem; margin-bottom: 1.15rem; }
.metric-box { background: var(--bg); border-radius: var(--radius); padding: 0.75rem 0.9rem; }
.metric-box__value { font-weight: 800; font-size: 1.15rem; }
.metric-box__label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }

/* ── Select personalizado ──────────────────────────────────────────────────── */
.csel { position: relative; min-width: 150px; font-size: 0.82rem; }
.csel__btn { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.7rem; cursor: pointer; font-family: var(--font); color: var(--ink); }
.csel.is-disabled { opacity: .65; }
.csel__btn svg { width: 13px; height: 13px; color: var(--muted); transition: transform .15s; flex-shrink: 0; }
.csel.is-open .csel__btn svg { transform: rotate(180deg); }
.csel__menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 30; padding: 0.3rem; max-height: 240px; overflow-y: auto; }
.csel.is-open .csel__menu { display: block; }
.csel__opt { padding: 0.45rem 0.6rem; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.csel__opt:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.csel__search-wrap { padding: 0.2rem 0.2rem 0.4rem; position: sticky; top: 0; background: var(--overlay); }
.csel__search { width: 100%; box-sizing: border-box; font-family: var(--font); font-size: 0.8rem; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--ink); }
.csel__opt.is-hidden, .csel__opt.is-taken { display: none; }
.csel__opt:hover { background: var(--bg); }
.csel__opt.is-selected { color: var(--primary); font-weight: 700; }
.filters .csel { min-width: 150px; }
.filters__daterange { display: flex; align-items: center; gap: .4rem; flex-wrap: nowrap; }

/* ── Datepicker personalizado ──────────────────────────────────────────────── */
.cdate { position: relative; font-size: 0.82rem; }
.cdate__btn { display: flex; align-items: center; gap: 0.45rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.7rem; cursor: pointer; font-family: var(--font); color: var(--ink); white-space: nowrap; }
.cdate__btn svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.cdate__panel { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 30; padding: 0.75rem; width: 240px; }
.cdate.is-open .cdate__panel { display: block; }
.cdate__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 700; font-size: 0.8rem; }
.cdate__head button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0.2rem; display: flex; }
.cdate__head button svg { width: 14px; height: 14px; }
.cdate__grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; text-align: center; font-size: 0.72rem; }
.cdate__grid .dow { color: var(--muted); font-weight: 700; padding: 0.2rem 0; }
.cdate__grid .day { padding: 0.35rem 0; border-radius: 4px; cursor: pointer; }
.cdate__grid .day:hover { background: var(--bg); }
.cdate__grid .day.is-muted { color: var(--muted); opacity: 0.5; }
.cdate__grid .day.is-selected { background: var(--primary); color: #fff; font-weight: 700; }

/* ── Tema / idioma na topbar ───────────────────────────────────────────────── */
.lang-switch { position: relative; }
.lang-switch__btn { display: flex; align-items: center; gap: 0.3rem; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.35rem 0.6rem; font-size: 0.76rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.lang-switch__menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 30; min-width: 90px; padding: 0.3rem; }
.lang-switch.is-open .lang-switch__menu { display: block; }
.lang-switch__opt { padding: 0.4rem 0.6rem; border-radius: 4px; cursor: pointer; font-size: 0.78rem; }
.lang-switch__opt:hover { background: var(--bg); }
.lang-switch__opt.is-selected { color: var(--primary); font-weight: 700; }

/* ── Scrollbar personalizada ──────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Nota oficial (Solicitação / Entrega), conforme documento modelo ─────── */
.official-note { font-family: 'Times New Roman', Times, serif; color: #111; font-size: 0.82rem; line-height: 1.5; display: flex; flex-direction: column; }
.official-note__head { text-align: center; margin-bottom: .3rem; }
.official-note__insignia { display: block; width: 46px; margin: 0 auto .2rem; }
.official-note__republica { font-weight: 700; letter-spacing: .04em; font-size: 0.78rem; }
.official-note__line { width: 100%; max-width: 260px; height: 6px; margin: .25rem auto; object-fit: contain; }
.official-note__gov { font-size: 0.78rem; }
.official-note__gab { font-weight: 700; font-size: 0.82rem; margin-top: .1rem; }
.official-note__requester { font-weight: 700; font-size: 0.82rem; }
.official-note__requester--sub { font-weight: 400; font-size: 0.72rem; margin-top: .05rem; }
.official-note__body { flex: 1; }
/* Endereço: em documentos digitais/datilografados fica um pouco à frente do
   centro da página, nunca encostado à margem esquerda (isso é só para manuscritos). */
.official-note__addr { margin: 1.4rem 0 1.4rem 52%; font-size: 0.82rem; }
.official-note__addr .underline { text-decoration: underline; font-weight: 700; }
.official-note__num { font-weight: 700; margin: 1.4rem 0 1.2rem; text-align: left; }
.official-note__num.is-centered { text-align: center; margin-top: 1.8rem; }
.official-note__subject { font-weight: 700; margin-bottom: 1rem; }
.official-note__subject .underline { text-decoration: underline; }
.official-note table.note-items { width: 100%; border-collapse: collapse; margin: .8rem 0 1rem; font-size: 0.8rem; }
.official-note table.note-items th, .official-note table.note-items td { border: 1px solid #333; padding: .35rem .5rem; text-align: left; }
.official-note table.note-items th { background: #eee; font-weight: 700; }
.official-note table.note-items td.num, .official-note table.note-items th.num { text-align: center; }
.official-note__field { margin: .8rem 0; }
.official-note__field-label { font-weight: 700; }
.official-note__closing { margin-top: 1.6rem; }
.official-note__sign { margin-top: 2.4rem; text-align: center; }
.official-note__sign .line { border-top: 1px solid #333; width: 55%; margin: 0 auto .3rem; }
.esign { display: flex; flex-direction: column; align-items: center; gap: .2rem; margin: 0 auto .4rem; }
.esign__barcode { height: 26px; width: auto; }
.esign__meta { font-size: 0.6rem; color: #444; line-height: 1.35; }
.official-note__foot { border-top: 1px solid #333; margin-top: 2.5rem; padding-top: .6rem; font-size: 0.68rem; color: #222; display: flex; align-items: center; gap: 1rem; }
.official-note__foot-col { text-align: left; line-height: 1.4; font-size: 0.62rem; }
.official-note__foot-col strong { display: block; font-weight: 700; margin-bottom: .1rem; }
.official-note__foot-logos { flex: 1; display: flex; justify-content: center; align-items: center; gap: 1.2rem; }
.official-note__foot-logos img:first-child { height: 42px; width: auto; }
.official-note__foot-logos img:not(:first-child) { height: 34px; width: auto; }
.official-note__foot-logos img.for-dark { display: none; }
html[data-theme="dark"] .official-note__foot-logos img.for-light { display: none; }
html[data-theme="dark"] .official-note__foot-logos img.for-dark { display: block; }
@media print { .official-note__foot-logos img.for-dark { display: none !important; } .official-note__foot-logos img.for-light { display: block !important; } }

/* Impressão: cabeçalho fixo aparece só na 1ª folha (fica em fluxo normal, não
   se repete); rodapé fixo repete-se em todas as folhas; folhas numeradas. */
@media print {
  @page {
    margin: 10mm 10mm 30mm 15mm;
  }
  .official-note { min-height: auto; }
  .official-note__body { padding-bottom: 3rem; }
  .official-note__foot, .doc-page__foot { display: flex !important; }
  .official-note__foot {
    position: fixed; left: 15mm; right: 10mm; bottom: 8mm;
    margin-top: 0; background: #fff; border-top: 1px solid #333;
  }
  /* Nos motores sem suporte a @bottom-right, mantém-se pelo menos "Página 1" no rodapé */
  .official-note__page-num::after { content: "Página " counter(page); }
}

/* ── Autenticação (login, registo, recuperação de password, OTP) ─────────── */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); padding: 2rem 1rem; }
.auth-card { display: grid; grid-template-columns: minmax(220px, .82fr) minmax(340px, 1fr); width: min(100%, 760px); min-height: 390px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 0; }
.auth-card__brand-panel { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 2.5rem; background: var(--bg); border-right: 1px solid var(--border); }
.auth-card__brand-panel::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--primary); content: ''; }
.auth-card__brand-panel > img { position: relative; z-index: 1; display: block; width: min(190px, 100%); height: auto; }
.auth-card__brand-rule { position: absolute; right: -72px; bottom: -72px; width: 190px; height: 190px; border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent); border-radius: 50%; }
.auth-card__form-panel { align-self: center; padding: 3rem 3.25rem; }
.auth-card__heading { margin: 0 0 2rem; padding: 0 0 1rem; border-bottom: 1px solid var(--border); }
.auth-card__heading .auth-title { margin: 0; text-align: left; font-size: 1.55rem; line-height: 1.2; letter-spacing: -.02em; }
.auth-title { font-size: 1.15rem; font-weight: 800; text-align: center; margin: 0 0 .35rem; }
.auth-sub { font-size: 0.82rem; color: var(--muted); text-align: center; margin: 0 0 1.5rem; }
.auth-card .field { margin-bottom: 1.1rem; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: .65rem; font-size: .86rem; }
.auth-links { display: flex; justify-content: space-between; font-size: 0.78rem; margin-top: 1.1rem; }
.auth-links a { color: var(--primary); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: .75rem; text-align: center; font-size: 0.72rem; color: var(--muted); margin: 1.3rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.otp-inputs { display: flex; gap: .6rem; justify-content: center; margin-bottom: 1.3rem; }
.otp-inputs input { width: 42px; height: 50px; text-align: center; font-size: 1.3rem; font-weight: 700; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-family: var(--font); }
.otp-inputs input:focus { border-color: var(--primary); outline: none; }
.auth-shell__foot { font-size: 0.72rem; color: var(--muted); margin-top: 1.4rem; text-align: center; }
.auth-shell__foot a { color: var(--muted); }

@media (max-width: 680px) {
  .auth-card { grid-template-columns: 1fr; width: min(100%, 440px); min-height: 0; }
  .auth-card__brand-panel { min-height: 112px; padding: 1.4rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-card__brand-panel > img { width: min(150px, 55%); }
  .auth-card__brand-rule { right: -95px; bottom: -145px; width: 210px; height: 210px; }
  .auth-card__form-panel { padding: 2rem 1.6rem 2.2rem; }
  .auth-card__heading { margin-bottom: 1.5rem; }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: flex; position: fixed; top: 0; left: 0; bottom: 0; width: 260px; max-width: 82vw; z-index: 120; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 0 rgba(0,0,0,0); }
  .sidebar.is-open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(20,18,15,0.5); z-index: 110; }
  .sidebar-backdrop.is-open { display: block; }
  .topbar__menu-btn { display: flex !important; }
  .topbar__brand-mobile { display: flex !important; align-items: center; }
  .topbar { position: sticky; top: 0; z-index: 65; }
  [data-theme-toggle] { position: fixed !important; bottom: 1.1rem; right: 1.1rem; left: auto; z-index: 55; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 20px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; padding: 0; }
  [data-theme-toggle] svg { margin: 0; }
  .lang-switch { position: fixed !important; bottom: 4.9rem; right: 1.1rem; left: auto; z-index: 55; }
  .lang-switch__btn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 20px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; padding: 0; }
  .lang-switch__btn span, .lang-switch__btn svg:last-child { display: none; }
  .lang-switch__menu { bottom: calc(100% + 8px); top: auto; }
  .viewer-layout, .form-grid { grid-template-columns: 1fr; }
}
.topbar__menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: .35rem; border-radius: var(--radius); margin-right: .6rem; flex-shrink: 0; }
.topbar__menu-btn:hover { background: var(--bg); }
.topbar__brand-mobile { display: none; flex-shrink: 1; min-width: 0; margin-right: .6rem; }
.topbar__brand-mobile img { display: block; height: 24px; width: auto; max-width: 100%; object-fit: contain; }
.topbar__brand-mobile img.for-dark { display: none; }
html[data-theme="dark"] .topbar__brand-mobile img.for-light { display: none; }
html[data-theme="dark"] .topbar__brand-mobile img.for-dark { display: block; }
@media (max-width: 640px) {
  .topbar__user-name, .topbar__user-role { display: none; }
  .topbar__user { padding-left: .4rem; border-left: none; }
  .topbar__search { display: none; position: fixed; top: 61px; left: 0; right: 0; margin: 0; max-width: none; z-index: 65; padding: .7rem 1rem; border-radius: 0; border-width: 0 0 1px 0; background: var(--surface); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
  .topbar__search.is-open { display: flex; }
  .topbar__search-fab { display: flex; }
}
.topbar__search-fab { display: none; position: fixed; bottom: 8.7rem; right: 1.1rem; z-index: 55; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--ink); align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.22); cursor: pointer; }

/* ── Rodapé ────────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 1rem 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: 0.76rem; color: var(--muted); margin-top: auto; }
.site-footer a { color: var(--muted); font-weight: 600; }
.site-footer a:hover { color: var(--primary); }
.site-footer__links { display: flex; gap: 1rem; }
.main { min-height: 100vh; }
.content { flex: 1 0 auto; }

/* ── Modal personalizado (substitui prompt/alert nativos) ─────────────────── */
.hidden,
[hidden] { display: none !important; }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,18,15,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal { background: var(--surface); border-radius: 10px; width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal__head { padding: 1.1rem 1.25rem 0; font-weight: 700; font-size: 1rem; }
.modal__body { padding: .75rem 1.25rem 1.1rem; font-size: 0.86rem; color: var(--muted); }
.modal__body textarea { width: 100%; margin-top: .6rem; font-family: var(--font); font-size: 0.86rem; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-height: 80px; resize: vertical; }
.modal__foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 0 1.25rem 1.15rem; }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toast-stack { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem); display: flex; flex-direction: column; align-items: center; gap: .6rem; z-index: 200; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: .75rem 1rem; border-radius: var(--radius); font-size: 0.82rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; align-items: center; gap: .5rem; max-width: 420px; animation: toast-in .2s ease-out; pointer-events: auto; }
.toast--error svg { color: #ff8a80; }
.toast svg { width: 16px; height: 16px; color: var(--ok); flex-shrink: 0; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Tabelas viram cartões em ecrã pequeno ─────────────────────────────────── */
@media (max-width: 760px) {
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid { min-width: 0; }
  .table-wrap { overflow-x: visible; }
  table.grid tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .7rem; padding: .3rem .9rem; background: var(--surface); }
  table.grid td { border: none; padding: .5rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: right; }
  table.grid td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
  table.grid td:empty, table.grid td:has(> :only-child:empty) { display: none; }
  .content { padding: 1rem; }
  .stat-grid, .form-grid { grid-template-columns: 1fr !important; }
  .official-note__foot, .doc-page__foot { display: none; }
  .pagination { justify-content: center; text-align: center; }
  #messages-head p, #email-head p { display: none; }
  .site-footer { justify-content: center; text-align: center; }
  .site-footer__links { justify-content: center; width: 100%; }
  .tabs { padding: 0 .75rem; }
  .tab-btn { flex: 1; text-align: center; margin-right: 0; }
  [data-notify-unavailable] { width: 100%; justify-content: center; }
  .form-actions:has([data-notify-unavailable]) { justify-content: center; }
  .item-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; margin-bottom: .6rem; overflow-x: hidden; }
  .item-row > .csel, .item-row > .item-row__stock { flex: 1 0 100%; }
  .item-row .stepper { order: 1; margin-left: auto; }
  .item-row [data-remove-item] { order: 2; margin-left: 0; background: var(--danger); border-color: var(--danger); color: #fff; }
  .item-row [data-remove-item] svg { color: #fff; }
  .item-row-head { display: none; }
  table.grid td { flex-wrap: wrap; word-break: break-word; }
  .page-head { flex-direction: column; }
  .btn--confirm { display: inline-flex; align-items: center; justify-content: center; padding: .5rem; width: 34px; height: 34px; }
  .btn--confirm .btn-label { display: none; }
}
@media (max-width: 600px) {
  .filters { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; padding: .75rem; }
  .filters__search { max-width: none; min-width: 0; width: 100%; }
  .filters .csel { min-width: 0; width: 100%; }
  .context-help__toggle { right: 1rem; bottom: 1rem; }
  .context-help { right: 1rem; bottom: 4.75rem; width: calc(100vw - 2rem); }
  .page-actions-print { display: contents; }
  .page-actions-print [data-download] { position: fixed !important; bottom: 12.5rem; right: 1.1rem; z-index: 55; width: 48px; height: 48px; border-radius: 50%; padding: 0 !important; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
  .page-actions-print [data-download] span { display: none; }
  .page-actions-print [data-print] { position: fixed !important; bottom: 16.3rem; right: 1.1rem; z-index: 55; width: 48px; height: 48px; border-radius: 50%; padding: 0 !important; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
  .page-actions-print [data-print] span { display: none; }
  table.grid.departments-table tbody tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title edit" "grupo grupo" "prio prio"; gap: .4rem; align-items: start; }
  table.grid.departments-table td:first-child { display: block; grid-area: title; padding-right: .5rem; }
  table.grid.departments-table td:first-child::before { content: none; }
  table.grid.departments-table td:nth-child(2) { display: block; grid-area: grupo; }
  table.grid.departments-table td:nth-child(3) { display: block; grid-area: prio; }
  table.grid.departments-table td:last-child { display: block; grid-area: edit; padding: 0; justify-self: end; }
  table.grid.departments-table td:last-child::before { content: none; }
  .filters__daterange { width: 100%; }
  .filters__daterange .cdate { flex: 1; min-width: 0; }
  .filters__daterange .cdate__btn { width: 100%; padding-left: .5rem; padding-right: .3rem; }
}
@media (max-width: 760px) {
  [data-fab] { position: fixed !important; bottom: 12.5rem; right: 1.1rem; z-index: 50; width: 48px; height: 48px; border-radius: 50%; padding: 0 !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
  [data-fab] span { display: none; }
}

/* ── Impressão ─────────────────────────────────────────────────────────────── */
@page { margin: 10mm 10mm 12mm 15mm; }
@media print {
  .doc-page { box-shadow: none !important; max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 0.5cm 0.5cm 0.5cm !important; min-height: auto !important; }
  .doc-page__foot { position: fixed; left: 0.5cm; right: 0.5cm; bottom: 0.4cm; background: #fff; }
  .doc-page__page-num::after { content: "Página " counter(page); }
  .viewer-frame { background: none !important; border: none !important; padding: 0 !important; min-height: auto !important; }
}

/* Módulo Requisições: estado vazio do catálogo de materiais. */
.supply-empty-state {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  text-align: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.panel__body.supply-empty-state { border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); }
.supply-empty-state__figure {
  display: grid;
  width: min(100%, 500px);
  min-height: 220px;
  place-items: center;
  margin: 0 auto 1rem;
}
.supply-empty-state__illustration {
  display: block;
  width: min(100%, 460px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(40, 28, 20, .10));
}
.supply-empty-state__content { max-width: 560px; margin: 0 auto; }
.supply-empty-state__message {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  font-weight: 750;
  line-height: 1.4;
}
.supply-empty-state__support {
  max-width: 480px;
  margin: .55rem auto 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
}
@media (max-width: 600px) {
  .supply-empty-state { min-height: 340px; padding: 1.35rem 1rem; }
  .supply-empty-state__figure { min-height: 180px; margin-bottom: .55rem; }
  .supply-empty-state__illustration { width: min(100%, 360px); }
}


/* Componentes Blade partilhados: pedidos, formulários e navegação modular. */
.app-shell__logout { margin: 0; }
.app-shell__logout .sidebar__link { width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer; font: inherit; }
.notice--success { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.notice--error { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.field select, .field input, .field textarea { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: .55rem .7rem; font: inherit; }
.field select:focus, .field input:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 25%, transparent); border-color: var(--primary); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > label, .field > span:first-child { font-size: .8rem; font-weight: 700; }
.field--inline { min-width: 150px; flex-direction: row; align-items: center; gap: .55rem; }
.field--inline select { width: auto; min-width: 120px; }
.field-error { color: var(--danger); font-size: .78rem; }
.table-empty { text-align: center; color: var(--muted); padding: 1.6rem !important; }
.supply-request__items { display: grid; gap: .75rem; }
.supply-request__row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(130px, .32fr) auto; align-items: end; gap: .8rem; padding: .9rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.supply-request__row .btn { margin-bottom: 1px; }
.supply-request__actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.supply-request__submit { justify-content: flex-end; border-top: 1px solid var(--border); }
.request-detail__head { align-items: center; }
.request-detail__eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem !important; font-weight: 700; margin-bottom: .25rem !important; }
.request-detail__status { font-size: .85rem; padding: .4rem .7rem; }
.request-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.request-summary { display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: .9rem 1rem; }
.request-summary span { color: var(--muted); font-size: .75rem; }
.request-summary strong { font-size: .95rem; }
.approval-timeline { list-style: none; margin: 0; padding: 0; }
.approval-timeline__item { display: grid; grid-template-columns: 18px 1fr; gap: .75rem; position: relative; padding-bottom: 1.25rem; }
.approval-timeline__item:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: -2px; width: 2px; background: var(--border); }
.approval-timeline__marker { width: 16px; height: 16px; margin-top: 2px; border: 3px solid var(--primary); border-radius: 50%; background: var(--surface); z-index: 1; }
.approval-timeline__top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.approval-timeline__body p { margin: .3rem 0; color: var(--muted); font-size: .82rem; }
.approval-action-form { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-top: .75rem; }
.approval-decision { overflow: visible; border-color: color-mix(in srgb, var(--primary) 18%, var(--border)); }
.approval-decision__head { align-items: flex-start; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: linear-gradient(110deg, color-mix(in srgb, var(--danger-bg) 72%, var(--surface)), var(--surface) 72%); }
.approval-decision__heading { display: grid; gap: .18rem; }
.approval-decision__eyebrow, .approval-step__eyebrow { color: var(--primary); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.approval-decision__heading h2 { font-size: 1rem; }
.approval-decision__heading p { max-width: 640px; margin: .15rem 0 0; color: var(--muted); font-size: .8rem; }
.approval-decision__steps { display: grid; gap: .9rem; }
.approval-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .85rem; padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.approval-step--decision { background: var(--surface); }
.approval-step__index { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--danger-bg); color: var(--primary); font-size: .85rem; font-weight: 800; }
.approval-step__content { min-width: 0; }
.approval-step__content h3 { margin: .12rem 0 .2rem; font-size: .92rem; }
.approval-step__content > p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.approval-step__content > p strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.approval-code-request { margin-top: .85rem; }
.approval-code-request__button { min-height: 40px; color: var(--primary); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); background: var(--surface); }
.approval-code-request__button:hover { background: var(--danger-bg); }
.approval-code-request__button svg { flex-shrink: 0; }
.approval-code-request__button:disabled, .approval-decision-form__submit:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.approval-choice { min-width: 0; margin: 1rem 0 0; padding: 0; border: 0; }
.approval-choice legend { margin-bottom: .45rem; font-size: .8rem; font-weight: 800; }
.approval-choice__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.approval-choice__option { display: flex; align-items: flex-start; gap: .6rem; min-width: 0; padding: .75rem; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); cursor: pointer; }
.approval-choice__option:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.approval-choice__option input { width: 16px; height: 16px; min-height: 16px; margin: .1rem 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.approval-choice__option span { display: grid; gap: .12rem; }
.approval-choice__option strong { font-size: .8rem; }
.approval-choice__option small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.approval-code-field { margin-top: .9rem; }
.approval-code-field__control { position: relative; width: min(100%, 280px); }
.approval-code-field__control input { padding-right: 4.7rem; font-size: 1rem; font-weight: 700; letter-spacing: .16em; }
.approval-code-field__control input::placeholder { color: var(--muted); opacity: .55; }
.approval-code-field__control > span { position: absolute; top: 50%; right: .7rem; transform: translateY(-50%); color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: 0; pointer-events: none; }
.approval-decision-form__submit { min-height: 40px; margin-top: 1rem; }
.document-summary { display: flex; align-items: center; gap: .85rem; }
.document-summary__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: var(--danger-bg); color: var(--primary); font-size: .7rem; font-weight: 800; }
.document-summary p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.dropzone { border: 1px dashed var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone svg { margin: 0 auto .5rem; color: var(--primary); }
.dropzone:hover { border-color: var(--primary); background: var(--danger-bg); }
@media (max-width: 760px) {
  .supply-request__row { grid-template-columns: 1fr; }
  .supply-request__row .btn { justify-self: start; }
  .request-summary-grid { grid-template-columns: 1fr; }
  .request-detail__head { align-items: flex-start; }
  .approval-timeline__top { align-items: flex-start; flex-direction: column; }
  .approval-choice__options { grid-template-columns: 1fr; }
  .approval-code-field__control { width: 100%; }
  .approval-decision-form__submit { width: 100%; justify-content: center; }
  .field--inline { width: 100%; }
  .field--inline select { flex: 1; }
}


/* Perfil e actividade */
.topbar__avatar { overflow: hidden; }
.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; }
.activity-filters .csel { min-width: 180px; }
.table-empty { text-align: center !important; color: var(--muted); padding: 2rem 1rem !important; }
@media (max-width: 700px) { .activity-filters .filters__search, .activity-filters .csel, .activity-filters .btn { width: 100%; } }
.item-row.is-locked { opacity: .78; }
.item-row.is-locked .stepper input { background: var(--bg); cursor: not-allowed; text-align: right; }
.stepper input { text-align: right; }
.csel__opt.is-hidden, .csel__opt.is-taken { display: none; }

/* Utilitários */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
a.topbar__user { color: inherit; text-decoration: none; }
a.topbar__user:hover .topbar__user-name { color: var(--primary); }
.sidebar__foot .sidebar__link { width: 100%; box-sizing: border-box; }
.sidebar__foot button.sidebar__link { background: transparent; border-top: 0; border-right: 0; border-bottom: 0; cursor: pointer; font-family: var(--font); }

/* Selecção de bens: linhas bloqueadas e controlos desactivados */
.csel.is-disabled .csel__btn, .csel__btn:disabled { cursor: not-allowed; background: var(--bg); }
.item-row.is-locked .stepper button:disabled { cursor: not-allowed; opacity: .5; }
.item-row [data-remove-item]:disabled { opacity: .35; cursor: not-allowed; }
.item-row.is-locked [data-remove-item]:not(:disabled) { opacity: 1; }
[data-add-item]:disabled { opacity: .5; cursor: not-allowed; }
#request-items > .field-error { margin: .6rem 0 0; }

/* Paginação */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.pager__list { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: .8rem; font-weight: 600; text-decoration: none; box-sizing: border-box; }
a.pager__btn:hover { background: var(--bg); }
.pager__btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager__btn.is-disabled { opacity: .45; cursor: not-allowed; }
.pager__gap { padding: 0 .3rem; }

/* Perfil: editor de fotografia */
.photo-editor { display: flex; flex-direction: column; gap: 1.1rem; }
.photo-editor__current { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.photo-editor__preview { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--gold); color: #fff; font-size: 2rem; font-weight: 700; flex-shrink: 0; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.photo-editor__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-editor__controls { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; min-width: min(100%, 300px); flex: 1; }
.photo-editor__controls .hint { margin: 0; font-size: .78rem; color: var(--muted); }
.photo-editor__buttons { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.photo-editor__buttons label.btn { cursor: pointer; }
.photo-editor__buttons .btn:disabled { opacity: .45; cursor: not-allowed; }
.photo-editor__status { color: var(--ok) !important; font-weight: 600; }
.photo-editor__canvas-wrap { width: 280px; max-width: 100%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.photo-editor__canvas-wrap canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.photo-editor__canvas-wrap canvas.is-dragging { cursor: grabbing; }
.photo-editor__tools { display: flex; flex-direction: column; gap: .9rem; min-width: min(100%, 220px); }
.photo-editor__zoom { display: flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 700; }
.photo-editor__zoom input[type=range] { flex: 1; width: auto; min-height: 0; padding: 0; border: 0; accent-color: var(--primary); }
.photo-editor [hidden] { display: none !important; }

/* Opções de rádio nativas dentro de .radio-opt (pedido de impressão, decisão) */
.radio-opt input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-opt { position: relative; }
.radio-opt:has(input:checked) { border-color: var(--primary); color: var(--primary); font-weight: 700; background: var(--danger-bg); }
.radio-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Resumo das opções de impressão no detalhe do pedido */
.print-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .85rem 1.25rem; margin: 0; }
.print-summary dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.print-summary dd { margin: .15rem 0 0; font-size: .9rem; font-weight: 600; }

/* Separadores em forma de ligação */
a.tab-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Modal de recorte da fotografia */
.photo-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.62); isolation: isolate; }
.photo-modal[hidden] { display: none; }
.photo-modal__box { position: relative; z-index: 2001; background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.5); width: min(100%, 360px); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.photo-modal__box h3 { margin: 0; font-size: 1rem; }
.photo-modal__box .photo-editor__canvas-wrap { align-self: center; }
body.has-modal { overflow: hidden; }

/* Passos ocultos devem respeitar hidden mesmo com display grid ou flex. */
.approval-decision [hidden] { display: none !important; }
.approval-step__content > .notice { display: block; margin-top: .85rem; }
.approval-code-field { margin-top: 1rem; }
.hierarchy-response__select { position: relative; width: 100%; }
.hierarchy-response__select.is-open { z-index: 40; }
.csel__btn:hover:not(:disabled), .csel__opt:hover { background: var(--bg); }
.csel__btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.csel__btn:disabled { opacity: .6; cursor: not-allowed; }
.csel__opt:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.csel__opt.is-active { background: var(--bg); }
.csel__opt { display: block; width: 100%; box-sizing: border-box; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; }
.csel__chevron { width: .55rem; height: .55rem; flex: 0 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.csel.is-open .csel__chevron { transform: rotate(225deg) translate(-2px, -1px); }
.csel__option-meta { color: var(--muted); font-size: .76rem; font-weight: 400; }
.csel__opt:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.csel.is-invalid .csel__btn { border-color: var(--danger); }
.csel__error { display: block; margin-top: .35rem; }
.csel__error[hidden] { display: none; }
.approvals-empty-state { height: 176px; padding: 2rem 1rem !important; text-align: center !important; vertical-align: middle !important; color: var(--muted); }
.print-options-heading { margin: 1.25rem 0 1.4rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.print-options-heading h2 { margin: 0 0 .45rem; font-size: .95rem; }
.print-options-heading p { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.6; }
