/* Lista da Equipe — fundação visual (preview) */
:root {
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-2: #f5f9fe;
  --surface-3: #e7f0fa;
  --ink: #14293d;
  --ink-2: #334e66;
  --muted: #5b7388;
  --faint: #5f7689;
  --line: #d7e4f1;
  --line-strong: #b9cfe4;
  --brand: #2f6fa8;
  --brand-dark: #1f4f79;
  --brand-soft: #dcecfb;
  --attention: #8a5a10;
  --attention-soft: #fbf3e1;
  --danger: #a23a3f;
  --danger-soft: #fbeaea;
  --blue: #5a67a8;
  --blue-soft: #eceefb;
  --orchid: #6b5b95;
  --success: #2c6a55;
  --success-soft: #e2f2ec;
  --radius: 9px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(20, 41, 61, .05), 0 12px 28px -24px rgba(20, 41, 61, .45);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --header-h: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
:where(.input, .select, .textarea):focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px;
}
.skip-link:focus { top: 10px; }

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 252, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.app-header__inner {
  max-width: 1280px; margin: 0 auto; min-height: var(--header-h);
  padding: 0 28px; display: flex; align-items: center; gap: 28px;
  container-type: inline-size; container-name: header;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #f4f9ff;
  display: grid; place-items: center; flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand__text small { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; white-space: nowrap; }
.app-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex: 1; }
.app-nav a {
  padding: 8px 11px; border-radius: 7px; color: var(--ink-2); font-size: 13px;
  font-weight: 550; text-decoration: none; white-space: nowrap;
}
.app-nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.app-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 7px; width: 38px; height: 38px; place-items: center; cursor: pointer;
}
.user-menu { position: relative; margin-left: auto; flex: none; }
.user-menu summary {
  display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
  padding: 5px 8px 5px 5px; border-radius: 8px; border: 1px solid transparent;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--surface-3); border-color: var(--line); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-dark); color: #eaf4fd;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .03em;
}
.user-menu__id { display: flex; flex-direction: column; line-height: 1.2; }
.user-menu__id strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.user-menu__id small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.chev { color: var(--muted); }
.user-menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; display: grid;
}
.user-menu__meta { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: grid; }
.user-menu__meta strong { font-size: 13px; }
.user-menu__meta span { font-size: 11.5px; color: var(--muted); }
.user-menu__panel a { padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.user-menu__panel a:hover { background: var(--surface-3); text-decoration: none; }
.user-menu__panel .user-menu__exit { color: var(--danger); }
.role-banner {
  background: var(--attention-soft); border-top: 1px solid #efd9ae;
  font-size: 12px; color: #7a4f0b; padding: 7px 28px; text-align: center;
}

/* Page scaffolding */
.page {
  max-width: 1280px; margin: 0 auto; padding: 28px;
  container-type: inline-size; container-name: page;
}
.page--narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head__title { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 650; }
.page-head h1 { font-size: 25px; letter-spacing: -.025em; font-weight: 680; }
.page-head__sub { color: var(--muted); font-size: 13px; max-width: 640px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.section-title h2 { font-size: 15px; letter-spacing: -.01em; }
.section-title p { font-size: 12px; color: var(--muted); }

.breadcrumbs { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-current] { color: var(--ink-2); }
.breadcrumbs .sep { color: var(--line-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:focus-visible, .app-nav a:focus-visible, .icon-btn:focus-visible, .seg a:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #882f26; border-color: #882f26; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line); }

/* Segmented + tabs */
.seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg a, .seg button {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600;
  min-height: 32px; padding: 6px 12px; border-radius: 6px; cursor: pointer; text-decoration: none;
}
.seg a[aria-current="true"], .seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,41,61,.08); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  border: 0; background: transparent; min-height: 40px; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px;
}
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.tab .count { font-size: 11px; color: var(--muted); background: var(--surface-3); padding: 1px 6px; border-radius: 99px; margin-left: 5px; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 15px 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.stat:first-child { border-left: 0; }
.stat__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.stat__value { font-size: 27px; font-weight: 680; letter-spacing: -.03em; line-height: 1.15; }
.stat__hint { font-size: 11.5px; color: var(--muted); }
.stat--alert .stat__value { color: var(--danger); }
.stat--brand .stat__value { color: var(--brand); }
a.stat { transition: background .12s ease; }
a.stat:hover { background: var(--surface-2); }
a.stat:hover .stat__label { color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

/* Toolbar + fields */
.toolbar {
  display: flex; gap: 10px; align-items: center; padding: 12px; margin: 14px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); flex-wrap: wrap;
}
.toolbar__grow { flex: 1 1 240px; }
.toolbar__right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 0 11px; height: 37px; font-size: 13.5px; color: var(--ink); outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.textarea { height: auto; min-height: 112px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,111,168,.16); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-2); color: var(--muted); cursor: not-allowed;
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c746e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.hint { font-size: 11.5px; color: var(--muted); }
.error-text { font-size: 11.5px; color: var(--danger); font-weight: 550; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-field .input { padding-left: 33px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-stack { display: grid; gap: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 4px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.check input { margin-top: 2px; accent-color: var(--brand); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 650; line-height: 1.7; white-space: nowrap; border: 1px solid transparent;
}
.badge--pendente { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.badge--andamento { background: var(--blue-soft); color: var(--blue); }
.badge--concluida { background: var(--brand-soft); color: var(--brand-dark); }
.badge--atrasada { background: var(--danger-soft); color: var(--danger); }
.badge--admin { background: #ece8f6; color: var(--orchid); }
.badge--membro { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.badge--ativo { background: var(--brand-soft); color: var(--brand-dark); }
.badge--inativo { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
.badge--troca { background: var(--attention-soft); color: var(--attention); }
.badge--nenhum { background: transparent; color: var(--muted); border-color: var(--line); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio .dot { width: 8px; height: 8px; }
.prio--baixa { color: #5f7689; }
.prio--media { color: #3f7fb8; }
.prio--alta { color: var(--attention); }
.prio--urgente { color: var(--danger); }
.prio--baixa .dot { background: #7c93a8; }
.prio--media .dot { background: #4f8cc9; }
.prio--alta .dot { background: #c08a28; }
.prio--urgente .dot { background: var(--danger); }

/* Panels + dashboard */
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; min-width: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel__head h2, .panel__head h3 { font-size: 13.5px; letter-spacing: -.005em; }
.panel__head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.panel__foot { border-top: 1px solid var(--line); padding: 10px 16px; font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; align-items: center; }
.filters-bar { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 16px; flex-wrap: wrap; }
.filters-bar .field { min-width: 130px; }
.filters-bar .field--wide { min-width: 260px; flex: 1; }
.filters-bar .filters-actions { display: flex; gap: 8px; margin-left: auto; }
.kpi-note { font-size: 11px; color: var(--muted); }

.chart { width: 100%; min-height: 150px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.empty-chart { display: grid; place-items: center; min-height: 130px; color: var(--muted); font-size: 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 30px; gap: 9px; align-items: center; font-size: 11.5px; }
.bar-row__label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bar-fill--alert { background: var(--danger); }
.bar-fill--alt { background: #8fb8dc; }
.bar-track--overlay { position: relative; }
.bar-track--overlay .bar-fill { position: absolute; left: 0; top: 0; }
.bar-track--overlay .bar-fill--alert { z-index: 1; }
.bar-row__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.mini-bars { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 150px; max-width: 620px; margin-inline: auto; padding-top: 10px; }
.mini-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.mini-bar__fill { width: 100%; max-width: 46px; background: var(--brand); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.mini-bar__fill--soft { background: #8fb8dc; }
.mini-bar__value { font-size: 11px; font-weight: 650; }
.mini-bar__label { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; max-width: 70px; }

.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { transform: rotate(-90deg); }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__center strong { font-size: 20px; line-height: 1; }
.donut__center small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }

/* Tables */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.table-scroll {
  overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  -webkit-overflow-scrolling: touch;
}
.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-track { background: var(--surface-2); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.table-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.is-scrollable .table-foot span::after { content: " · deslize para ver todas as colunas"; color: var(--faint); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f7fbff; }
table.data tbody tr.is-late { background: #fdf6f6; }
table.data tbody tr.is-late:hover { background: #fbf0f0; }
table.data tbody tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.t-title { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.t-title a { color: var(--ink); font-weight: 600; }
.t-title a:hover { color: var(--brand); }
.t-title small { color: var(--muted); font-size: 11.5px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-title__flags { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.cell-person { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.avatar--xs { width: 22px; height: 22px; font-size: 8.5px; background: var(--surface-3); color: var(--ink-2); }
.cell-actions { text-align: right; width: 1%; min-width: 48px; white-space: nowrap; position: relative; }
.menu-pop {
  position: absolute; right: 10px; top: 38px; z-index: 20; min-width: 172px; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 5px;
}
.menu-pop.is-open { display: grid; }
.menu-pop button, .menu-pop a {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 9px; border-radius: 5px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.menu-pop button:hover, .menu-pop a:hover { background: var(--surface-3); text-decoration: none; }
.menu-pop .danger { color: var(--danger); }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination button { min-width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: 11.5px; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); }
.pagination button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* Empty + alerts */
.empty-state { display: grid; place-items: center; text-align: center; padding: 42px 20px; gap: 6px; }
.empty-state__icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-bottom: 4px; }
.empty-state h3 { font-size: 14px; }
.empty-state p { font-size: 12.5px; color: var(--muted); max-width: 360px; }
.empty-state .btn { margin-top: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 8px; font-size: 12.5px; border: 1px solid; }
.alert svg { flex: none; margin-top: 1px; }
.alert--info { background: #eaf2fb; border-color: #c9dcf1; color: #294f74; }
.alert--warn { background: var(--attention-soft); border-color: #efd9ae; color: #7a4f0b; }
.alert--danger { background: var(--danger-soft); border-color: #efcfd1; color: #832c31; }
.alert--success { background: var(--success-soft); border-color: #bfe0d4; color: var(--success); }
.alert strong { font-weight: 650; }
.alert a { color: inherit; font-weight: 650; text-decoration: underline; }

/* Detail */
.detail-head { display: flex; flex-direction: column; gap: 8px; }
.detail-head h1 { font-size: 24px; letter-spacing: -.025em; line-height: 1.2; }
.detail-flags { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); gap: 16px; align-items: start; }
.meta-list { display: grid; gap: 0; }
.meta-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.meta-row:last-child { border-bottom: 0; }
.meta-row dt { color: var(--muted); }
.meta-row dd { margin: 0; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.prose { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; white-space: pre-line; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 1px solid var(--line); margin-left: 5px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong);
}
.timeline li.is-last::before { border-color: var(--brand); background: var(--brand-soft); }
.timeline__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.timeline__head strong { font-size: 12.5px; }
.timeline__head time { font-size: 11px; color: var(--muted); }
.timeline__body { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.timeline__values { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.value-chip { font-family: var(--mono); font-size: 10.5px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--ink-2); }
.value-chip--new { background: var(--brand-soft); border-color: #bdd9f3; color: var(--brand-dark); }
.readonly-note { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Forms layout */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .9fr); gap: 16px; align-items: start; }
.form-section { padding: 18px; }
.form-section__title { font-size: 13px; font-weight: 650; margin-bottom: 3px; }
.form-section__sub { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.char-count { text-align: right; font-size: 10.5px; color: var(--muted); }
.autos { display: grid; gap: 9px; }
.auto-item { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.auto-item:last-child { border-bottom: 0; padding-bottom: 0; }
.auto-item span:first-child { color: var(--muted); }
.auto-item span:last-child { color: var(--ink-2); font-weight: 550; text-align: right; }

/* People */
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell__text { display: grid; line-height: 1.25; }
.person-cell__text strong { font-size: 12.5px; font-weight: 600; }
.person-cell__text span { font-size: 11px; color: var(--muted); }
.count-pair { display: inline-flex; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.count-pair .late { color: var(--danger); font-weight: 650; }
.person-hero { display: flex; gap: 14px; align-items: center; }
.avatar--lg { width: 52px; height: 52px; border-radius: 14px; font-size: 16px; }
.person-hero__meta { display: grid; gap: 2px; }
.person-hero__meta h1 { font-size: 21px; letter-spacing: -.02em; }
.person-hero__meta span { font-size: 12px; color: var(--muted); }

/* Auth */
.auth-body { min-height: 100vh; background: var(--bg); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); min-width: 0; }
.auth-brand {
  background: #183a5b; color: #eaf3fc; padding: 40px 52px; display: flex; flex-direction: column; gap: 40px;
  position: relative; overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -260px; bottom: -300px;
  border-radius: 50%; border: 1px solid rgba(200,226,249,.20);
}
.auth-brand::before {
  content: ""; position: absolute; width: 340px; height: 340px; right: -160px; bottom: -210px;
  border-radius: 50%; border: 1px solid rgba(200,226,249,.14);
}
.brand--auth { color: #eef6fe; }
.brand--auth .brand__mark { background: #d9ebfb; color: #183a5b; }
.brand--auth .brand__text small { color: rgba(214,235,253,.68); }
.auth-brand__copy { margin-top: auto; max-width: 470px; position: relative; z-index: 1; }
.auth-brand__copy .eyebrow { color: #a9ccec; }
.auth-brand__copy h1 { font-size: clamp(27px, 3.2vw, 38px); line-height: 1.14; letter-spacing: -.035em; font-weight: 650; margin: 12px 0 14px; color: #f2f8fe; }
.auth-brand__lead { color: rgba(222,239,253,.78); font-size: 13.5px; line-height: 1.65; max-width: 400px; }
.auth-brand__points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 11px; }
.auth-brand__points li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: rgba(228,242,254,.9); }
.auth-brand__points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9cc9ef; margin-top: 6px; flex: none; }
.auth-brand__foot { margin-top: auto; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: rgba(200,226,249,.50); position: relative; z-index: 1; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: var(--bg); min-width: 0; width: 100%; }
.auth-card { width: 100%; max-width: 400px; min-width: 0; }
.auth-card h1 { font-size: 24px; letter-spacing: -.025em; margin-bottom: 5px; }
.auth-card__sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-card .form-stack { gap: 14px; }
.password-field { position: relative; }
.password-field .input { padding-right: 40px; }
.password-field .icon-btn { position: absolute; right: 4px; top: 3px; }
.auth-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.auth-card__foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.auth-card__foot strong { color: var(--ink-2); }
.demo-note { display: inline-flex; gap: 6px; align-items: center; font-size: 10.5px; color: var(--muted); background: var(--surface-3); border: 1px solid var(--line); padding: 3px 8px; border-radius: 99px; margin-top: 10px; }
.auth-card .brand { display: none; }
.temp-identity { display: flex; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; margin-bottom: 18px; }
.temp-identity__text { display: grid; font-size: 12px; line-height: 1.35; min-width: 0; }
.temp-identity__text strong { font-size: 13px; }
.temp-identity__text span { color: var(--muted); overflow-wrap: anywhere; }
.requirements { list-style: none; padding: 10px 12px; margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 5px; font-size: 11.5px; color: var(--muted); }
.requirements li { display: flex; gap: 7px; align-items: center; }
.requirements li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.requirements li.is-met { color: var(--brand-dark); }
.requirements li.is-met::before { background: var(--brand); }
.auth-card > .alert { margin-bottom: 16px; }
.auth-card__brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-card__brand .brand__mark { background: var(--brand-soft); color: var(--brand-dark); }
.auth-card__brand .brand__text strong { font-size: 14px; }
.auth-notice { margin: 0 0 14px; }
.auth-notice .alert { margin: 0; }
.btn--block { width: 100%; height: 40px; position: relative; }
.btn__spinner { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: btn-spin .7s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: .78; }
.btn.is-loading { cursor: progress; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn__spinner { animation-duration: 2s; } }
.help-contact { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 13px; font-size: 12px; color: var(--muted); }
.help-contact summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; }
.help-contact summary::-webkit-details-marker { display: none; }
.help-contact summary::before { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 10px; color: var(--muted); }
.help-contact p { margin-top: 9px; line-height: 1.55; max-width: 380px; }
.dev-access { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface-2); padding: 10px 12px; }
.dev-access summary { cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; list-style: none; }
.dev-access summary::-webkit-details-marker { display: none; }
.dev-access__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--attention); box-shadow: 0 0 0 3px var(--attention-soft); }
.dev-access__sub { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 9px 0; }
.dev-access__list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.dev-access__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 9px; background: var(--surface); }
.dev-access__id { display: grid; line-height: 1.25; min-width: 0; }
.dev-access__id strong { font-family: var(--mono); font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.dev-access__id small { font-size: 10px; color: var(--muted); }
.dev-access__pass { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.dev-access__row .btn { height: 26px; padding: 0 7px; font-size: 10.5px; }
.dev-access__all { margin-top: 8px; height: 28px; padding: 0 8px; font-size: 11px; }
@media (max-width: 1080px) { .auth-card__brand { display: flex; } }
@media (max-width: 430px) {
  .dev-access__row { grid-template-columns: minmax(0, 1fr) auto; }
  .dev-access__pass { grid-column: 1 / -1; grid-row: 2; }
  .dev-access__row .btn { grid-row: 1; grid-column: 2; }
}

/* Dialog */
dialog.modal {
  border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(460px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -24px rgba(20,41,61,.45);
}
dialog.modal::backdrop { background: rgba(20, 41, 61, .46); }
.modal__head { padding: 16px 18px 10px; }
.modal__head h2 { font-size: 16px; letter-spacing: -.01em; }
.modal__head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal__body { padding: 6px 18px 16px; display: grid; gap: 12px; }
.modal__foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.modal__danger-zone { background: var(--danger-soft); border: 1px solid #efcfd1; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #832c31; }
.credential-box { border: 1px dashed var(--line-strong); background: var(--surface-2); border-radius: 8px; padding: 12px; display: grid; gap: 6px; font-size: 12.5px; }
.credential-box .row { display: flex; justify-content: space-between; gap: 12px; }
.credential-box .row span { color: var(--muted); }
.credential-box .row strong { font-family: var(--mono); font-size: 12px; }

/* Toast */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 80; background: var(--brand-dark); color: #eef7ff;
  border-radius: 9px; padding: 11px 15px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 360px;
}
.toast[hidden] { display: none; }

/* Footer */
.app-footer {
  max-width: 1280px; margin: 22px auto 0; padding: 18px 28px 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--muted); letter-spacing: .02em;
}

/* Utility */
.stack { display: grid; gap: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.pill-note { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.totals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.totals > div { background: var(--surface); padding: 11px 13px; display: grid; gap: 1px; }
.totals span { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.totals strong { font-size: 17px; letter-spacing: -.02em; }
.report-head { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.report-head h1 { font-size: 20px; letter-spacing: -.02em; }
.report-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.report-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.report-meta strong { color: var(--ink-2); font-weight: 600; }
.group-row td { background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.subtotal-row td { background: #f8fbff; font-weight: 650; font-size: 12px; }
.subtotal-row td:first-child { text-align: right; color: var(--muted); font-weight: 500; }
.print-only { display: none; }
.list-clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-clean li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.list-clean li:last-child { border-bottom: 0; padding-bottom: 0; }
.list-clean span { color: var(--muted); }

/* Container-aware composition (snapshot frames and narrow desktop) */
@container page (max-width: 1140px) {
  .grid--sidebar { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container header (max-width: 1020px) {
  .user-menu__id { display: none; }
  .app-nav a { padding: 8px 9px; }
}

/* Responsive */
@media (max-width: 1080px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 28px 20px; }
  .detail-grid, .form-layout, .grid--sidebar { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-header__inner { padding: 0 16px; gap: 14px; flex-wrap: wrap; }
  .nav-toggle { display: grid; margin-left: auto; }
  .app-nav {
    display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding: 6px 0 12px; border-top: 1px solid var(--line); margin: 0; gap: 2px;
  }
  .app-nav.is-open { display: flex; }
  .app-nav a { padding: 10px 12px; }
  .user-menu { order: 2; margin-left: 0; }
  .user-menu__id { display: none; }
  .page { padding: 20px 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .totals { grid-template-columns: repeat(2, 1fr); }
  .totals > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .role-banner { padding: 7px 16px; }
  .app-footer { padding: 16px 16px 22px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .page-head h1 { font-size: 21px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1 1 auto; }
  .panel__foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .toolbar, .filters-bar { flex-direction: column; align-items: stretch; }
  .toolbar__right, .filters-actions { margin-left: 0; width: 100%; }
  .toolbar__right .btn, .filters-actions .btn { flex: 1; }
  .toolbar__right .select, .filters-actions .select { flex: 1; }
  table.data th, table.data td { padding: 9px 10px; }
  .t-title { min-width: 180px; }
  .bar-row { grid-template-columns: 90px 1fr 26px; }
  .detail-head h1 { font-size: 20px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .meta-row { grid-template-columns: 100px 1fr; }
  .auth-panel { place-items: start center; }
  .auth-card { margin-top: 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 12px 14px; }
  .stat__value { font-size: 23px; }
  .totals { grid-template-columns: 1fr 1fr; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

@media print {
  .app-header, .app-footer, .toolbar, .filters-bar, .page-head__actions, .table-foot,
  .seg, .tabs, .menu-pop, .cell-actions, .breadcrumbs, .btn, .toast, .print-hidden { display: none !important; }
  body { background: #fff; font-size: 11px; }
  .page { max-width: none; padding: 0; }
  .panel, .table-card, .report-head, .stats { border-color: #bbb; break-inside: avoid; }
  table.data th { position: static; }
  .print-only { display: block; }
  a { color: inherit; text-decoration: none; }
}

/* Snapshot (docs/preview-visual.html) */
.snap-page { background: #e5eef8; }
.snap-header {
  position: sticky; top: 0; z-index: 90; height: 58px; background: #183a5b; color: #edf6ff;
  display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid #102d49;
}
.snap-header .brand { color: #edf6ff; }
.snap-header .brand__mark { background: #d9ebfb; color: #183a5b; }
.snap-header .brand__text small { color: rgba(212,235,253,.62); }
.snap-header__meta { margin-left: auto; font-size: 11px; color: rgba(211,234,252,.72); display: flex; gap: 12px; align-items: center; }
.snap-header__tag { border: 1px solid rgba(199,226,249,.28); border-radius: 99px; padding: 3px 9px; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.snap-layout { max-width: 1420px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; align-items: start; }
.snap-index { position: static; align-self: start; }
.snap-index h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #5b7388; margin-bottom: 9px; }
.snap-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; counter-reset: snap; }
.snap-index li { counter-increment: snap; }
.snap-index a { display: flex; gap: 7px; font-size: 11.5px; color: #334e66; padding: 5px 7px; border-radius: 5px; text-decoration: none; }
.snap-index a::before { content: counter(snap, decimal-leading-zero); font-family: var(--mono); font-size: 9.5px; color: #5b7388; margin-top: 2px; }
.snap-index a:hover { background: #ffffff; color: #2f6fa8; }
.snap-main { min-width: 0; display: grid; gap: 30px; }
.snap-intro { background: #ffffff; border: 1px solid #cfdeee; border-radius: 12px; padding: 22px 24px; }
.snap-intro h1 { font-size: 22px; letter-spacing: -.025em; }
.snap-intro p { font-size: 12.5px; color: #5b7388; max-width: 760px; margin-top: 5px; }
.snap-intro__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.snap-chip { font-size: 10.5px; background: #eef4fb; border: 1px solid #cfdeee; border-radius: 99px; padding: 3px 9px; color: #334e66; }
.snap-screen { scroll-margin-top: 74px; contain: layout; }
.snap-screen__label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 0 2px; }
.snap-screen__label h2 { font-size: 13.5px; letter-spacing: -.01em; }
.snap-screen__label span { font-family: var(--mono); font-size: 10px; color: #5b7388; }
.snap-frame { border: 1px solid #b9cfe4; border-radius: 12px; overflow: hidden; background: #eef4fb; box-shadow: 0 1px 2px rgba(20,41,61,.05); }
.snap-frame .app-header { position: static; }
.snap-frame .app-footer { margin-top: 0; }
.snap-frame table.data th { position: static; }
.snap-frame .page { max-width: none; }
.snap-frame--auth { padding: 0; }
.snap-frame--auth .auth-shell { min-height: 620px; }
.snap-styles { background: #ffffff; border: 1px solid #cfdeee; border-radius: 12px; padding: 22px 24px; scroll-margin-top: 74px; }
.snap-styles h2 { font-size: 15px; letter-spacing: -.01em; margin-bottom: 4px; }
.snap-styles > p { font-size: 12px; color: #5b7388; margin-bottom: 16px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 22px; }
.swatch { border: 1px solid #cfdeee; border-radius: 8px; overflow: hidden; background: #f5f9fe; }
.swatch i { display: block; height: 34px; }
.swatch span { display: block; padding: 5px 8px; font-size: 10px; color: #5b7388; }
.swatch strong { display: block; font-size: 11px; color: #14293d; }
.type-sample { display: grid; gap: 6px; border-top: 1px solid #cfdeee; padding-top: 14px; margin-top: 6px; }
.type-sample .t1 { font-size: 26px; font-weight: 680; letter-spacing: -.03em; }
.type-sample .t2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.type-sample .t3 { font-size: 14px; font-weight: 600; }
.type-sample .t4 { font-size: 12px; color: #5b7388; }
.type-sample .t5 { font-family: var(--mono); font-size: 11px; color: #5b7388; }
.comp-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid #cfdeee; padding-top: 14px; margin-top: 16px; }
.snap-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.snap-state { border: 1px solid #cfdeee; border-radius: 9px; padding: 12px; background: #f5f9fe; }
.snap-state h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5b7388; margin-bottom: 8px; }
@media (max-width: 1000px) {
  .snap-layout { grid-template-columns: 1fr; padding: 16px; }
  .snap-index ol { grid-template-columns: repeat(2, 1fr); display: grid; }
}
.snap-auth-wrap { background: var(--bg); }
.snap-auth-wrap .auth-shell { min-height: 640px; }
.snap-main { grid-template-columns: minmax(0, 1fr); }
.snap-main > * { min-width: 0; }
.snap-screen, .snap-styles, .snap-intro { min-width: 0; }
html, body.snap-page { overflow-x: hidden; }
[hidden] { display: none !important; }
.table--mobile { min-width: 0; }
@media (max-width: 620px) {
  .toolbar__grow { flex: none; }
  .toolbar .search-field { width: 100%; }
  .toolbar .search-field .input { height: 38px; }
  .toolbar .field { width: 100%; }
  .toolbar .field .select { width: 100%; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; }
  table.data.table--mobile thead { display: none; }
  table.data.table--mobile,
  table.data.table--mobile tbody { display: block; width: 100%; }
  table.data.table--mobile tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px;
    padding: 12px 44px 12px 14px; border-bottom: 1px solid var(--line); position: relative;
    overflow: hidden;
  }
  table.data.table--mobile tbody tr:last-child { border-bottom: 0; }
  table.data.table--mobile td { display: block; padding: 0; border: 0; }
  table.data.table--mobile td:nth-child(1) { grid-column: 1 / -1; padding: 0; }
  table.data.table--mobile td:nth-child(2) { grid-column: 1; }
  table.data.table--mobile td:nth-child(3) { grid-column: 2; justify-self: end; }
  table.data.table--mobile td:nth-child(4) { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  table.data.table--mobile td:nth-child(5) { grid-column: 2; text-align: right; }
  table.data.table--mobile td:nth-child(6) { display: none; }
  table.data.table--mobile td.cell-actions { position: absolute; top: 8px; right: 6px; width: 34px; }
  table.data.table--mobile .t-title { min-width: 0; }
  table.data.table--mobile .t-title a { white-space: normal; }
  table.data.table--mobile .cell-person { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  table.data.table--mobile .t-title small { max-width: 100%; white-space: normal; }
  table.data.table--people thead { display: none; }
  table.data.table--people, table.data.table--people tbody { display: block; width: 100%; }
  table.data.table--people tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px;
    padding: 12px 44px 12px 14px; border-bottom: 1px solid var(--line); position: relative;
  }
  table.data.table--people tbody tr:last-child { border-bottom: 0; }
  table.data.table--people td { display: block; padding: 0; border: 0; font-size: 12px; min-width: 0; }
  table.data.table--people td:nth-child(1) { grid-column: 1 / -1; margin-bottom: 2px; }
  table.data.table--people td:nth-child(2) { grid-column: 1; justify-self: start; }
  table.data.table--people td:nth-child(3) { grid-column: 2; justify-self: end; }
  table.data.table--people td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); }
  table.data.table--people td:nth-child(4)::before { content: "Troca de senha: "; }
  table.data.table--people td:nth-child(5) { display: none; }
  table.data.table--people td:nth-child(6) { grid-column: 1; color: var(--muted); font-size: 12px; }
  table.data.table--people td:nth-child(6)::before { content: "Último acesso: "; }
  table.data.table--people td:nth-child(7) { grid-column: 2; justify-self: end; font-size: 12px; }
  table.data.table--people td:nth-child(7)::before { content: "Carga: "; color: var(--muted); }
  table.data.table--people td.cell-actions { position: absolute; top: 8px; right: 6px; width: 32px; min-width: 0; }
  table.data.table--people .person-cell { white-space: normal; }
  table.data.table--people .person-cell__text span { max-width: 100%; }
  table.data.table--people .menu-pop { right: 0; top: 34px; }
  .snap-header__tag, .snap-header__meta { display: none; }
  .snap-header { padding: 0 16px; }
  .snap-header .brand__text strong { white-space: nowrap; }
}
.person-cell__text { min-width: 0; }
.person-cell__text span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-table--tarefas { min-width: 1040px; }
.report-table--tarefas th:first-child, .report-table--tarefas td:first-child { min-width: 238px; }
.report-table--tarefas th:nth-child(4), .report-table--tarefas td:nth-child(4),
.report-table--tarefas th:nth-child(6), .report-table--tarefas td:nth-child(6) { min-width: 126px; }
.report-table--pessoas { min-width: 940px; }
.report-table--pessoas th:first-child, .report-table--pessoas td:first-child { min-width: 164px; }
.report-table--pessoas th:nth-child(2), .report-table--pessoas td:nth-child(2) { min-width: 224px; }
.report-table--atividades { min-width: 960px; }
.report-table--atividades th:nth-child(2), .report-table--atividades td:nth-child(2),
.report-table--atividades th:nth-child(7), .report-table--atividades td:nth-child(7) { min-width: 150px; }
.skeleton { display: grid; gap: 7px; }
.skeleton span { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #dfeaf6, #f4f9ff, #dfeaf6); background-size: 200% 100%; animation: skeleton 1.4s ease-in-out infinite; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton span { animation: none; } }

/* Bloco de credenciais do ambiente Dev (renderizado pelo servidor) */
#dev-credenciais {
  max-width: 400px !important;
  margin: 18px auto 0 !important;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
#dev-credenciais .eyebrow { margin-bottom: 2px; }
#dev-credenciais ul { margin: 0 0 10px; }
#dev-credenciais .btn { margin-top: 2px; }

/* Credenciais iniciais nunca aparecem na tela pública de login (entregues fora do sistema) */
#dev-credenciais { display: none !important; }

/* Acessibilidade: alvos de toque e tipografia mínima legível */
button, .btn, summary { min-height: 32px; }
.icon-btn { min-width: 32px; min-height: 32px; }
.eyebrow, .brand__text small, .user-menu__id small, .user-menu__meta span, .stat__label,
.stat__hint, .hint, .error-text, .badge, .kpi-note, .chart-legend span, .bar-row,
.mini-bar__value, .mini-bar__label, .donut__center small, table.data thead th,
.table-foot, .pagination button, .timeline__head time, .value-chip, .readonly-note,
.form-section__sub, .char-count, .auto-item, .person-cell__text span, .auth-brand__foot,
.auth-card__meta, .auth-card__foot, .demo-note, .requirements, .dev-access summary,
.dev-access__sub, .dev-access__id strong, .dev-access__id small, .dev-access__pass,
.dev-access__all, .group-row td, .totals span, .report-meta, .pill-note, .t-title small,
.tab .count, .section-title p, .group-head, .empty-chart, .credential-box .row { font-size: 12px; }
.help-contact summary::before, .dev-access summary::before { font-size: 12px; }
.avatar, .avatar--xs { font-size: 12px; }
.app-footer { font-size: 12px; }
.panel__head p, .panel__foot, .report-head p, .empty-state p { font-size: 12px; }
.mono { font-size: max(12px, .92em); }
