/* Mainstage · Plataforma: componentes */

/* ---------- ícones ---------- */
.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 22px; height: 22px; }

/* ---------- botões ---------- */
.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r);
  background: transparent; color: inherit;
  font-size: 14px; font-weight: 750; letter-spacing: .005em; line-height: 1; white-space: nowrap;
  text-decoration: none; user-select: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }
.btn--sm { --btn-h: 36px; padding: 0 13px; font-size: 13px; }
.btn--lg { --btn-h: 52px; padding: 0 24px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--btn-h); padding: 0; }

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--red-hover); }
.btn--primary:active:not(:disabled) { background: var(--red-press); }

.btn--secondary { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn--secondary:hover:not(:disabled) { border-color: var(--text); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover:not(:disabled) { background: rgba(16,16,19,.05); color: var(--text); }

.btn--danger { background: var(--surface); border-color: var(--red-line); color: var(--red-ink); }
.btn--danger:hover:not(:disabled) { background: var(--red-tint); border-color: var(--red); }
.btn--danger-solid { background: var(--red-press); color: #fff; }
.btn--danger-solid:hover:not(:disabled) { background: #8E1216; }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover:not(:disabled) { background: var(--charcoal); }

.on-dark .btn--secondary, .btn--on-dark { background: transparent; border-color: var(--line-dark-2); color: #fff; }
.on-dark .btn--secondary:hover:not(:disabled), .btn--on-dark:hover:not(:disabled) { border-color: #fff; background: rgba(255,255,255,.04); }
.on-dark .btn--ghost { color: var(--on-dark-2); }
.on-dark .btn--ghost:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.06); }

.btn.is-pending { color: transparent !important; pointer-events: none; }
.btn.is-pending::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  color: var(--btn-spinner, #fff); animation: spin .7s linear infinite;
}
.btn--secondary.is-pending::after, .btn--ghost.is-pending::after, .btn--danger.is-pending::after { --btn-spinner: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none;
  color: var(--text); font-weight: 750; font-size: inherit;
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color var(--t-fast);
}
.link:hover { text-decoration-color: var(--red); }
.link--red { color: var(--red-ink); }
.on-dark .link { color: #fff; text-decoration-color: rgba(255,255,255,.35); }

/* ---------- etiquetas ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: var(--r-sm);
  background: var(--neutral-tint); color: var(--neutral);
  font-size: 12px; font-weight: 750; line-height: 1; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--plain::before { display: none; }
.tag--ok { background: var(--ok-tint); color: var(--ok); }
.tag--warn { background: var(--warn-tint); color: var(--warn); }
.tag--info { background: var(--info-tint); color: var(--info); }
.tag--red { background: var(--red-tint); color: var(--red-ink); }
.tag--dark { background: var(--ink); color: #fff; }
.tag--outline { background: transparent; border: 1px solid var(--line-2); }

.demo-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border: 1px solid currentColor; border-radius: 4px;
  color: var(--red-ink); background: transparent;
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.on-dark .demo-tag, .demo-tag--light { color: #FF9C9C; }

/* ---------- formulários ---------- */
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 18px; }
.field__label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text); font-size: 13.5px; font-weight: 750; }
.field__req { color: var(--red-ink); font-size: 12px; font-weight: 700; }
.field__opt { color: var(--text-3); font-size: 12px; font-weight: 600; }
.field__help { color: var(--text-3); font-size: 13px; line-height: 1.45; }
.field__error { display: flex; align-items: flex-start; gap: 6px; color: var(--red-ink); font-size: 13px; font-weight: 650; }
.field__error .i { width: 16px; height: 16px; margin-top: 1px; }
.field__count { color: var(--text-3); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 550; line-height: 1.4;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { min-height: 112px; resize: vertical; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23141417' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input::placeholder, .textarea::placeholder { color: #8F8F96; font-weight: 500; }
.input:hover, .select:hover, .textarea:hover { border-color: #A9A9AE; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(224,36,36,.16); outline: none; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.input:disabled { background: var(--surface-2); color: var(--text-3); }

.input-icon { position: relative; }
.input-icon > .i { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 42px; }

/* escolhas */
.choice {
  position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.choice + .choice { margin-top: 8px; }
.choice:hover { border-color: #9D9DA3; }
.choice:has(input:checked) { border-color: var(--text); background: #FCFCFC; box-shadow: inset 0 0 0 1px var(--text); }
.choice:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__mark {
  width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #8C8C92; border-radius: 50%;
  display: grid; place-items: center; background: #fff; transition: all var(--t-fast);
}
.choice--check .choice__mark { border-radius: 5px; }
.choice input:checked + .choice__mark { border-color: var(--red); background: var(--red); }
.choice input:checked + .choice__mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.choice--check input:checked + .choice__mark::after { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.choice__title { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.choice__desc { display: block; margin-top: 3px; color: var(--text-3); font-size: 13px; line-height: 1.45; }
.choice--compact { padding: 11px 14px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 40px; height: 24px; flex: 0 0 auto; border-radius: 99px; background: #C9C9CE; position: relative; transition: background var(--t-fast); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t) var(--ease); }
.switch input:checked + .switch__track { background: var(--red); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--red); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .5; }

/* segmented */
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper-2); gap: 2px; }
.segmented button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 750; }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- superfícies ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel__head .h3 { font-size: 15px; }
.panel__body { padding: 22px; }
.panel__foot { padding: 14px 22px; border-top: 1px solid var(--line); }
.panel--flush .panel__body { padding: 0; }
.panel--quiet { background: var(--surface-2); }

.callout {
  display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--neutral-tint); color: var(--text-2); font-size: 13.5px; line-height: 1.5;
}
.callout .i { margin-top: 1px; color: var(--text); }
.callout strong { color: var(--text); }
.callout--warn { background: var(--warn-tint); }
.callout--warn .i { color: var(--warn); }
.callout--red { background: var(--red-tint); }
.callout--red .i { color: var(--red-ink); }
.callout--info { background: var(--info-tint); }
.callout--info .i { color: var(--info); }
.callout--ok { background: var(--ok-tint); }
.callout--ok .i { color: var(--ok); }
.callout--line { background: var(--surface); border: 1px solid var(--line); }

/* definição */
.deflist { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; }
.deflist > dt, .deflist > dd { padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.deflist > dt { color: var(--text-3); font-weight: 700; padding-right: 20px; }
.deflist > dd { color: var(--text); font-weight: 550; }
.deflist > dt:first-of-type, .deflist > dt:first-of-type + dd { border-top: 0; padding-top: 0; }
@media (max-width: 640px) {
  .deflist { grid-template-columns: 1fr; }
  .deflist > dd { padding-top: 0; border-top: 0; }
  .deflist > dt { padding-bottom: 4px; }
}

/* listas e tabelas */
.list-rows > li { border-top: 1px solid var(--line); }
.list-rows > li:first-child { border-top: 0; }
.list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  width: 100%; padding: 16px 22px; border: 0; background: transparent; text-align: left; text-decoration: none; color: inherit;
  transition: background var(--t-fast);
}
a.list-row:hover, button.list-row:hover { background: var(--surface-2); }
.list-row__title { font-size: 14.5px; font-weight: 750; line-height: 1.35; }
.list-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 5px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.list-row__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.list-row__side { display: flex; align-items: center; gap: 12px; color: var(--text-3); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-3); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: left; white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-weight: 550; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:hover { background: var(--surface-2); }
.table .cell-title { font-weight: 750; color: var(--text); }
.table .cell-sub { display: block; margin-top: 2px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }

/* mobile: tabelas viram listas estruturadas */
@media (max-width: 760px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .table--stack tr:last-child { border-bottom: 0; }
  .table--stack td { padding: 3px 0 !important; border: 0; }
  .table--stack td[data-label]::before { content: attr(data-label); display: block; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
  .table--stack td:first-child::before { display: none; }
}

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: 0 0 auto; padding: 13px 14px; border: 0; background: none;
  color: var(--text-3); font-size: 14px; font-weight: 750; text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--text); }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--red); }
.tab__count { margin-left: 6px; color: var(--text-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.on-dark .tabs { border-color: var(--line-dark); }
.on-dark .tab { color: var(--on-dark-3); }
.on-dark .tab:hover, .on-dark .tab[aria-selected="true"], .on-dark .tab[aria-current="page"] { color: #fff; }

/* chips de filtro */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 700;
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* avatar */
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%; background: var(--charcoal); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--square { border-radius: var(--r); }
.avatar--red { background: var(--red); }
.avatar--photo { background-size: cover; background-position: center; }

/* métricas */
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.stat__label { color: var(--text-3); font-size: 12.5px; font-weight: 750; }
.stat__value { margin-top: 8px; font-family: var(--font-display); font-size: 38px; line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.stat__foot { margin-top: 10px; color: var(--text-3); font-size: 12px; font-weight: 600; line-height: 1.4; }
.stat--link { display: block; text-decoration: none; transition: border-color var(--t-fast); }
.stat--link:hover { border-color: var(--text); }

/* barras agregadas */
.bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--red); transform-origin: left; animation: grow .6s var(--ease) both; }
.bar--ink > span { background: var(--ink); }
@keyframes grow { from { transform: scaleX(0); } }

/* stepper */
.stepper { display: grid; gap: 2px; counter-reset: step; }
.stepper__item {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center;
  width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r); background: transparent; text-align: left;
  color: var(--text-3); font-size: 14px; font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast);
}
.stepper__item:hover:not(:disabled) { background: rgba(16,16,19,.04); color: var(--text); }
.stepper__num { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--line-2); border-radius: 50%; font-size: 12px; font-weight: 800; background: var(--surface); }
.stepper__item[aria-current="step"] { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stepper__item[aria-current="step"] .stepper__num { border-color: var(--red); background: var(--red); color: #fff; }
.stepper__item.is-done .stepper__num { border-color: var(--ink); background: var(--ink); color: #fff; }
.stepper__item.has-error .stepper__num { border-color: var(--red); color: var(--red-ink); }

.progress-line { display: flex; gap: 4px; }
.progress-line > span { flex: 1; height: 3px; border-radius: 3px; background: var(--paper-2); transition: background var(--t); }
.progress-line > span.is-on { background: var(--red); }

/* linha do tempo de estados */
.timeline { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 15px; left: calc(100% / var(--n, 3) / 2); right: calc(100% / var(--n, 3) / 2); height: 2px; background: var(--paper-2); }
.timeline__fill { position: absolute; top: 15px; left: calc(100% / var(--n, 3) / 2); height: 2px; background: var(--red); width: var(--fill, 0%); transition: width .5s var(--ease); }
.timeline__step { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.timeline__dot { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--text-3); z-index: 1; }
.timeline__step.is-done .timeline__dot { border-color: var(--red); background: var(--red); color: #fff; }
.timeline__step.is-current .timeline__dot { border-color: var(--red); color: var(--red-ink); }
.timeline__label { font-size: 13.5px; font-weight: 750; }
.timeline__sub { margin-top: -6px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }

/* vazio / erro / negado */
.state {
  display: grid; justify-items: center; gap: 14px; padding: 56px 24px; text-align: center;
}
.state__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--paper-2); color: var(--text-2); }
.state__icon .i { width: 24px; height: 24px; }
.state--red .state__icon { background: var(--red-tint); color: var(--red-ink); }
.state__title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.state__text { max-width: 46ch; color: var(--text-3); font-size: 14.5px; line-height: 1.55; }
.state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.state--compact { padding: 32px 20px; }

/* skeleton */
.skel { position: relative; overflow: hidden; border-radius: 6px; background: var(--paper-2); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel--line { height: 12px; }
.skel--title { height: 22px; width: 40%; }
.skel--block { height: 120px; border-radius: var(--r-md); }

/* modal */
.modal-root { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,11,13,.55); backdrop-filter: blur(3px); animation: fade var(--t) var(--ease); }
.modal {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-pop);
  animation: rise var(--t) var(--ease);
}
.modal--wide { width: min(760px, 100%); }
.modal--xl { width: min(1040px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal__title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.modal__body { padding: 14px 24px 22px; color: var(--text-2); font-size: 14.5px; }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@media (max-width: 560px) {
  .modal-root { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .modal__foot { border-radius: 0; flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* popover / menu */
.menu {
  position: absolute; z-index: 300; min-width: 240px; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop);
  color: var(--text); animation: rise var(--t-fast) var(--ease);
}
.menu__label { padding: 10px 12px 6px; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.menu__item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font-size: 14px; font-weight: 650; text-align: left; text-decoration: none;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--surface-2); outline: none; }
.menu__item[aria-checked="true"] { background: var(--surface-2); }
.menu__item .i { color: var(--text-3); }
.menu__item-sub { display: block; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--line); }

/* toast */
.toasts { position: fixed; z-index: 800; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start;
  padding: 14px 14px 14px 16px; border-radius: var(--r-md);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-pop);
  font-size: 14px; font-weight: 600; line-height: 1.45; pointer-events: auto;
  animation: rise var(--t) var(--ease);
}
.toast .i { margin-top: 1px; }
.toast--ok .i { color: #6FD39F; }
.toast--error .i { color: #FF8A8A; }
.toast__close { padding: 0; border: 0; background: none; color: var(--on-dark-3); }
.toast__close:hover { color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all var(--t) var(--ease); }
@media (max-width: 760px) { .toasts { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* tooltip simples */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 50; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 6px; background: var(--ink); color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.4; text-align: left; white-space: normal; pointer-events: none;
}

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; font-weight: 650; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .i { width: 14px; height: 14px; }

/* ferramentas de busca/filtro */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 260px; max-width: 360px; }
.toolbar .input, .toolbar .select { min-height: 38px; font-size: 14px; }
.toolbar .select { width: auto; min-width: 160px; }

/* versão */
.version { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; background: var(--paper-2); color: var(--text-2); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* diff */
.diff { display: grid; gap: 6px; font-size: 13.5px; }
.diff__line { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 8px 10px; border-radius: 6px; }
.diff__line--add { background: var(--ok-tint); color: #0F4A2D; }
.diff__line--del { background: var(--red-tint); color: #7A0F12; text-decoration: line-through; text-decoration-color: rgba(122,15,18,.4); }
.diff__line--mod { background: var(--warn-tint); color: #5C3500; }
.diff__sign { font-weight: 800; }

/* auditoria */
.audit-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: start; padding: 16px 22px; border-top: 1px solid var(--line); }
.audit-item:first-child { border-top: 0; }
.audit-item__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--text-2); }
.audit-item__what { font-size: 14px; font-weight: 650; line-height: 1.45; }
.audit-item__what b { font-weight: 800; }
.audit-item__meta { margin-top: 4px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.audit-item__when { color: var(--text-3); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
