:root {
  --bg0: #e8eef6;
  --bg1: #f5f8fc;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --muted: #5a6b82;
  --line: #d7e0ec;
  --line-soft: #eef3f9;
  --brand: #1a4f9c;
  --brand-soft: #e7f0fb;
  --brand-deep: #123a74;
  --ok: #0a7a4d;
  --ok-bg: #e7f7ef;
  --miss: #b42318;
  --miss-bg: #fef3f2;
  --score-0: #2fbf71;
  --score-1: #3aa0c0;
  --score-2: #4a86d4;
  --score-3: #d4a24a;
  --score-4: #e07a72;
  --font: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 12px 32px rgba(15, 27, 45, 0.06);
  --wrap: min(1360px, calc(100% - 2rem));
  --pad: 1rem;
}

@supports (padding: max(0px)) {
  :root {
    --wrap: min(1360px, calc(100% - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right) + 1.5rem)));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(26, 79, 156, 0.14), transparent 55%),
    radial-gradient(700px 360px at 92% 0%, rgba(10, 122, 77, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
  line-height: 1.45;
  overflow-x: hidden;
  max-width: 100%;
}

.wrap {
  width: var(--wrap);
  max-width: 100%;
  margin-inline: auto;
  min-width: 0;
}

.app-header {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(215, 224, 236, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 100%;
  animation: header-in 0.45s ease both;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: 0.7rem 0;
}

.header-company {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  padding: 0 0.75rem;
}

.header-company strong {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 28rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 18px rgba(26, 79, 156, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-text strong {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
}

.header-logo {
  height: 3rem;
  width: auto;
  padding-right: 0.85rem;
  border-right: 1px solid var(--line);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-soft);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f79009;
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.18);
  animation: pulse-dot 1.6s ease infinite;
}

.status.is-on .status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(10, 122, 77, 0.16);
  animation: none;
}

.status.is-off .status-dot {
  background: var(--miss);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
  animation: none;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: #f7f9fc;
  border-color: #c8d3e3;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px rgba(26, 79, 156, 0.22);
}

.btn-primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: #eef3f9;
  color: var(--ink);
  border-color: transparent;
}

main.wrap {
  padding: 1.5rem 0 2.4rem;
  display: grid;
  gap: 1.25rem;
  max-width: 100%;
  min-width: 0;
}

.summary {
  display: grid;
  gap: 1.15rem;
  background:
    linear-gradient(135deg, rgba(26, 79, 156, 0.06), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.3rem;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.summary-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.summary-main h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.summary-main p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42rem;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.75rem;
}

.kpis article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.kpis article:nth-child(1) { animation-delay: 0.05s; }
.kpis article:nth-child(2) { animation-delay: 0.1s; }
.kpis article:nth-child(3) { animation-delay: 0.15s; }
.kpis article:nth-child(4) { animation-delay: 0.2s; }
.kpis article:nth-child(5) { animation-delay: 0.25s; }
.kpis article:nth-child(6) { animation-delay: 0.3s; }
.kpis article:nth-child(7) { animation-delay: 0.35s; }
.kpis article:nth-child(8) { animation-delay: 0.4s; }

.kpis article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #c5d3e6;
}

.kpis article:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 27, 45, 0.06);
}

.kpis .ok {
  background: linear-gradient(180deg, #fbfffd, var(--ok-bg));
  border-color: #c4ebd5;
}

.kpis .ok::before {
  background: var(--ok);
}

.kpis .geral {
  background: linear-gradient(180deg, #f3faf7, #e6f4ee);
  border-color: #b7dccb;
}

.kpis .geral::before {
  background: #0f766e;
}

.kpis .geral strong {
  color: #0f766e;
}

.kpis .ia {
  background: linear-gradient(180deg, #f7fbff, #eaf2fb);
  border-color: #c5d8ef;
}

.kpis .ia::before {
  background: var(--brand);
}

.kpis .ia strong {
  color: var(--brand);
}

.kpis .ia-base {
  background: linear-gradient(180deg, #f5f3ff, #ece8ff);
  border-color: #d4cbfa;
}

.kpis .ia-base::before {
  background: #7c6cf0;
}

.kpis .ia-base strong {
  color: #5b4bb7;
}

.kpis .both {
  background: linear-gradient(180deg, #f6fffb, #e7f6ef);
  border-color: #b9e0cc;
}

.kpis .both::before {
  background: #1a8f6a;
}

.kpis .both strong {
  color: #1a8f6a;
}

.kpis [data-tab] {
  cursor: pointer;
}

.kpis [data-tab].is-active {
  box-shadow: 0 0 0 2px rgba(74, 134, 212, 0.35);
}

.kpis .miss {
  background: linear-gradient(180deg, #fffbfa, var(--miss-bg));
  border-color: #f7cdc8;
}

.kpis .miss::before {
  background: var(--miss);
}

.kpis .taxa::before {
  background: var(--brand);
}

.kpi-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.25;
  min-height: 2.1em;
}

.kpis strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.kpis .ok strong {
  color: var(--ok);
}

.kpis .miss strong {
  color: var(--miss);
}

.bar-track {
  margin-top: 0.65rem;
  height: 7px;
  border-radius: 999px;
  background: #e6ebf2;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-deep), #4a86d4);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.3rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.panel-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--ok);
  border-color: #b7dfca;
  background: #f4fcf7;
  white-space: nowrap;
}

.btn-export:hover {
  color: #075f3c;
  border-color: #8dccaa;
  background: var(--ok-bg);
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef2f7;
}

.tabs--wide .tab {
  font-size: 0.72rem;
  padding: 0.42rem 0.62rem;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(15, 27, 45, 0.1);
}

[hidden] {
  display: none !important;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.3rem 1.1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line-soft);
  align-items: end;
}

.scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.3rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  align-items: end;
  margin-bottom: 0.85rem;
}

.scope-bar #clienteField {
  flex: 0 1 11rem;
  width: 11rem;
  max-width: min(100%, 13rem);
}

.scope-bar #arquivoField {
  flex: 0 1 20rem;
  width: 20rem;
  max-width: min(100%, 24rem);
}

.scope-bar select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters .search-field {
  flex: 1 1 18rem;
  min-width: min(100%, 16rem);
}

.filters .field:not(.search-field):not(.field-action) {
  flex: 0 1 7.5rem;
}

.filters #detalheField {
  flex: 1 1 12rem;
  min-width: min(100%, 10rem);
}

.filters #scoreField {
  flex: 0 1 12rem;
  min-width: 11rem;
}

.filters .field-action {
  flex: 0 0 auto;
}

.filters.is-pendentes .field:not(.search-field):not(.field-action) {
  flex: 0 1 6.5rem;
}

.search-combo {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-combo:focus-within {
  border-color: #8eb0df;
  box-shadow: 0 0 0 3px rgba(26, 79, 156, 0.12);
}

.search-combo select,
.search-combo input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: 2.6rem;
}

.search-combo select {
  border-right: 1px solid var(--line) !important;
  background: var(--brand-soft);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-deep);
  padding-inline: 0.7rem;
}

.search-combo input {
  padding-inline: 0.8rem;
}

.score-filter {
  display: grid;
  grid-template-columns: 1fr 4.2rem;
  gap: 0.35rem;
  min-width: 0;
}

.score-filter input:disabled {
  opacity: 0.45;
  background: #f3f5f8;
}

.field-action .btn {
  white-space: nowrap;
  height: 2.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

.field span,
.field > label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.58rem 0.72rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:hover,
.field select:hover {
  border-color: #c5d1e2;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 79, 156, 0.14);
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(64vh, 680px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
}

.results {
  min-width: 0;
  max-width: 100%;
}

.cards {
  display: none;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  background: #f7f9fc;
  max-height: min(70vh, 720px);
  overflow: auto;
}

.school-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.school-card:hover,
.school-card:focus-visible {
  border-color: #9eb6de;
  box-shadow: 0 8px 20px rgba(15, 27, 45, 0.08);
  outline: none;
}

.school-card:active {
  transform: scale(0.995);
}

.school-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.school-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.school-card-meta strong {
  color: var(--ink);
  font-weight: 650;
  font-family: var(--mono);
}

.school-card-line {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-card-line.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #3a4a61;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #b4c0d2;
  border-radius: 999px;
  border: 2px solid #fff;
}

.table-wrap::-webkit-scrollbar-track {
  background: #f3f6fa;
}

table {
  width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  table-layout: fixed;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf2f8;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #3a4f68;
  padding: 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  line-height: 1.2;
  vertical-align: middle;
  box-shadow: inset 0 -1px 0 var(--line);
}

th.th-sort {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

th.th-sort .th-inner {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  box-sizing: border-box;
}

th.th-sort:hover,
th.th-sort:focus-visible {
  color: var(--brand);
  background: #e4eef9;
  outline: none;
}

th.th-sort .th-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

th.th-sort .th-arrow {
  flex: 0 0 auto;
  font-size: 0.7rem;
  opacity: 0.45;
  line-height: 1;
}

th.th-sort.is-sorted {
  color: var(--brand);
  background: #e0ecf9;
}

th.th-sort.is-sorted .th-arrow {
  opacity: 1;
}

tbody td {
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #243247;
  height: 42px;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:nth-child(even) td {
  background: #fafcfe;
}

tbody tr:hover td {
  background: #eef4fb;
}

tbody td strong {
  font-weight: 650;
  color: var(--ink);
}

tbody td.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: -0.01em;
  color: #3a4a61;
}

th.align-right .th-inner,
td.align-right {
  justify-content: flex-end;
  text-align: right;
}

th.align-center .th-inner,
td.align-center {
  justify-content: center;
  text-align: center;
}

th.col-id,
td.col-id,
th.col-xs,
td.col-xs,
th.col-sm,
td.col-sm,
th.col-md,
td.col-md,
th.col-lg,
td.col-lg,
th.col-xl,
td.col-xl,
th.col-cnpj,
td.col-cnpj,
th.col-inep,
td.col-inep {
  box-sizing: border-box;
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 650;
  font-family: var(--mono);
}

.tag-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.tag-miss {
  background: var(--miss-bg);
  color: var(--miss);
  font-family: var(--font);
}

.tag-wait {
  background: #eef2f7;
  color: var(--muted);
}

.tag-review {
  background: var(--brand-soft);
  color: var(--brand);
}

.muted {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.3rem 1.05rem;
  border-top: 1px solid var(--line-soft);
  background: #f8fafc;
  flex-wrap: wrap;
}

.pager p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.pager-btns {
  display: flex;
  gap: 0.45rem;
}

.foot {
  padding: 0 0 1.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.foot p {
  margin: 0;
}

.foot code {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
}

.empty {
  padding: 2.8rem 1rem;
  text-align: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 0.6rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-cluster {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  width: min(1720px, 98%);
  height: min(90vh, 860px);
  max-height: min(96vh, 1100px);
}

.modal-dialog {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(10, 18, 32, 0.28);
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.3rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  flex: 0 0 auto;
}

.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compare-source {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef2f7;
}

.compare-source-btn {
  padding: 0.45rem 1rem;
  font-size: 0.86rem;
}

.modal-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef2f7;
}

.modal-nav-pos {
  min-width: 4.2rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.btn-nav {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: var(--brand-deep);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.08);
}

.btn-nav:hover:not(:disabled) {
  background: var(--brand-soft);
  color: var(--brand);
}

.btn-nav:disabled {
  opacity: 0.35;
}

.modal-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.modal-close {
  flex: 0 0 auto;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.7rem 1.3rem 0;
  flex: 0 0 auto;
}

.compare-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.compare-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.score-criteria {
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1.1rem 1.1rem 1.4rem;
  border-right: 1px solid var(--line);
}

.compare-aprovacao {
  flex: 0 0 228px;
  align-self: flex-start;
  height: fit-content;
  max-height: 100%;
  overflow: auto;
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(10, 18, 32, 0.28);
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Mantém a largura reservada para o modal não “pular” ao navegar */
.compare-aprovacao[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.aprovacao-hint {
  margin: -0.15rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.aprovacao-auditoria {
  margin: 0.55rem 0 0;
  padding: 0.72rem 0.78rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--ink);
}

.aprovacao-auditoria[hidden] {
  display: none !important;
}

.aprovacao-auditoria-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aprovacao-auditoria-status {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
}

.aprovacao-auditoria-status.is-ok { color: var(--ok); }
.aprovacao-auditoria-status.is-miss { color: var(--miss); }
.aprovacao-auditoria-status.is-review { color: var(--brand); }
.aprovacao-auditoria-status.is-wait { color: var(--muted); font-weight: 650; }

.aprovacao-auditoria-meta {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.aprovacao-auditoria-row {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.35rem;
  align-items: start;
  margin: 0;
}

.aprovacao-auditoria-row dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.aprovacao-auditoria-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.aprovacao-auditoria-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.btn-aprovacao {
  appearance: none;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.78rem 0.8rem;
  cursor: pointer;
}

.btn-aprovacao.is-ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: #b7e4cd;
}

.btn-aprovacao.is-miss {
  color: var(--miss);
  background: var(--miss-bg);
  border-color: #f0c4c0;
}

.btn-aprovacao.is-review {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #b7cceb;
}

.btn-aprovacao.is-active.is-ok,
.btn-aprovacao.is-ok:hover {
  color: #fff;
  background: var(--ok);
}

.btn-aprovacao.is-active.is-miss,
.btn-aprovacao.is-miss:hover {
  color: #fff;
  background: var(--miss);
}

.btn-aprovacao.is-active.is-review,
.btn-aprovacao.is-review:hover {
  color: #fff;
  background: var(--brand);
}

.btn-aprovacao:disabled {
  opacity: 0.55;
  cursor: wait;
}

.criteria-kicker {
  margin: 0 0 0.25rem;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.criteria-head {
  padding: 0.7rem 0.8rem;
  border: 1px solid #bfd6f4;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4f8fe, #eaf2fc);
}

.criteria-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.criteria-score strong {
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 1.7rem;
}

.criteria-score span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.criteria-path {
  margin: 0.4rem 0 0;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.35;
}

.criteria-list {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.criteria-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f8fafc;
}

.criteria-row > div {
  min-width: 0;
}

.criteria-row strong,
.criteria-row span {
  display: block;
}

.criteria-row strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.criteria-row span {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.criteria-math {
  flex: 0 0 auto;
  text-align: right;
}

.criteria-math strong {
  color: var(--brand);
  font-family: var(--mono);
}

.criteria-row.is-unused {
  opacity: 0.58;
}

.criteria-rules,
.criteria-empty {
  margin-top: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.4;
}

.criteria-rules > strong,
.criteria-empty h3 {
  color: var(--ink);
}

.criteria-ignored {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.criteria-ignored > div strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 0.78rem;
}

.criteria-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.criteria-word {
  display: inline-flex;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: #e8eef7;
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 650;
}

.criteria-none {
  color: var(--muted);
  font-size: 0.66rem;
}

.criteria-empty p:last-child {
  margin-bottom: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f5f8fc;
  font-size: 0.9rem;
  color: #334155;
}

.chip strong {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.chip.ok {
  background: var(--ok-bg);
  border-color: #b7ebcf;
  color: var(--ok);
}

.chip.miss {
  background: var(--miss-bg);
  border-color: #fecdca;
  color: var(--miss);
}

.modal-body {
  padding: 0.85rem 1.4rem 1.15rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.ia-fonte-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 650;
}

.ia-fonte-link:hover {
  text-decoration: underline;
}

.ia-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f7fafc;
}

.ia-extra-block .side-label {
  display: block;
  margin-bottom: 0.4rem;
}

.ia-fonte-list,
.ia-obs-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font-size: 0.84rem;
}

.ia-fonte-list a {
  color: var(--brand);
  font-weight: 650;
  word-break: break-all;
}

.ia-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.compare-row {
  display: grid;
  grid-template-columns: 8.6rem 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}

.compare-field {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.compare-sim {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand);
}

.compare-side {
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.compare-side .side-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare-side .side-value {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink);
  word-break: break-word;
  white-space: pre-wrap;
}

.compare-side.is-match {
  border-color: #b7ebcf;
  background: #f4fcf7;
}

.compare-side.is-diff {
  border-color: #f5c4bf;
  background: #fff8f7;
}

.compare-side.is-empty {
  color: var(--muted);
}

tbody tr.is-clickable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.school-card.is-clickable {
  -webkit-user-select: none;
  user-select: none;
}

tbody tr.is-clickable:focus-visible td {
  outline: 2px solid rgba(26, 79, 156, 0.35);
  outline-offset: -2px;
}

html.modal-open,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

body.modal-open .table-wrap {
  overflow: hidden !important;
}

@media (max-width: 1100px) {
  :root {
    --wrap: min(1360px, calc(100% - 1.5rem));
  }

  .filters .field:not(.search-field):not(.field-action) {
    flex: 1 1 calc(33.333% - 0.75rem);
    min-width: 7rem;
  }

  .filters #detalheField,
  .filters #scoreField {
    flex: 1 1 calc(50% - 0.75rem);
  }

  .scope-bar #clienteField {
    flex: 1 1 calc(50% - 0.75rem);
    width: auto;
    max-width: none;
  }

  .scope-bar #arquivoField {
    flex: 1 1 calc(50% - 0.75rem);
    width: auto;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 56px;
    padding: 0.55rem 0;
  }

  .brand-text strong {
    font-size: 1.02rem;
  }

  .brand-text span {
    font-size: 0.74rem;
  }

  .status {
    font-size: 0.76rem;
    padding: 0.28rem 0.55rem;
  }

  main.wrap {
    padding: 1rem 0 1.8rem;
    gap: 1rem;
  }

  .summary {
    padding: 1.05rem 1rem 1rem;
    border-radius: 14px;
  }

  .summary-main h1 {
    font-size: 1.35rem;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .kpis article {
    padding: 0.75rem 0.8rem;
  }

  .kpis strong {
    font-size: 1.2rem;
  }

  .panel {
    border-radius: 14px;
  }

  .panel-head {
    padding: 0.95rem 1rem 0.85rem;
    gap: 0.75rem;
  }

  .panel-head h2 {
    font-size: 1.05rem;
  }

  .tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .panel-actions {
    width: 100%;
  }

  .btn-export {
    width: 100%;
  }

  .tab {
    flex: 1 1 0;
    text-align: center;
    padding: 0.5rem 0.6rem;
  }

  .filters {
    padding: 0.85rem 1rem;
    gap: 0.65rem;
  }

  .scope-bar {
    padding: 0.85rem 1rem 0.65rem;
    gap: 0.65rem;
  }

  .filters .search-field,
  .scope-bar #clienteField,
  .scope-bar #arquivoField,
  .filters #detalheField,
  .filters #scoreField,
  .filters .field {
    flex: 1 1 100%;
    min-width: 0;
  }

  .filters .field-action .btn {
    width: 100%;
  }

  .search-combo {
    grid-template-columns: 6.4rem minmax(0, 1fr);
  }

  body.is-compact .table-wrap {
    display: none !important;
  }

  body.is-compact .cards {
    display: grid;
  }

  .pager {
    padding: 0.8rem 1rem 0.95rem;
    gap: 0.6rem;
  }

  .pager p {
    font-size: 0.8rem;
    flex: 1 1 100%;
  }

  .pager-btns {
    width: 100%;
  }

  .pager-btns .btn {
    flex: 1 1 0;
  }

  .modal {
    padding: 0;
    place-items: end center;
  }

  .modal-dialog {
    width: 100%;
    max-height: none;
    border-radius: 18px;
  }

  .modal-head,
  .modal-meta,
  .modal-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .modal-cluster {
    flex-direction: column;
    width: 100%;
    height: min(92vh, 100%);
    max-height: min(92vh, 100%);
    gap: 0.7rem;
    padding: 0 0.45rem 0.45rem;
  }

  .compare-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .score-criteria {
    padding: 0.9rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: auto;
    max-height: 40vh;
  }

  .compare-aprovacao {
    flex: 0 0 auto;
    align-self: stretch;
    border-radius: 18px;
  }

  .compare-aprovacao[hidden] {
    display: none !important;
  }

  .modal-body {
    overflow: auto;
  }

  .criteria-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-head {
    flex-wrap: wrap;
  }

  .modal-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .ia-extra {
    grid-template-columns: 1fr;
  }

  .compare-field {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .foot {
    padding: 0 0 1.4rem;
    font-size: 0.74rem;
  }
}

@media (max-width: 560px) {
  :root {
    --wrap: min(1360px, calc(100% - 1rem));
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
  }

  .header-company {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    text-align: left;
    padding: 0;
  }

  .header-company strong {
    max-width: 100%;
  }

  .header-right {
    width: auto;
    justify-content: flex-end;
  }

  .header-right .btn {
    flex: 0 0 auto;
  }

  .header-logo {
    height: 2.5rem;
    padding-right: 0.7rem;
  }

  .criteria-list {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
  }

  .summary-main p:last-child {
    font-size: 0.86rem;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }

  .search-combo {
    grid-template-columns: 1fr;
  }

  .search-combo select {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .score-filter {
    grid-template-columns: 1fr 4.5rem;
  }

  .panel-head {
    align-items: stretch;
  }

  .panel-head > div:first-child {
    min-width: 0;
  }

  .school-card-line {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

@media (max-width: 380px) {
  .kpis {
    grid-template-columns: 1fr;
  }

  .status {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .compare-row {
    grid-template-columns: 1fr;
  }

  .compare-field {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* App shell: navegação lateral + telas */
.app-shell {
  min-height: 100vh;
  padding-left: 248px;
  transition: padding-left 0.22s ease;
}

.app-shell.sidebar-collapsed {
  padding-left: 76px;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 76px;
  padding: 1rem 0.5rem;
}

.app-shell.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-bottom: 0.85rem;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  display: none;
}

.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .status-label {
  display: none;
}

.app-shell.sidebar-collapsed .btn-sidebar-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.35rem;
  font-weight: 600;
}

.app-shell.sidebar-collapsed .nav-link {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0.55rem 0.3rem;
}

.app-shell.sidebar-collapsed .sidebar-foot {
  padding: 0.7rem 0 0;
  align-items: stretch;
}

.app-shell.sidebar-collapsed .sidebar .status {
  justify-content: center;
  padding: 0.45rem;
  gap: 0;
}

.app-stage {
  min-width: 0;
}

.app-stage .wrap {
  width: 100%;
  max-width: 1800px;
  margin-inline: auto;
  padding-inline: clamp(0.9rem, 1.8vw, 2rem);
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 248px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  transition: width 0.22s ease, padding 0.22s ease;
  color: #dce8f8;
  background:
    radial-gradient(320px 220px at 10% 0%, rgba(74, 134, 212, 0.2), transparent 68%),
    linear-gradient(180deg, #102b52 0%, #0b203e 100%);
  box-shadow: 10px 0 32px rgba(15, 27, 45, 0.1);
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.2rem 0.1rem 0;
}

.btn-sidebar-toggle {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e6f8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-sidebar-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.page-heading-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  justify-self: start;
}

.sidebar-brand .brand-mark {
  flex: 0 0 auto;
  background: linear-gradient(145deg, #4a86d4, #1d5ba9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.sidebar-brand div {
  min-width: 0;
  display: grid;
}

.sidebar-brand span:last-child {
  color: #dce8f8;
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.25rem;
}

.nav-link {
  width: 100%;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  color: #b8cae2;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(74, 134, 212, 0.34), rgba(74, 134, 212, 0.17));
  border-color: rgba(125, 170, 229, 0.26);
  box-shadow: inset 3px 0 0 #65a0e9;
}

.nav-link > strong {
  color: inherit;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.75;
}

.nav-icon {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #bcd5f4;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.nav-icon-ok {
  color: #74d3a5;
}

.nav-icon-miss {
  color: #ff9f96;
}

.sidebar-foot {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  margin-top: auto;
  padding: 0.9rem 0.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-foot .nav-link {
  grid-template-columns: 2rem minmax(0, 1fr);
}

.sidebar .status {
  width: 100%;
  color: #b8cae2;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.page-heading {
  display: grid;
  gap: 0.05rem;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading strong {
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.035em;
}

.screen {
  min-width: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1rem;
}

.dashboard-card.upload-card {
  grid-column: 1 / -1;
}

.empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-card {
  min-width: 0;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-card h2 {
  margin: 0;
  font-size: 1.03rem;
  letter-spacing: -0.03em;
}

.dashboard-badge {
  padding: 0.24rem 0.55rem;
  border: 1px solid #c9d9ed;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.coverage-content {
  display: grid;
  grid-template-columns: minmax(200px, 0.46fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.6rem 1.75rem;
  min-height: 250px;
}

.donut-wrap {
  position: relative;
  width: min(100%, 228px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.donut-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, #ffffff 0%, #f5f8fc 52%, #e7edf6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(215, 224, 236, 0.95),
    0 16px 32px rgba(15, 27, 45, 0.08);
}

.donut-wrap::after {
  content: "";
  position: absolute;
  inset: 34px;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #f7fafc 70%);
  box-shadow:
    inset 0 0 0 1px rgba(215, 224, 236, 0.7),
    0 1px 2px rgba(15, 27, 45, 0.03);
  pointer-events: none;
}

.donut {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#dfe7f2 0 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 28px), #000 calc(100% - 27px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 28px), #000 calc(100% - 27px));
  transform: rotate(-90deg);
  filter: drop-shadow(0 3px 2px rgba(15, 27, 45, 0.05));
  transition: background 0.55s ease;
}

.approval-chart {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.15rem 1.35rem;
}

.pie-wrap {
  position: relative;
  width: clamp(118px, 11vw, 148px);
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.pie {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#dfe7f2 0 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 18px), #000 calc(100% - 17px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 18px), #000 calc(100% - 17px));
  transform: rotate(-90deg);
  transition: background 0.55s ease;
}

.pie-wrap::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #f4f7fb 70%);
  box-shadow:
    inset 0 0 0 1px rgba(215, 224, 236, 0.9),
    0 8px 20px rgba(15, 27, 45, 0.05);
  pointer-events: none;
}

.pie-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  pointer-events: none;
  gap: 0.1rem;
}

.pie-center strong {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pie-center span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.approval-legend {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.approval-legend-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.approval-legend-row:hover {
  background: #f3f7fc;
}

.approval-legend-label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
}

.approval-legend-row strong {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.approval-legend-row em {
  min-width: 2.6rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.coverage-legend {
  display: grid;
  gap: 0.45rem;
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.58rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc, #f3f7fb);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.legend-row:hover {
  border-color: #c5d6ea;
  background: #eef4fb;
  transform: translateY(-1px);
}

.legend-row:focus-visible {
  outline: 2px solid rgba(26, 79, 156, 0.35);
  outline-offset: 2px;
}

.legend-row.is-static {
  cursor: default;
}

.legend-row.is-static:hover {
  border-color: #d7e3f1;
  background: #f7fafc;
  transform: none;
}

.legend-row strong {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.legend-row em {
  min-width: 3.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.legend-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 4px rgba(15, 27, 45, 0.06);
}

.legend-dot.is-ok { background: var(--ok); }
.legend-dot.is-ia { background: var(--brand); }
.legend-dot.is-review { background: var(--brand); }
.legend-dot.is-mid { background: #d4a24a; }
.legend-dot.is-miss { background: var(--miss); }

.rank-list,
.source-list {
  display: grid;
  gap: 0.65rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.rank-label {
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.rank-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.rank-fill {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #6b9edf);
}

.rank-value {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.source-row {
  display: grid;
  grid-template-columns: 0.65rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafcfe;
}

.source-mark {
  width: 0.55rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--brand);
}

.source-row:nth-child(2) .source-mark { background: #5489c9; }
.source-row:nth-child(3) .source-mark { background: #8ba8cc; }

.source-name {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: capitalize;
}

.source-value {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.score-band-list {
  display: grid;
  gap: 0.7rem;
}

.score-band-row {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.score-band-row:hover {
  border-color: #d7e3f1;
  background: #f5f8fc;
}

.score-band-row:focus-visible {
  outline: 2px solid rgba(26, 79, 156, 0.35);
  outline-offset: 2px;
}

.score-band-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.score-band-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--score-2);
}

.score-band-row.band-0 .score-band-swatch { background: var(--score-0); }
.score-band-row.band-1 .score-band-swatch { background: var(--score-1); }
.score-band-row.band-2 .score-band-swatch { background: var(--score-2); }
.score-band-row.band-3 .score-band-swatch { background: var(--score-3); }
.score-band-row.band-4 .score-band-swatch { background: var(--score-4); }

.score-band-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.score-band-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--score-2);
}

.score-band-row.band-0 .score-band-fill { background: var(--score-0); }
.score-band-row.band-1 .score-band-fill { background: var(--score-1); }
.score-band-row.band-2 .score-band-fill { background: var(--score-2); }
.score-band-row.band-3 .score-band-fill { background: var(--score-3); }
.score-band-row.band-4 .score-band-fill { background: var(--score-4); }

.score-band-value {
  min-width: 3.4rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}


@media (max-width: 1050px) {
  .app-shell {
    padding-left: 210px;
  }

  .sidebar {
    width: 210px;
    padding-inline: 0.75rem;
  }

  .app-stage .wrap {
    width: min(1360px, calc(100% - 1.5rem));
  }

  .coverage-content {
    grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
    min-height: 200px;
  }

  .donut-wrap {
    width: min(100%, 180px);
  }

  .donut-wrap::after {
    inset: 28px;
  }

  .donut {
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 24px), #000 calc(100% - 23px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 24px), #000 calc(100% - 23px));
  }

  .approval-chart {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
  }

  .approval-legend {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-left: 0;
    padding-top: 106px;
  }

  .app-shell.sidebar-collapsed {
    padding-left: 0;
    padding-top: 64px;
  }

  .app-shell.sidebar-collapsed .sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.65rem;
  }

  .app-shell.sidebar-collapsed .sidebar-top {
    flex-direction: row;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .app-shell.sidebar-collapsed .sidebar-nav {
    grid-template-columns: repeat(3, minmax(0, auto));
    margin-top: 0;
    flex: 1;
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .sidebar-foot {
    display: flex;
    margin-top: 0;
    padding: 0;
    border-top: 0;
  }

  .sidebar {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    overflow: visible;
    padding: 0.65rem 0.75rem;
  }

  .sidebar-top {
    align-items: center;
    padding-bottom: 0.6rem;
  }

  .sidebar-brand {
    padding: 0 0.15rem;
  }

  .sidebar-brand span:last-child,
  .sidebar-foot {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar-foot {
    display: flex;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    margin-top: 0.6rem;
  }

  .nav-link {
    grid-template-columns: auto minmax(0, auto);
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.4rem;
    font-size: 0.74rem;
  }

  .nav-link > strong {
    display: none;
  }

  .nav-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .app-header {
    top: 106px;
  }

  .app-shell.sidebar-collapsed .app-header {
    top: 64px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .coverage-content {
    grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
    min-height: 180px;
  }
}

@media (max-width: 460px) {
  .nav-link {
    display: flex;
  }

  .nav-icon {
    display: none;
  }

  .coverage-content {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .coverage-legend {
    width: 100%;
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 27, 45, 0.14);
  overflow: hidden;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.5rem 0 0.25rem;
}

.login-logo {
  display: block;
  width: min(200px, 54%);
  height: auto;
}

.login-product {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.user-summary {
  display: flex;
  flex-direction: column;
}

.user-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.login-card h1,
.admin-heading h1 {
  margin: 0.2rem 0 0.35rem;
  letter-spacing: -0.04em;
}

.login-card p {
  margin: 0;
  color: var(--muted);
}

.login-form,
.admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
}

.login-form .field,
.login-form .btn {
  width: 100%;
}

.password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-wrap input {
  width: 100%;
  padding-right: 2.7rem;
}

/* Evita o 2º olho do Edge/IE (::-ms-reveal) */
.password-wrap input::-ms-reveal,
.password-wrap input::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  z-index: 2;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
}

.password-toggle:hover {
  color: var(--ink);
  background: #eef3f9;
}

.password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.form-error {
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: var(--miss);
  background: var(--miss-bg);
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.user-summary {
  text-align: right;
  line-height: 1.25;
}

.admin-screen {
  display: grid;
  gap: 1.25rem;
}

.admin-heading,
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-heading {
  padding: 1.35rem 1.4rem;
}

.admin-heading p {
  margin: 0;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-subnav {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-subnav-link {
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-subnav-link:hover {
  color: var(--ink);
  background: #f2f6fb;
}

.admin-subnav-link.is-active {
  color: #fff;
  background: var(--brand);
}

.admin-grid:has(#adminClientesCard[hidden]) {
  grid-template-columns: 1fr;
}

.admin-words-card {
  grid-column: 1 / -1;
}

.admin-words-card .admin-card-head p {
  margin: -0.6rem 0 1rem;
  color: var(--muted);
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafcff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.check-field input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand);
}

.words-feedback {
  margin: 0.8rem 0 0;
  color: var(--ok);
  font-size: 0.84rem;
  font-weight: 600;
}

.words-feedback.is-error {
  color: var(--miss);
}

.words-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.words-toolbar .field.grow,
.admin-filters .field.grow {
  flex: 1 1 220px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.admin-count,
.words-count {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.words-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.words-tags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.word-tag {
  display: inline-flex !important;
  width: fit-content;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  color: var(--brand-deep) !important;
  background: var(--brand-soft);
  font-weight: 600;
}

.words-row.is-disabled {
  opacity: 0.72;
  background: #f6f7f9;
}

.upload-card {
  grid-column: 1 / -1;
}

.upload-card > p {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
}

.upload-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.4fr) auto;
  align-items: end;
  gap: 0.85rem;
}

.upload-form.upload-form-aprovacao {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.upload-form .field.grow {
  flex: initial;
  min-width: 0;
  width: 100%;
}

.upload-form .btn {
  min-width: 10.5rem;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .upload-form,
  .upload-form.upload-form-aprovacao {
    grid-template-columns: 1fr;
  }

  .upload-form .btn {
    width: 100%;
  }
}

.upload-form input[type="file"] {
  padding: 0.48rem;
  background: var(--surface);
}

.upload-form input[type="file"]::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.42rem 0.7rem;
  border: 0;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.upload-feedback {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.86rem;
  font-weight: 600;
}

.upload-feedback.is-error {
  background: var(--miss-bg);
  color: var(--miss);
}

.admin-card {
  padding: 1.25rem;
  min-width: 0;
}

.admin-card-head h2 {
  margin: 0.15rem 0 1rem;
}

.admin-form {
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.admin-form .field.grow {
  flex: 1 1 220px;
}

.admin-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  max-height: 560px;
  overflow: auto;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fafcff;
}

.admin-row-main {
  min-width: 0;
}

.admin-row-main strong,
.admin-row-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-main span {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-row-actions {
  display: flex;
  gap: 0.4rem;
}

.status-pill {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: var(--ok) !important;
  background: var(--ok-bg);
  font-weight: 600;
}

.status-pill.is-off {
  color: var(--miss) !important;
  background: var(--miss-bg);
}

@media (max-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .user-summary {
    display: none;
  }
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.password-modal[hidden] {
  display: none !important;
}

.password-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.password-dialog {
  position: relative;
  z-index: 2;
  width: min(420px, calc(100vw - 2rem));
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(10, 18, 32, 0.28);
}

.password-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.password-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.password-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.password-form {
  display: grid;
  gap: 0.75rem;
}

.password-form .field {
  display: grid;
  gap: 0.35rem;
}

.password-form .field span {
  font-size: 0.82rem;
  color: var(--muted);
}

.password-form .field input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.password-form .field input:focus {
  outline: 2px solid rgba(29, 78, 216, 0.35);
  border-color: var(--brand, #1d4ed8);
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.form-ok {
  margin: 0;
  color: var(--ok, #0f7a45);
  font-size: 0.9rem;
  font-weight: 600;
}

.password-modal .form-error {
  margin: 0;
}
