/* Painel de inscrições — Augustus Consultoria
   Tokens copiados de src/styles/base.css (não importar o CSS do site). */

:root {
  --c-black: #050505;
  --c-graphite: #17191C;
  --c-charcoal: #25282D;
  --c-gold: #C8A45B;
  --c-gold-light: #E5C77F;
  --c-gold-ink: #7A5A1E;   /* dourado legível sobre fundo claro (AA) */
  --c-offwhite: #F3F0E8;
  --c-text-gray: #B4B4B4;

  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --line: #E4DED2;
  --line-strong: #CFC7B7;
  --text: var(--c-charcoal);
  --muted: #5B5F66;
  --danger: #A3261B;
  --danger-bg: #FBEAE8;
  --focus: #2F6FB8;

  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, 'SFMono-Regular', Menlo, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(23, 25, 28, .05), 0 4px 16px rgba(23, 25, 28, .04);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 252px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
fieldset { border: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.page__title:focus, .card__title:focus, .auth__title:focus, #view:focus { outline: none; }

.sr-only {
  position: absolute !important; 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: -60px; z-index: 100;
  background: var(--c-gold); color: var(--c-black); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }
.noscript, .boot { padding: 48px 24px; text-align: center; color: var(--muted); }

.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.mono { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.code { font-family: var(--font-mono); font-size: .78rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.link { color: var(--c-gold-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { color: var(--c-black); }
.stack { display: grid; gap: 16px; }
.warn-text { color: var(--danger); font-weight: 600; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-weight: 600; font-size: .875rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--primary { background: var(--c-gold); color: var(--c-black); }
.btn--primary:hover:not(:disabled) { background: var(--c-gold-light); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover:not(:disabled) { border-color: var(--c-charcoal); background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover:not(:disabled) { background: #861d14; }
.btn--danger-ghost { background: var(--surface); color: var(--danger); border-color: #E3B5AF; }
.btn--danger-ghost:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); }
.btn--whats { background: #17784A; color: #fff; }
.btn--whats:hover { background: #105F3A; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: .8125rem; }
.btn--sm .ico { width: 16px; height: 16px; }
.btn--block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  color: inherit; transition: background-color .18s var(--ease);
}
.btn-icon:hover { background: rgba(0, 0, 0, .06); }
.btn-icon .ico { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- formulário */
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label { font-weight: 600; font-size: .8125rem; color: var(--c-charcoal); }
.field--end { align-content: end; }
.hint { font-size: .78rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #5B5F66 50%), linear-gradient(135deg, #5B5F66 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input:hover, select:hover, textarea:hover { border-color: #A9A08E; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 111, 184, .28); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.select--sm { min-height: 36px; padding-top: 6px; padding-bottom: 6px; width: auto; min-width: 170px; }
.form-error {
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-bg); color: #7A1C13;
  border-left: 3px solid var(--danger); font-size: .875rem;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: .875rem;
  background: #EEF4EC; color: #1D4A25; border-left: 3px solid #3C8A4A;
}
.notice[data-tone="warn"] { background: #FFF6E0; color: #6B4A00; border-left-color: #C98E00; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.test-out { font-size: .875rem; padding: 10px 14px; border-radius: var(--radius-sm); background: #EEF4EC; color: #1D4A25; }
.test-out[data-tone="warn"] { background: #FFF6E0; color: #6B4A00; }

.switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.switch__track {
  flex: none; width: 46px; height: 26px; border-radius: 13px; background: #C9C3B6; position: relative;
  transition: background-color .2s var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease);
}
.switch input:checked + .switch__track { background: #2F8A4E; }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- selos */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: #ECEDEF; color: #3D4047;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
[data-tone="blue"].badge { background: #E7EEF8; color: #1F4471; }
[data-tone="amber"].badge { background: #FFF1D1; color: #6E4B00; }
[data-tone="teal"].badge { background: #DDF1ED; color: #0D5548; }
[data-tone="violet"].badge { background: #ECE7FA; color: #4A2E8C; }
[data-tone="green"].badge { background: #E0F2E3; color: #1C5626; }
[data-tone="red"].badge { background: #FBE5E2; color: #8A1F17; }
[data-tone="gold"].badge { background: #F4EAD5; color: #614612; }
[data-tone="gray"].badge { background: #ECEDEF; color: #474A51; }
.tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--c-graphite); color: var(--c-offwhite); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; background: #ECEDEF; color: #474A51; white-space: nowrap;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill[data-tone="green"] { background: #E0F2E3; color: #1C5626; }
.pill[data-tone="green"] .pill__dot { box-shadow: 0 0 0 3px rgba(47, 138, 78, .2); }
.pill[data-tone="amber"] { background: #FFF1D1; color: #6E4B00; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .8125rem; }

/* ---------------------------------------------------------------- login e telas públicas */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.auth__brand {
  background: radial-gradient(120% 80% at 10% 0%, rgba(200, 164, 91, .18), transparent 60%), linear-gradient(160deg, #0B0C0D, var(--c-black) 60%);
  color: var(--c-offwhite); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 20px;
  border-right: 1px solid rgba(200, 164, 91, .25);
}
.auth__brand img { width: min(300px, 80%); }
.auth__tagline { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.3; color: var(--c-gold-light); max-width: 22ch; }
.auth__legal { font-size: .8125rem; color: var(--c-text-gray); max-width: 36ch; }
.auth__panel { display: grid; place-items: center; padding: 48px 24px; }
.auth__card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 36px 32px; box-shadow: var(--shadow); display: grid; gap: 18px; animation: rise .4s var(--ease) both;
}
.auth__title { font-family: var(--font-serif); font-size: 1.625rem; font-weight: 400; color: var(--c-black); line-height: 1.25; }
.auth__sub { color: var(--muted); font-size: .9rem; margin-top: -8px; }
.auth__alt { font-size: .875rem; text-align: center; }
.auth__alt a { color: var(--c-gold-ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- layout autenticado */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: linear-gradient(180deg, #0B0C0D 0%, var(--c-black) 55%, #0E0F11 100%);
  color: var(--c-text-gray); display: flex; flex-direction: column; padding: 24px 14px 18px;
  border-right: 1px solid rgba(200, 164, 91, .18); overflow-y: auto;
  --focus: var(--c-gold-light);
}
.sidebar__brand { display: grid; gap: 10px; padding: 4px 10px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; }
.sidebar__brand img { width: 150px; }
.sidebar__product { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-gold); font-weight: 600; }
.nav ul { display: grid; gap: 2px; }
.nav__group { padding: 18px 12px 6px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: #8C8F94; }
.nav__link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  color: #C9CACC; text-decoration: none; font-weight: 500; position: relative;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__link[aria-current="page"] { background: rgba(200, 164, 91, .14); color: var(--c-gold-light); }
.nav__link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-gold); }
.sidebar__foot { margin-top: auto; padding: 18px 10px 0; font-size: .72rem; line-height: 1.5; color: #8C8F94; border-top: 1px solid rgba(255, 255, 255, .08); }
.backdrop, .sidebar__close { display: none; }
.sidebar__close { position: absolute; top: 14px; right: 10px; color: var(--c-offwhite); }
.sidebar__close:hover { background: rgba(255, 255, 255, .08); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 32px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__menu { display: none; }
.topbar__brand { display: none; font-family: var(--font-serif); color: var(--c-black); }
.topbar__spacer { flex: 1; }
.usermenu { position: relative; }
.usermenu__btn {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 999px;
  cursor: pointer; transition: background-color .18s var(--ease);
}
.usermenu__btn::-webkit-details-marker { display: none; }
.usermenu__btn:hover, .usermenu[open] .usermenu__btn { background: var(--surface-2); }
.usermenu__btn > .ico { width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--ease); }
.usermenu[open] .usermenu__btn > .ico { transform: rotate(180deg); }
.usermenu__id { display: grid; line-height: 1.2; text-align: left; }
.usermenu__id strong { font-size: .875rem; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__id small { font-size: .72rem; color: var(--muted); }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(5, 5, 5, .14);
  padding: 8px; display: grid; gap: 2px; animation: rise .18s var(--ease) both;
}
.usermenu__email { padding: 8px 10px 10px; font-size: .8125rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.usermenu__item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; text-align: left; font-weight: 500; }
.usermenu__item:hover { background: var(--surface-2); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--c-graphite); color: var(--c-gold-light); font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; font-family: var(--font-serif); font-weight: 400; }

.view { flex: 1; padding: 32px 32px 56px; width: 100%; max-width: 1360px; }
.page { display: grid; gap: 20px; animation: rise .32s var(--ease) both; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page__title { font-family: var(--font-serif); font-weight: 400; font-size: 1.875rem; line-height: 1.2; color: var(--c-black); }
.page__sub { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.page__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page__body { display: grid; gap: 20px; min-width: 0; container-type: inline-size; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; width: max-content; }
.backlink:hover { color: var(--c-black); }

/* ---------------------------------------------------------------- cartões */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); display: grid; gap: 14px; min-width: 0; align-content: start;
}
.card--flush { padding: 0; overflow: hidden; }
.card--accent { border-left: 3px solid var(--c-gold); }
.card__title {
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-charcoal);
  display: flex; align-items: center; gap: 10px;
}
.card__more { justify-self: start; }
.count { font-size: .75rem; font-weight: 700; letter-spacing: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
fieldset { display: grid; gap: 16px; }
legend.card__title { padding: 0; margin-bottom: 16px; }
.field--medium { max-width: 480px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 16px; }
.empty__mark { width: 44px; height: 44px; border-radius: 50%; border: 1px dashed var(--c-gold); position: relative; margin-bottom: 6px; }
.empty__mark::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: rgba(200, 164, 91, .35); }
.empty__title { font-family: var(--font-serif); font-size: 1.125rem; color: var(--c-black); }
.empty__text { color: var(--muted); font-size: .875rem; max-width: 46ch; }
.empty .btn { margin-top: 10px; }
.empty--error .empty__title { color: var(--danger); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--c-gold); animation: spin .8s linear infinite; }

/* ---------------------------------------------------------------- dashboard */
.statusbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.callout {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(90deg, #FBF6EA, #FFFDF8); border: 1px solid #E8D9B5; border-left: 3px solid var(--c-gold);
}
.callout > .ico { color: var(--c-gold-ink); margin-top: 2px; }
.callout__title { font-weight: 700; color: #4D3A12; font-size: .875rem; }
.callout__text { color: #4D4536; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout__foot { margin-top: 6px; color: #6B5B34; font-size: .78rem; }
.event__name { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.3; color: var(--c-black); overflow-wrap: anywhere; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis > .kpi:nth-child(6):last-child { grid-column: span 2; } /* sem "lugares restantes": a última ocupa o resto da linha */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.kpi, .kpi__link { display: grid; gap: 6px; padding: 16px 18px; align-content: space-between; }
.kpi:has(.kpi__link) { padding: 0; align-content: stretch; }
.kpi__link { text-decoration: none; height: 100%; border-radius: inherit; transition: background-color .18s var(--ease); }
.kpi__link:hover { background: var(--surface-2); }
.kpi__label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.kpi__value { font-family: var(--font-serif); font-size: 2rem; line-height: 1.1; color: var(--c-black); font-variant-numeric: tabular-nums; }
.kpi--hero { grid-column: span 2; background: linear-gradient(135deg, var(--c-graphite), var(--c-black)); border-color: #2C2F34; }
.kpi--hero .kpi__label { color: var(--c-text-gray); }
.kpi--hero .kpi__value { color: var(--c-gold-light); font-size: 3rem; }
.kpi__sub { font-size: .75rem; color: var(--muted); }
.kpi--hero .kpi__link:hover { background: rgba(255, 255, 255, .04); }
.kpi--hero { --focus: var(--c-gold-light); }

.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 2fr) auto; align-items: center; gap: 12px; font-size: .875rem; }
.hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.hbar__fill { display: block; height: 100%; width: calc(var(--v) * 100%); background: linear-gradient(90deg, #A9873F, var(--c-gold)); border-radius: inherit; transform-origin: left; animation: grow-x .7s var(--ease) both; }
.hbar__value { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

.cols { display: grid; gap: 8px; }
.cols__plot { position: relative; height: 170px; display: flex; align-items: flex-end; gap: 3px; padding-top: 18px; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to top, transparent 0 37px, var(--line) 37px 38px); }
.cols__max { position: absolute; top: 0; left: 0; font-size: .72rem; color: var(--muted); }
.cols__bar { flex: 1; min-width: 0; height: calc(var(--v) * 100%); min-height: 2px; background: linear-gradient(180deg, var(--c-gold), #A9873F); border-radius: 3px 3px 0 0; transform-origin: bottom; animation: grow-y .6s var(--ease) both; }
.cols__bar.is-zero { background: var(--line-strong); opacity: .6; }
.cols__bar:hover { filter: brightness(1.12); }
.cols__axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

/* ---------------------------------------------------------------- filtros e tabela */
.filters { gap: 14px; }
.search { position: relative; }
.search > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__input { padding-left: 42px !important; min-height: 46px !important; font-size: 1rem; }
.filters__summary { cursor: pointer; font-weight: 600; font-size: .875rem; color: var(--c-charcoal); width: max-content; padding: 4px 0; }
.filters__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.filters--inline { grid-template-columns: repeat(auto-fill, minmax(170px, 220px)); display: grid; align-items: end; }
.results { display: grid; gap: 16px; min-width: 0; }
.results[aria-busy="true"] .table-wrap { opacity: .55; transition: opacity .2s; }
.results__count { font-size: .875rem; color: var(--muted); font-weight: 600; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card--flush .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
.table { font-size: .8125rem; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table th {
  text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  font-weight: 700; padding: 12px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cell-proto { white-space: nowrap; font-size: .75rem; }
.cell-date { white-space: nowrap; }
.cell-date > span { display: block; }
.cell-time { color: var(--muted); font-size: .75rem; }
.table .cell-actions__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table .cell-actions .btn { padding: 0 10px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s var(--ease); }
.table tbody tr:hover { background: #FCFBF8; }
.cell-name a { font-weight: 700; color: var(--c-black); text-decoration: none; }
.cell-name a:hover { text-decoration: underline; }
.cell-name { font-weight: 600; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .btn + .btn { margin-left: 6px; }
.cell-meta { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; max-width: 360px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pager__info { font-size: .875rem; color: var(--muted); }

/* ---------------------------------------------------------------- ficha */
.profile { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; }
.profile__id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.profile__name { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; line-height: 1.2; color: var(--c-black); overflow-wrap: anywhere; }
.profile__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: .8125rem; margin-top: 4px; }
.profile__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.detail__main, .detail__side { display: grid; gap: 20px; min-width: 0; }
.detail__grid { display: grid; gap: 20px; }
.bio { background: linear-gradient(135deg, #FFFDF8, #FBF6EA); border-color: #E8D9B5; border-left: 3px solid var(--c-gold); }
.bio__text { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.65; color: #2A2620; white-space: pre-wrap; overflow-wrap: anywhere; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 24px; }
.dl__row { display: grid; gap: 3px; align-content: start; min-width: 0; }
.dl__row--wide { grid-column: 1 / -1; }
.dl dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dl dd { overflow-wrap: anywhere; }
.status-now { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }
.notes { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.note__meta { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.note__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.timeline { display: grid; gap: 0; position: relative; }
.timeline__item { position: relative; padding: 0 0 16px 22px; display: grid; gap: 4px; }
.timeline__item::before { content: ""; position: absolute; left: 4px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-gold); box-shadow: 0 0 0 3px #F4EAD5; }
.timeline__item::after { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline__item:last-child::after { display: none; }
.timeline__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.timeline__arrow { color: var(--muted); }
.timeline__meta { font-size: .75rem; color: var(--muted); }
.timeline__note { font-size: .8125rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }

/* ---------------------------------------------------------------- vagas */
.vac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.vac { display: flex; flex-direction: column; }
.vac .linkbox { grid-template-columns: minmax(0, 1fr); }
.vac__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vac__title { font-family: var(--font-serif); font-weight: 400; font-size: 1.25rem; line-height: 1.3; color: var(--c-black); overflow-wrap: anywhere; }
.vac__meta { font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.vac__desc { font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.vac__count { justify-self: start; text-decoration: none; font-size: .875rem; color: var(--c-gold-ink); font-weight: 600; }
.vac__count strong { font-size: 1.25rem; font-family: var(--font-serif); color: var(--c-black); margin-right: 2px; }
.vac__count:hover { text-decoration: underline; }
.vac__actions { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.linkbox__input { font-family: var(--font-mono); font-size: .78rem !important; background: var(--surface-2) !important; color: var(--c-charcoal); }
.linkbox__btns { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- configurações */
.indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.indicator { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-size: .875rem; }
.settings > .card { gap: 16px; }
.sticky-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; padding: 14px 0;
  background: linear-gradient(180deg, rgba(245, 243, 238, 0), var(--bg) 40%);
}

/* ---------------------------------------------------------------- diálogo e avisos */
.dlg {
  border: 0; padding: 0; border-radius: 14px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(5, 5, 5, .3);
  margin: auto; overflow: auto;
}
.dlg--wide { width: min(760px, calc(100vw - 32px)); }
.dlg[open] { animation: pop .22s var(--ease) both; }
.dlg::backdrop { background: rgba(5, 5, 5, .55); backdrop-filter: blur(2px); }
.dlg__inner { display: grid; }
.dlg__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px 24px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.dlg__head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; color: var(--c-black); }
.dlg__body { padding: 20px 24px 24px; }
.dlg__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius);
  background: var(--c-graphite); color: var(--c-offwhite); box-shadow: 0 12px 32px rgba(5, 5, 5, .25);
  border-left: 3px solid var(--c-gold); font-size: .875rem; pointer-events: auto; animation: toast-in .28s var(--ease) both;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast > .ico { color: var(--c-gold-light); margin-top: 1px; }
.toast[data-tone="error"] { border-left-color: #E2685C; }
.toast[data-tone="error"] > .ico { color: #F0A097; }
.toast[data-tone="warn"] { border-left-color: #E5B13A; }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------------------------------------------------------------- animações */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* Tabelas viram lista de cartões quando falta largura (consulta pelo container, não pela tela). */
@container (max-width: 999px) {
  .table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table-wrap:has(.table--cards) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .card--flush:has(.table--cards) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .table--cards tbody { display: grid; gap: 12px; }
  .table--cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
  .table--cards tbody tr:hover { background: var(--surface); }
  .table--cards td, .table--cards td:first-child, .table--cards td:last-child { padding: 0; border: 0 !important; min-width: 0; overflow-wrap: anywhere; }
  .table--cards td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-sans); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 1px; }
  .table--cards td.cell-name { grid-column: 1 / -1; font-size: 1rem; order: -2; }
  .table--cards td.cell-name::before { display: none; }
  .table--cards td.cell-actions { grid-column: 1 / -1; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line) !important; }
  .table--cards td.cell-actions .btn { margin: 0; flex: 1; }
  .table--cards .cell-actions__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .table--cards td.cell-meta { grid-column: 1 / -1; max-width: none; }
  .table--cards .nowrap, .table--cards .cell-proto, .table--cards .cell-date { white-space: normal; }
  .table--cards .cell-date > span { display: inline; }
  .table--audit td:first-child { grid-column: 1 / -1; }
  .table--cards .select--sm { width: 100%; min-width: 0; }
}

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1180px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail__side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
}
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%); visibility: hidden; box-shadow: none;
    transition: transform .26s var(--ease), visibility 0s linear .26s;
  }
  .nav-open .sidebar { transform: none; visibility: visible; box-shadow: 16px 0 48px rgba(0, 0, 0, .35); transition: transform .26s var(--ease); }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5, 5, 5, .5); opacity: 0; pointer-events: none; transition: opacity .26s var(--ease); }
  .nav-open .backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px 0 8px; }
  .topbar__menu, .sidebar__close { display: inline-grid; }
  .topbar__brand { display: block; }
  .view { padding: 24px 24px 48px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__brand { padding: 28px 24px; gap: 10px; border-right: 0; border-bottom: 1px solid rgba(200, 164, 91, .25); }
  .auth__brand img { width: 170px; }
  .auth__tagline { font-size: 1.1rem; }
  .auth__legal { display: none; }
  .auth__panel { padding: 24px 16px 40px; place-items: start center; }
  .auth__card { padding: 26px 20px; }

  .view { padding: 20px 16px 40px; }
  .page__title { font-size: 1.5rem; }
  .page__actions { width: 100%; }
  .page__actions .btn { flex: 1; }
  .card { padding: 18px 16px; }
  .usermenu__id { display: none; }
  .topbar__logout span { display: none; }
  .topbar__logout { padding: 0 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi--hero { grid-column: 1 / -1; }
  .kpi__value { font-size: 1.6rem; }
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile__actions { justify-content: stretch; }
  .profile__actions .btn { flex: 1 1 100%; }
  .detail__side { grid-template-columns: minmax(0, 1fr); }
  .vac-grid { grid-template-columns: minmax(0, 1fr); }
  .linkbox { grid-template-columns: minmax(0, 1fr); }
  .linkbox__btns .btn { flex: 1; }
  .hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar__track { grid-column: 1 / -1; grid-row: 2; }
  .filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .toasts { right: 16px; left: 16px; width: auto; bottom: 16px; }
  .dlg__body { padding: 18px 16px 20px; }
  .dlg__head { padding: 14px 12px 12px 16px; }
}
@media (max-width: 420px) {
  .filters__grid, .filters--inline { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
