/* =========================================================================
   Sistema Habbo — Design System próprio (layout de 3 colunas)
   Sem Atlantis. Substitui o chrome do tema legado.
   Tokens via CSS custom properties; temas claro/escuro.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --accent: #b98a34;
  --accent-strong: #a4772a;
  --accent-ink: #ffffff;
  --bg: #f4f3ee;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --border: #e6e2d8;
  --ink: #1d1f26;
  --ink-2: #585b66;
  --ink-3: #8b8e99;
  --sidebar-bg: #171a22;
  --sidebar-2: #1f232d;
  --sidebar-ink: #cfd2dc;
  --sidebar-muted: #7f8493;
  --success: #2f9e5f; --success-bg: rgba(47,158,95,.13);
  --warning: #c1841c; --warning-bg: rgba(193,132,28,.15);
  --danger:  #cf4b5c; --danger-bg:  rgba(207,75,92,.13);
  --info:    #3b7fb5; --info-bg:    rgba(59,127,181,.13);
  --radius: 11px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20,22,30,.06);
  --shadow: 0 1px 2px rgba(20,22,30,.05), 0 6px 20px rgba(20,22,30,.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 244px;
  --rightbar-w: 322px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101218; --surface: #191c24; --surface-2: #20242e; --border: #2a2f3b;
    --ink: #e9eaef; --ink-2: #a4a8b5; --ink-3: #767b89;
    --sidebar-bg: #0e1016; --sidebar-2: #171a22;
    --accent: #cb9c47; --accent-strong: #b8873b;
    --success-bg: rgba(47,158,95,.18); --warning-bg: rgba(193,132,28,.2);
    --danger-bg: rgba(207,75,92,.18); --info-bg: rgba(59,127,181,.18);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #101218; --surface: #191c24; --surface-2: #20242e; --border: #2a2f3b;
  --ink: #e9eaef; --ink-2: #a4a8b5; --ink-3: #767b89;
  --sidebar-bg: #0e1016; --sidebar-2: #171a22;
  --accent: #cb9c47; --accent-strong: #b8873b;
  --success-bg: rgba(47,158,95,.18); --warning-bg: rgba(193,132,28,.2);
  --danger-bg: rgba(207,75,92,.18); --info-bg: rgba(59,127,181,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}
:root[data-theme="light"] {
  --bg: #f4f3ee; --surface: #ffffff; --surface-2: #faf9f5; --border: #e6e2d8;
  --ink: #1d1f26; --ink-2: #585b66; --ink-3: #8b8e99;
  --sidebar-bg: #171a22; --sidebar-2: #1f232d;
  --accent: #b98a34; --accent-strong: #a4772a;
  --success-bg: rgba(47,158,95,.13); --warning-bg: rgba(193,132,28,.15);
  --danger-bg: rgba(207,75,92,.13); --info-bg: rgba(59,127,181,.13);
  --shadow: 0 1px 2px rgba(20,22,30,.05), 0 6px 20px rgba(20,22,30,.06);
}

body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.45; font-size: 14px; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }
.tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Shell: 3 columns ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rightbar-w);
  grid-template-rows: auto 1fr;
  grid-template-areas: "nav top top" "nav main side";
  min-height: 100vh;
}
.app.no-right {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-areas: "nav top" "nav main";
}

/* ---------- Left sidebar ---------- */
.sidebar { grid-area: nav; background: var(--sidebar-bg); color: var(--sidebar-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 50; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; flex: none; overflow: hidden;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px rgba(185,138,52,.4); }
.brand-mark img { width: 24px; height: 24px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--sidebar-muted); letter-spacing: .03em; }

.nav { flex: 1; overflow-y: auto; padding: 10px 12px 14px; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 8px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--sidebar-muted); font-weight: 600; padding: 15px 12px 7px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--sidebar-ink); font-size: 13.5px; font-weight: 500; position: relative;
  transition: background .14s, color .14s; cursor: pointer; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .82; }
.nav-item:hover { background: rgba(255,255,255,.05); }
.nav-item.active { background: linear-gradient(90deg, rgba(185,138,52,.20), rgba(185,138,52,.06)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--accent); }
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; }

/* Collapsible nav groups via <details> (sem JS) */
.nav-group { }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .caret { margin-left: auto; transition: transform .18s; }
.nav-group[open] > summary .caret { transform: rotate(90deg); }
.nav-sub { margin: 2px 0 4px 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 1px; }
.nav-subitem { display: block; padding: 7px 11px; border-radius: 8px; font-size: 13px;
  color: var(--sidebar-muted); transition: background .13s, color .13s; }
.nav-subitem:hover { background: rgba(255,255,255,.05); color: var(--sidebar-ink); }
.nav-subitem.active { color: #fff; background: rgba(185,138,52,.14); }

.side-user { display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-top: 1px solid rgba(255,255,255,.06); }
.side-user .u-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.side-user .u-rank { font-size: 11.5px; color: var(--sidebar-muted); }

/* Avatares */
.avatar { border-radius: 9px; flex: none; background: var(--surface-2); object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; }
.avatar.md { width: 38px; height: 38px; border-radius: 10px; }

/* ---------- Topbar ---------- */
.topbar { grid-area: top; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 26px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s; position: relative; }
.icon-btn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; min-width: 8px; height: 8px; border-radius: 6px;
  background: var(--danger); border: 2px solid var(--surface); }
.icon-btn .dot.count { top: 5px; right: 4px; padding: 0 4px; height: 15px; font-size: 10px; color: #fff;
  font-weight: 700; display: grid; place-items: center; }
.hamburger { display: none; }
.top-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.top-title small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Center content ---------- */
.main { grid-area: main; padding: 24px 26px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
  font-weight: 700; margin-bottom: 5px; }
.page-head h1 { margin: 0; font-size: 25px; letter-spacing: -.02em; text-wrap: balance; }
.page-head .sub { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; }
.ml-auto { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px;
  border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: .14s; font-family: inherit; line-height: 1; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(185,138,52,.35); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.94); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.card + .card { margin-top: 16px; }
/* Containers com gap já espaçam os cards — evita gap dobrado e desalinhamento. */
.stack > .card + .card, .rb-sticky > .card + .card, .row2 > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 11px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-head .count { font-size: 12px; color: var(--ink-3); }
.card-body { padding: 16px 18px; }
/* Aproxima o conteúdo do título (evita gap grande head->body). */
.card-head + .card-body, .card-head + form > .card-body { padding-top: 7px; }
.card-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.link { font-size: 12.5px; color: var(--accent); font-weight: 600; }

/* Layout helpers */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: start; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }

/* ---------- Home: carrossel (hero) de slides ---------- */
.hero { position: relative; margin-bottom: 22px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: block;
  height: clamp(170px, 24vw, 280px); background-size: cover; background-position: center; }
.hero-slide .hero-cap { position: absolute; inset: auto 0 0 0; padding: 16px 18px; color: #fff;
  font-weight: 700; letter-spacing: -.01em; font-size: 16px;
  background: linear-gradient(to top, rgba(15,17,23,.78), transparent); }
/* Setas */
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(15,17,23,.5); color: #fff;
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); transition: background .15s, opacity .15s; }
.hero-nav:hover { background: rgba(15,17,23,.82); }
.hero-nav svg { width: 20px; height: 20px; }
.hero-nav.prev { left: 12px; } .hero-nav.next { right: 12px; }
/* Bolinhas */
.hero-dots { position: absolute; left: 0; right: 0; bottom: 13px; z-index: 3; display: flex;
  justify-content: center; gap: 7px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.45); transition: background .15s, width .15s; }
.hero-dots button.active { background: #fff; width: 22px; border-radius: 4px; }

/* ---------- Home: cards de destaque (spotlight) ---------- */
.spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 22px; }
.spot { position: relative; overflow: hidden; border-radius: 20px; padding: 18px 18px 20px;
  min-height: 430px; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: #f6efe0;
  background:
    radial-gradient(88% 52% at 50% 30%, rgba(0,0,0,.30), transparent 72%),
    linear-gradient(152deg,
      color-mix(in srgb, var(--accent) 80%, #000) 0%,
      color-mix(in srgb, var(--accent) 40%, #0b0d07) 46%,
      #0b0d07 84%);
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.spot:hover { transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 80%, transparent);
  box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.spot-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: rgba(0,0,0,.26);
  color: #f4dca6; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.spot-badge svg { width: 15px; height: 15px; }
.spot-ava { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; margin: 4px 0; }
.spot-ava img { height: 210px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.5)); image-rendering: -webkit-optimize-contrast; }
.spot-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1;
  color: #edf4e3; text-shadow: 0 1px 3px rgba(0,0,0,.45); max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-role { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 13.5px; font-weight: 500; }
.spot-date { margin-top: 15px; display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px;
  border-radius: 13px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: rgba(0,0,0,.24); color: #f4dca6; font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.spot-date svg { width: 16px; height: 16px; flex: none; }

/* Variante compacta para a sidebar direita */
.spots.mini { grid-template-columns: 1fr; gap: 12px; margin-bottom: 0; }
.spots.mini .spot { min-height: 0; border-radius: 16px; padding: 14px 12px 15px; }
.spots.mini .spot-badge { font-size: 10px; padding: 6px 12px; letter-spacing: .1em; }
.spots.mini .spot-badge svg { width: 13px; height: 13px; }
.spots.mini .spot-ava { margin: 8px 0 2px; }
.spots.mini .spot-ava img { height: 118px; }
.spots.mini .spot-name { font-size: 16px; }
.spots.mini .spot-role { font-size: 12px; }
.spots.mini .spot-date { font-size: 11px; padding: 7px 12px; margin-top: 12px; border-radius: 11px; }
.spots.mini .spot-date svg { width: 14px; height: 14px; }

/* ---------- Busca militar: carteira de identidade ---------- */
.idsearch { max-width: 560px; margin: 0 auto 26px; position: relative; }
.idsearch .input { width: 100%; height: 48px; font-size: 15px; padding-left: 44px; }
.idsearch .search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.idsug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; max-height: 320px; overflow-y: auto; }
.idsug[hidden] { display: none; }
.idsug button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 13px; background: none; border: 0; cursor: pointer; color: var(--ink); border-bottom: 1px solid var(--border); }
.idsug button:last-child { border-bottom: 0; }
.idsug button:hover, .idsug button.active { background: var(--surface-2); }
.idsug img { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); flex: none; }
.idsug .s-name { font-weight: 600; font-size: 14px; }
.idsug .s-pat { font-size: 12px; color: var(--ink-3); }

.idcard { max-width: 640px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.idcard-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; color: #fff;
  background: linear-gradient(120deg, #191b22, #2c281f); border-bottom: 3px solid var(--accent); }
.idcard-head .brasao { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--accent); flex: none; }
.idcard-head .brasao img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.idcard-head .inst-name { font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
.idcard-head .inst-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; opacity: .62; margin-top: 1px; }
.idcard-head .doc { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; opacity: .7; text-align: right; }
.idcard-body { display: grid; grid-template-columns: 158px 1fr; gap: 20px; padding: 22px 20px; }
.idcard-photo { position: relative; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); height: 200px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.idcard-photo img { height: 226px; margin-bottom: -14px; image-rendering: -webkit-optimize-contrast; }
.idcard-photo .ph-tag { position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 6px; }
.idfields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; align-content: start; }
.idfield.full { grid-column: 1 / -1; }
.idfield .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 3px; }
.idfield .v { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.idcard-foot { display: flex; align-items: center; gap: 14px; padding: 13px 20px;
  border-top: 1px dashed var(--border); font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.idcard-foot .matricula { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .12em; color: var(--ink-2); }
.idcard-foot .barcode { flex: 1; min-width: 90px; height: 26px; opacity: .5;
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px); }

@media (max-width: 560px) {
  .idcard-body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .idcard-photo { width: 158px; }
  .idfields { grid-template-columns: 1fr 1fr; text-align: left; width: 100%; }
}

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 17px; box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.kpi-ico { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; }
.kpi-ico svg { width: 20px; height: 20px; }
.kpi-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi-trend { font-size: 12px; font-weight: 600; }
.up { color: var(--success); } .down { color: var(--danger); }
.tone-info    { background: var(--info-bg);    color: var(--info); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-danger  { background: var(--danger-bg);  color: var(--danger); }
.tone-accent  { background: var(--accent);     color: #fff; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); font-weight: 600; padding: 11px 18px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tbody td { padding: 11px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .right { text-align: right; }
.who { display: flex; align-items: center; gap: 10px; }
.who .av { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.who b { font-weight: 600; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--success); background: var(--success-bg); }
.pill.warn { color: var(--warning); background: var(--warning-bg); }
.pill.bad { color: var(--danger); background: var(--danger-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.plain { color: var(--ink-2); background: var(--surface-2); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 7px; font-size: 11.5px;
  font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }

/* ---------- Action icon buttons (tabelas) ---------- */
.actions { display: inline-flex; gap: 6px; }
.actions.end { justify-content: flex-end; width: 100%; }
.act { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; border: 0; transition: .13s; background: var(--surface-2); color: var(--ink-2); }
.act svg { width: 15px; height: 15px; }
.act.a-up   { color: var(--success); background: var(--success-bg); }
.act.a-down { color: var(--warning); background: var(--warning-bg); }
.act.a-edit { color: var(--info);    background: var(--info-bg); }
.act.a-warn { color: var(--warning); background: var(--warning-bg); }
.act.a-del  { color: var(--danger);  background: var(--danger-bg); }
.act:hover { transform: translateY(-1px); filter: brightness(.97); }
.act-form { display: inline; }

/* ---------- Feed / lists (right panel) ---------- */
.feed-item { display: flex; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); }
.feed-dot svg { width: 16px; height: 16px; }
.feed-item h3 { margin: 0; font-size: 13px; font-weight: 600; }
.feed-item p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.feed-item time { font-size: 11px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.pend { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); transition: background .13s; }
.pend:hover { background: var(--surface-2); }
.pend-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pend-ico svg { width: 17px; height: 17px; }
.pend b { font-size: 13.5px; font-weight: 600; }
.pend span { font-size: 12px; color: var(--ink-3); display: block; }
.pend .n { margin-left: auto; font-size: 15px; font-weight: 700; }

/* ---------- Right sidebar ---------- */
.rightbar { grid-area: side; padding: 24px 22px 24px 0; }
.rb-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 13px; }
.form-group:last-child { margin-bottom: 0; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.label .req { color: var(--danger); }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 13.5px; transition: border-color .14s, box-shadow .14s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.textarea { resize: vertical; min-height: 90px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8e99' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.segmented label { padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); background: var(--surface); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--accent); color: #fff; }

/* ---------- Alerts / callouts ---------- */
.callout { display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13px; }
.callout.warn { background: var(--warning-bg); color: var(--warning); }
.callout.info { background: var(--info-bg); color: var(--info); }
.callout.danger { background: var(--danger-bg); color: var(--danger); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; gap: 7px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); }
.crumbs .sep { opacity: .5; }

/* ---------- Toast (mensagens flash) ---------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13.5px;
  max-width: 340px; animation: toast-in .25s ease; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok { border-left: 3px solid var(--success); } .toast.ok svg { color: var(--success); }
.toast.err { border-left: 3px solid var(--danger); } .toast.err svg { color: var(--danger); }
.toast.info { border-left: 3px solid var(--info); } .toast.info svg { color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------- Modal nativo (<dialog>) ---------- */
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; background: var(--surface);
  color: var(--ink); max-width: 560px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.modal-x { margin-left: auto; cursor: pointer; color: var(--ink-3); background: none; border: 0; padding: 4px; font-size: 18px; line-height: 1; }
.modal-body { padding: 8px 18px 16px; }
.row-kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.row-kv:last-child { border-bottom: 0; }
.row-kv .k { color: var(--ink-2); flex: none; }
.row-kv .v { text-align: right; font-weight: 600; }

/* ---------- Acordeão (details usado como card) ---------- */
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary .caret { margin-left: auto; transition: transform .18s; color: var(--ink-3); }
details.card[open] > summary .caret { transform: rotate(90deg); }

/* ---------- Artigo (conteúdo rico: notícia/apostila/chamado) ---------- */
.article { font-size: 14.5px; line-height: 1.68; color: var(--ink); }
.article h1, .article h2, .article h3, .article h4 { letter-spacing: -.01em; margin: 1.2em 0 .5em; line-height: 1.25; }
.article p { margin: 0 0 1em; }
.article a { color: var(--accent); font-weight: 600; }
.article img { max-width: 100%; border-radius: 8px; height: auto; }
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 1em; }
.article table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 13.5px; }
.article td, .article th { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.article blockquote { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; color: var(--ink-2); margin: 1em 0; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2); }
.byline img { width: 30px; height: 30px; border-radius: 8px; }

/* ---------- Perfil (rede social) ---------- */
.profile-cover { height: 150px; position: relative;
  background: linear-gradient(115deg, var(--accent) 0%, var(--accent-strong) 55%, #6d4d1c 100%); }
.profile-cover::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(620px 220px at 18% -40%, rgba(255,255,255,.28), transparent 70%); }
.profile-main { padding: 0 24px 22px; }
.profile-top { display: flex; align-items: flex-end; gap: 18px; margin-top: -60px; flex-wrap: wrap; position: relative; }
.profile-ava { width: 100px; height: 124px; border-radius: 18px; border: 4px solid var(--surface);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--surface-2)), var(--surface-2));
  overflow: hidden; flex: none; display: flex; align-items: flex-start; justify-content: center; box-shadow: var(--shadow-sm); }
.profile-ava img { width: 108%; max-width: none; margin-top: 6px; }
.profile-id { flex: 1 1 200px; min-width: 0; padding-bottom: 6px; }
.profile-id h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.profile-id .role { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.profile-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; padding-bottom: 8px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 20px; }
.pstat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 12px; text-align: center; }
.pstat .n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pstat .l { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
@media (max-width: 560px) {
  .profile-top { margin-top: -40px; } .profile-ava { width: 88px; height: 88px; }
  .profile-actions { width: 100%; }
}

/* ---------- Auth (login/cadastro/recuperação) ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1100px 560px at 50% -12%, color-mix(in srgb, var(--accent) 15%, var(--bg)), var(--bg)); }
.auth-wrap { width: 100%; max-width: 404px; }
.auth-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-brand .n { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.auth-card { padding: 26px 24px; }
.auth-card h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.01em; }
.auth-card .lead { color: var(--ink-2); font-size: 13.5px; margin: 0 0 18px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-foot { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 16px; }
.code { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 11px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--accent); letter-spacing: .04em; }

.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .app, .app.no-right {
    grid-template-columns: var(--sidebar-w) minmax(0,1fr);
    grid-template-areas: "nav top" "nav main" "nav side";
  }
  .app.no-right { grid-template-areas: "nav top" "nav main"; }
  .rightbar { padding: 0 26px 26px; }
  .rb-sticky { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 18px; }
  .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .app, .app.no-right { grid-template-columns: 1fr; grid-template-areas: "top" "main" "side"; }
  .app.no-right { grid-template-areas: "top" "main"; }
  .sidebar { position: fixed; left: 0; top: 0; width: 262px; transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4,0,.2,1); }
  .app.open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.45); }
  .hamburger { display: grid; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .22s; }
  .app.open .scrim { display: block; opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .main { padding: 18px 16px; } .topbar { padding: 11px 16px; } .rightbar { padding: 0 16px 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 11px; }
  .page-head h1 { font-size: 22px; }
  .rb-sticky { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ============================================================
   [TEMP] Ocultar divisórias internas dos cards — REVERSÍVEL.
   Deixa as linhas transparentes (mantém o espaçamento, sem
   deslocar o layout). Para restaurar as linhas originais,
   basta apagar este bloco inteiro.
   Não afeta tabelas (.tbl) nem o traço da carteira (.idcard).
   ============================================================ */
.card-head    { border-bottom-color: transparent; }
.card-foot    { border-top-color: transparent; }
.byline       { border-top-color: transparent; }
.feed-item    { border-bottom-color: transparent; }
.row-kv       { border-bottom-color: transparent; }
.modal-head   { border-bottom-color: transparent; }
/* Linhas definidas via style inline (perfil "Sobre", lista do painel) */
[style*="border-bottom:1px solid var(--border)"] { border-bottom-color: transparent !important; }

/* ============================================================
   Apostilas (material didático) — lista + leitura
   ============================================================ */
.doc-hero { display: flex; align-items: center; gap: 18px; padding: 24px; margin-bottom: 22px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 58%), var(--surface); }
.doc-hero-ico { width: 60px; height: 60px; border-radius: 16px; flex: none; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 7%, transparent), 0 10px 26px color-mix(in srgb, var(--accent) 22%, transparent); }
.doc-hero-ico svg { width: 28px; height: 28px; }
.doc-hero h1 { margin: 0; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.02em; line-height: 1.1; }
.doc-hero .eyebrow { margin-bottom: 3px; }
.doc-hero .sub { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; }
.doc-hero-meta { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  font-size: 12.5px; color: var(--ink-3); }
.doc-hero-meta svg { width: 15px; height: 15px; }
.doc-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  font-size: 13px; color: var(--ink-2); font-weight: 500; }
.doc-back svg { width: 16px; height: 16px; }

/* Busca */
.doc-search { position: relative; margin-bottom: 24px; }
.doc-search .input { width: 100%; height: 46px; padding-left: 42px; font-size: 14.5px; }
.doc-search .search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }

/* Grupos (pastas) */
.doc-group { margin-bottom: 26px; }
.doc-group[hidden] { display: none; }
.doc-group-head { display: flex; align-items: center; gap: 9px; margin: 0 2px 12px; }
.doc-group-head svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.doc-group-head h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.doc-group-head .count { margin-left: auto; font-size: 12px; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }

/* Item de apostila */
.doc-item { display: flex; align-items: center; gap: 15px; padding: 15px 18px; margin-bottom: 11px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.doc-item[hidden] { display: none; }
.doc-item:hover { transform: translateY(-1px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.doc-item-num { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); }
.doc-item-body { min-width: 0; flex: 1; }
.doc-item-body h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item-body p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item-arrow { flex: none; color: var(--ink-3); }
.doc-item-arrow svg { width: 18px; height: 18px; display: block; }
.doc-empty { display: none; }

/* Leitura: card de conteúdo */
.doc-content { max-width: 860px; }

/* ============================================================
   Perfil (Fase A): chips militares, estatísticas, grupos
   ============================================================ */
.profile-id .eyebrow { margin-bottom: 3px; }
.mchips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mchip { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.mchip .k { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.mchip .v { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.mchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.mchip .dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.mchip .dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }

/* Estatísticas com ícone no canto */
.pstat { position: relative; }
.pstat .ico { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; color: var(--ink-3); opacity: .45; }
.pstat .ico svg { width: 100%; height: 100%; }

/* Grupos */
.grp-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  font-weight: 600; margin: 2px 2px 6px; }
.grp-sub:not(:first-child) { margin-top: 16px; }
.grp-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 11px;
  transition: background .13s; }
.grp-item:hover { background: var(--surface-2); }
.grp-ico { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); }
.grp-ico svg { width: 19px; height: 19px; }
.grp-body { flex: 1; min-width: 0; }
.grp-body b { font-size: 14px; letter-spacing: -.01em; }
.grp-body span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ============================================================
   Perfil (Fase B): Timeline de carreira
   ============================================================ */
.timeline { padding: 6px 4px 2px; }
.tl-item { position: relative; padding: 0 0 20px 40px; }
.tl-item::before { content: ''; position: absolute; left: 14px; top: 26px; bottom: -2px; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-dot { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--border); }
.tl-dot svg { width: 15px; height: 15px; }
.tl-head { display: flex; align-items: baseline; gap: 10px; }
.tl-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; min-width: 0; }
.tl-time { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; flex: none; }
.tl-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-top: 3px; }

/* ============================================================
   Mural (rede social) — composer, posts, comentários
   ============================================================ */
.mural { max-width: 700px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.mural .card { margin: 0; }
.mural > .page-head { margin-bottom: 0; }

/* Composer */
.composer { display: flex; gap: 12px; }
.composer .avatar { flex: none; }
.composer-main { flex: 1; min-width: 0; }
.composer .textarea { min-height: 64px; }
.composer-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.composer-foot .input { flex: 1; }
.composer-foot .btn { flex: none; }

/* Post */
.post { padding: 0; }
.post-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px 0; }
.post-head .p-id { min-width: 0; line-height: 1.25; }
.post-head .p-id b { font-size: 14px; letter-spacing: -.01em; }
.post-head .p-id span { display: block; font-size: 12px; color: var(--ink-3); }
.post-body { padding: 11px 16px 13px; }
.post-text { font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.post-img { margin-top: 12px; width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.post-actions { display: flex; gap: 4px; padding: 5px 10px; border-top: 1px solid var(--border); }
.post-act { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 0; border-radius: 8px;
  background: none; cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; transition: background .13s, color .13s; }
.post-act:hover { background: var(--surface-2); }
.post-act svg { width: 18px; height: 18px; }
.post-act.liked { color: var(--accent); }
.post-act.liked svg { fill: currentColor; }

/* Comentários */
.comments { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 15px; border-top: 1px solid var(--border); }
.comment { display: flex; gap: 10px; }
.comment .avatar { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.comment-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.comment-bubble b { font-size: 13px; letter-spacing: -.01em; }
.comment-bubble .c-text { font-size: 13px; line-height: 1.45; margin-top: 2px; word-break: break-word; }
.comment-meta { font-size: 11px; color: var(--ink-3); margin: 4px 0 0 12px; }
.comment-form { align-items: center; }
.comment-form .input { height: 38px; }

/* Regras do Mural (rightbar) */
.mural-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; counter-reset: r; }
.mural-rules li { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.mural-rules li::before { counter-increment: r; content: counter(r); flex: none; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); }

/* ============================================================
   Formulário guiado em seções (relatórios, etc.)
   ============================================================ */
.form-card { max-width: 860px; padding: 0; overflow: hidden; }
.form-hero { display: flex; align-items: center; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--border);
  background: radial-gradient(130% 160% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%); }
.form-hero-ico { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.form-hero-ico svg { width: 23px; height: 23px; }
.form-hero .eyebrow { margin-bottom: 1px; }
.form-hero h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.form-hero p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }

.fsec { padding: 20px 22px; }
.fsec + .fsec { border-top: 1px solid var(--border); }
.fsec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.fsec-n { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); }
.fsec-h h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.fsec-h .hint { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* Linha de "equipe": rótulo do papel + patente + militar */
.role-row { display: grid; grid-template-columns: 128px 1fr 1fr; gap: 12px; align-items: center; }
.role-row + .role-row { margin-top: 11px; }
.role-row .role-tag { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.role-row .role-tag .req { color: var(--danger); }
@media (max-width: 700px) {
  .role-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .role-row .role-tag { grid-column: 1 / -1; margin-bottom: 1px; }
}
@media (max-width: 460px) { .role-row { grid-template-columns: 1fr; } }

/* ============================================================
   Modal de relatório de treinamento (rico)
   ============================================================ */
.rel-modal { max-width: 660px; }
.rel-modal .modal-body { padding: 0; }
.rel-modal .modal-head .status { margin-left: auto; margin-right: 6px; }
.rel-sec { padding: 16px 18px; }
.rel-sec + .rel-sec { border-top: 1px solid var(--border); }
.rel-sec-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  font-weight: 700; margin-bottom: 12px; }

/* Equipe (avatares) */
.rel-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.rel-person { text-align: center; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 8px 13px; position: relative; overflow: hidden; }
.rel-person::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 46px;
  background: linear-gradient(color-mix(in srgb, var(--accent) 15%, transparent), transparent); }
.rel-person.vazio { opacity: .7; }
.rel-ava { position: relative; width: 92px; height: 114px; margin: 0 auto 9px; border-radius: 12px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface));
  border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.rel-ava img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.rel-ava svg { width: 32px; height: 32px; color: var(--ink-3); }
.rel-role { position: relative; font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); font-weight: 800; }
.rel-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-pat { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Resumo (início/término/civis) */
.rel-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rel-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; display: flex; align-items: center; gap: 11px; }
.rel-stat .ico { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.rel-stat .ico svg { width: 16px; height: 16px; }
.rel-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
.rel-stat .v { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }

/* Participantes (chips) */
.rel-field + .rel-field { margin-top: 14px; }
.rel-field .lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; display: flex; align-items: center; gap: 7px; }
.rel-field .lbl .n { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-chip { font-size: 12px; padding: 3px 11px; border-radius: 20px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--ink-2); font-weight: 600; }
.rel-chip.ok  { background: var(--success-bg); border-color: transparent; color: var(--success); }
.rel-chip.bad { background: var(--danger-bg);  border-color: transparent; color: var(--danger); }
.rel-none { font-size: 13px; color: var(--ink-3); }

/* Observação */
.rel-obs { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; }

@media (max-width: 460px) { .rel-meta { grid-template-columns: 1fr; } }
