﻿:root {
  --gold: #f0c41a;
  --gold-400: #f5c518;
  --gold-500: #e8b006;
  --gold-600: #c99200;
  --gold-soft: #fff8db;
  --gold-muted: #fef3c7;

  --ink: #14181f;
  --ink-2: #2a3140;
  --muted: #64708a;
  --muted-2: #8b95a8;

  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --line: #e4e8ef;
  --line-2: #d5dae3;

  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 8px 24px rgba(20, 24, 31, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.05);
  --gap: 16px;
  --gap-sm: 12px;

  --topbar-h: 68px;
  --sidebar-w: 268px;

  --font: "Source Sans 3", system-ui, sans-serif;
  --display: "Outfit", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h);
}

/* ========== Topbar ========== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px 0 14px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  background: linear-gradient(180deg, #ffd84a 0%, var(--gold-400) 55%, #eab308 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(180, 130, 0, 0.18);
  min-width: 0;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.15s ease;
}

.topbar__menu-toggle:hover {
  background: rgba(255, 255, 255, 0.55);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-400);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand__text strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__text span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(20, 24, 31, 0.62);
}

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.crumb:hover {
  background: #fff;
  transform: translateY(-1px);
}

.crumb-current {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb-sep {
  color: rgba(20, 24, 31, 0.4);
  font-weight: 700;
  margin: 0;
  flex-shrink: 0;
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: #fff;
}

.icon-btn__dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #f5c518;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

a.user-chip:hover {
  background: #fff;
  box-shadow: var(--shadow-md, 0 6px 18px rgba(20, 24, 31, 0.1));
  color: inherit;
}

a.user-chip.is-active {
  outline: 2px solid rgba(20, 24, 31, 0.18);
  outline-offset: 1px;
}

.user-chip__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-400);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
}

.user-chip__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  padding-right: 4px;
}

.user-chip__meta strong {
  font-size: 0.86rem;
  font-weight: 700;
}

.user-chip__meta span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.btn-sair {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: none;
  border-radius: 11px;
  background: var(--danger);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-sair:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff;
}

/* ========== Shell ========== */
.shell {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-width: 0;
  min-height: calc(100vh - var(--topbar-h));
  position: relative;
}

/* ========== Sidebar ========== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  align-self: stretch;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 16px;
  min-height: calc(100vh - var(--topbar-h));
  height: auto;
  position: relative;
  z-index: 30;
}

.sidebar__nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__label {
  margin: 0 10px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.sidebar__label--spaced {
  margin-top: 18px;
}

.nav-section {
  margin-top: 4px;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-section__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-section__toggle:hover {
  background: var(--surface-2);
  color: var(--ink-2);
}

.nav-section__chev {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--muted-2);
}

.nav-section.is-open > .nav-section__toggle .nav-section__chev {
  transform: rotate(180deg);
}

.nav-section > .nav-section__body {
  display: none !important;
  flex-direction: column;
  gap: 2px;
}

.nav-section.is-open > .nav-section__body {
  display: flex !important;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 11px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: left;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
  min-width: 0;
}

.nav-item__icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.nav-item__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item__chev {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-item__badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--gold-muted);
  color: var(--gold-600);
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-item--toggle .nav-item__badge {
  margin-left: auto;
  margin-right: 2px;
}

.nav-item--toggle .nav-item__chev {
  margin-left: 0;
}

.nav-sub a em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 20px;
  padding: 1px 6px;
  text-align: center;
}

.nav-item:hover {
  background: var(--surface-2);
}

.nav-item.is-active {
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--gold-500);
}

.nav-item.is-active .nav-item__icon {
  color: var(--gold-600);
}

.nav-group.is-open > .nav-item {
  background: var(--surface-2);
}

.nav-group.is-open .nav-item__chev {
  transform: rotate(180deg);
}

.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 18px;
}

.nav-group.is-open .nav-sub {
  display: flex;
}

.nav-sub a {
  padding: 8px 12px 8px 28px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-sub a::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  transform: translateY(-50%);
}

.nav-sub a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-sub a:hover::before {
  background: var(--gold-500);
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-tip {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8db, #fff);
  border: 1px solid #f5e6a3;
}

.sidebar-tip strong {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.sidebar-tip p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-backdrop {
  display: none;
}

/* ========== Main ========== */
.main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 20px 24px 40px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 100%;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-head__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--primary {
  background: var(--ink);
  color: var(--gold-400);
  box-shadow: 0 6px 16px rgba(20, 24, 31, 0.18);
}

.btn--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ========== KPIs ========== */
.kpi-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: var(--gap-sm);
  margin-bottom: 0;
}

.kpi-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(20, 24, 31, 0.08);
}

.kpi--hero {
  background:
    linear-gradient(135deg, rgba(255, 248, 219, 0.9), rgba(255, 255, 255, 0.95)),
    var(--surface);
  border-color: #f0df8a;
}

.kpi__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.kpi__icon--money {
  background: #ecfdf5;
  color: var(--ok);
}

.kpi__icon--leads {
  background: var(--gold-soft);
  color: var(--gold-600);
}

.kpi__icon--conv {
  background: #eff6ff;
  color: #2563eb;
}

.kpi__icon--tasks {
  background: var(--warn-soft);
  color: var(--warn);
}

.kpi__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi__value {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.kpi__value--money {
  color: var(--ok);
  font-size: 1.7rem;
}

.kpi__trend {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}

.kpi__trend.is-up {
  color: var(--ok);
}

.kpi__trend.is-warn {
  color: var(--warn);
}

/* ========== Aprovados da semana ========== */
.week-approved {
  padding: 18px 18px 16px;
}

.week-approved__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.week-approved__title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.week-approved__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #22c55e, #059669);
  color: #fff;
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.28);
}

.week-approved__title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.week-approved__title p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 550;
}

.week-approved__hint {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.week-approved__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  min-height: 118px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.week-day:hover {
  transform: translateY(-2px);
}

.week-day__name {
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
  color: var(--ink-2);
}

.week-day__date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.week-day__count {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.week-day__label {
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.week-day.is-hot {
  border-color: transparent;
  background: linear-gradient(155deg, #34d399 0%, #16a34a 48%, #059669 100%);
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.28);
  color: #fff;
}

.week-day.is-hot .week-day__name,
.week-day.is-hot .week-day__date,
.week-day.is-hot .week-day__count,
.week-day.is-hot .week-day__label {
  color: #fff;
}

.week-day.is-hot .week-day__date,
.week-day.is-hot .week-day__label {
  opacity: 0.9;
}

.week-day.is-today:not(.is-hot) {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.18);
}

.week-day.is-today.is-hot {
  box-shadow:
    0 10px 22px rgba(5, 150, 105, 0.28),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

html[data-theme="dark"] .week-day.is-empty {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .week-approved__hint {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .week-approved__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .week-approved__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .week-approved__grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Panels ========== */
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  gap: var(--gap);
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.dash-row > * {
  min-width: 0;
  max-width: 100%;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
  height: 100%;
}

.panel--aproveitamento {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel--aproveitamento .aproveitamento {
  flex: 1;
  justify-content: center;
}

.panel--chart {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel--chart .chart-wrap {
  flex: 1;
  min-height: 240px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.panel__head > div {
  min-width: 0;
}

.panel__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.panel__head p {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.link {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-600);
  white-space: nowrap;
}

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

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.seg__btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.seg__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  overflow: hidden;
}

.aproveitamento {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0 2px;
}

.chart-wrap canvas {
  max-width: 100% !important;
}

.chart-wrap--donut {
  width: min(168px, 100%);
  max-width: 100%;
  margin: 0 auto;
  min-height: 0;
  aspect-ratio: 1;
  position: relative;
}

.aproveitamento__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1.1;
}

.aproveitamento__center strong {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.aproveitamento__center span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel--aproveitamento .panel__head {
  flex-wrap: wrap;
}

.panel--aproveitamento .seg {
  flex-shrink: 0;
}

.legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  min-width: 0;
}

.legend__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend strong {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--ink);
  font-weight: 700;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}

/* ========== Table ========== */
.table-wrap {
  overflow-x: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.12s ease;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.person__av {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg, #f3f4f6);
  color: var(--fg, #374151);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.person strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.person small {
  color: var(--muted-2);
  font-size: 0.76rem;
}

.money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.status--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status--wait {
  background: var(--warn-soft);
  color: var(--warn);
}

.status--no {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ========== Side stack ========== */
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reminders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel--priorities {
  margin-bottom: 0;
}

.panel--priorities .panel__head {
  margin-bottom: 12px;
}

.reminders--row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-sm);
}

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

.reminders li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.reminders__time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gold-600);
  padding-top: 2px;
}

.reminders strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
}

.reminders p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.prio {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.prio--high {
  background: var(--danger-soft);
  color: var(--danger);
}

.prio--mid {
  background: var(--warn-soft);
  color: var(--warn);
}

.prio--low {
  background: #f1f5f9;
  color: var(--muted);
}

.panel--cta {
  background:
    linear-gradient(160deg, #1a1f29 0%, #2a3140 100%);
  color: #fff;
  border: 0;
  padding: 16px 18px 18px;
  margin-top: auto;
}

.comissao-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.panel--cta h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
}

.comissao-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.comissao-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.comissao-toggle[aria-pressed="true"] {
  color: var(--gold-400);
}

.comissao-toggle__icon {
  display: none;
  grid-area: 1 / 1;
}

.comissao-toggle[aria-pressed="false"] .comissao-toggle__icon--open,
.comissao-toggle[aria-pressed="true"] .comissao-toggle__icon--closed {
  display: block;
}

.meta-value {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: filter 0.15s ease;
}

.meta-value.is-hidden {
  letter-spacing: 0.12em;
  user-select: none;
}

.meta-value span {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), #ffe066);
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .kpi-grid,
  .kpi-grid--3 {
    grid-template-columns: 1fr;
  }

  .kpi--hero {
    grid-column: auto;
  }

  .dash-row {
    grid-template-columns: 1fr;
  }

  .panel--chart .chart-wrap {
    min-height: 220px;
  }

  .status-board__grid,
  .status-board__grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-card--money {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .topbar__menu-toggle {
    display: grid;
  }

  .topbar__crumb {
    display: none;
  }

  .user-chip__meta {
    display: none;
  }

  .user-chip {
    padding: 4px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    bottom: 0;
    width: min(var(--sidebar-w), calc(100vw - 48px));
    height: auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 32px rgba(20, 24, 31, 0.12);
    z-index: 45;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0;
    background: rgba(20, 24, 31, 0.35);
    z-index: 42;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-sidebar-open {
    overflow: hidden;
    touch-action: none;
  }

  body.is-sidebar-open .sidebar {
    touch-action: pan-y;
  }

  .sidebar a,
  .sidebar button {
    -webkit-tap-highlight-color: transparent;
  }

  .main {
    padding: 16px 14px 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .shell {
    min-height: calc(100dvh - var(--topbar-h));
  }
}

@media (max-width: 640px) {
  .kpi-grid,
  .kpi-grid--3 {
    grid-template-columns: 1fr;
  }

  .brand__text {
    display: none;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .topbar {
    gap: 8px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .btn-sair {
    padding: 9px 11px;
    font-size: 0;
    gap: 0;
  }

  .btn-sair svg {
    width: 18px;
    height: 18px;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-head h1 {
    font-size: 1.35rem;
  }

  .page-head__actions {
    width: 100%;
  }

  .page-head__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .reminders li {
    grid-template-columns: 42px 1fr;
  }

  .reminders .prio {
    grid-column: 2;
    justify-self: start;
  }

  .goals-combo__ring {
    width: 64px;
    height: 64px;
  }

  .goals-combo__ring svg {
    width: 64px;
    height: 64px;
  }

  .goals-combo__fig strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .panel {
    padding: 14px;
  }

  .panel__head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel__head .seg {
    align-self: flex-start;
  }
}

@media (max-width: 400px) {
  .user-chip {
    display: none;
  }

  .status-card strong {
    font-size: 1.25rem;
  }

  .kpi__value {
    font-size: 1.35rem;
  }
}

/* ========== Product pill / alerts / funnel / rank ========== */
.product-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.product-pill__bank {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #005ca9;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.product-pill__bank--crefisa {
  background: linear-gradient(135deg, #e85d04, #f48c06);
}

/* ========== Status board (resumo propostas) ========== */
.status-board {
  margin-bottom: 0;
}

.status-board__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.status-board__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--line-2);
}

.status-card strong {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.status-card span {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
}

.status-card--danger {
  border-left-color: var(--danger);
}

.status-card--danger strong {
  color: var(--danger);
}

.status-card--warn {
  border-left-color: var(--warn);
}

.status-card--warn strong {
  color: var(--warn);
}

.status-card--info {
  border-left-color: #2563eb;
}

.status-card--info strong {
  color: #2563eb;
}

.status-card--ok {
  border-left-color: var(--ok);
}

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

.status-card--money {
  border-left-color: var(--gold-500);
  background: linear-gradient(135deg, #fffdf5, #fff);
}

.status-card--money span {
  order: -1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-card--money strong {
  font-size: 1.25rem;
  color: var(--ok);
}

@media (max-width: 1200px) {
  .status-board__grid,
  .status-board__grid--4 {
    grid-template-columns: 1fr 1fr;
  }

  .status-card--money {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .status-board__grid,
  .status-board__grid--4 {
    grid-template-columns: 1fr;
  }
}

.alert-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.alert-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.alert-chip strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.alert-chip span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.alert-chip--danger {
  background: var(--danger-soft);
  border-color: #fecaca;
}

.alert-chip--danger strong {
  color: var(--danger);
}

.alert-chip--warn {
  background: var(--warn-soft);
  border-color: #fde68a;
}

.alert-chip--warn strong {
  color: var(--warn);
}

.alert-chip--ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
}

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

.panel--funnel {
  margin-bottom: 14px;
  max-width: 100%;
}

.funnel {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}

.funnel__step {
  flex: 1 1 0;
  min-width: 100px;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.funnel__step:hover {
  transform: translateY(-2px);
  border-color: var(--gold-500);
  background: var(--gold-soft);
}

.funnel__step--warn {
  background: var(--warn-soft);
  border-color: #fde68a;
}

.funnel__step--caixa {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.funnel__step--ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
}

.funnel__n {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.funnel__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.funnel__sub {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.funnel__arrow {
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-weight: 700;
  flex-shrink: 0;
  padding-top: 8px;
}

.status--caixa {
  background: #eff6ff;
  color: #1d4ed8;
}

.status--digit {
  background: #f3e8ff;
  color: #7e22ce;
}

.sla {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.sla--late {
  color: var(--danger);
}

.sla--ok {
  color: var(--ok);
}

.rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.rank__item--gold {
  background: var(--gold-soft);
  border-color: #f0df8a;
}

.rank__pos {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-family: var(--display);
  font-weight: 750;
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--line);
}

.rank__item--gold .rank__pos {
  background: var(--ink);
  color: var(--gold-400);
  border-color: transparent;
}

.rank__who strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
}

.rank__who small {
  color: var(--muted);
  font-size: 0.76rem;
}

.rank__val {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .alert-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .product-pill {
    display: none;
  }
}

@media (max-width: 640px) {
  .alert-strip {
    grid-template-columns: 1fr;
  }

  .funnel__arrow {
    display: none;
  }

  .funnel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .day-stats,
  .quick-grid,
  .profile-grid,
  .field-row,
  .sim-form__row {
    grid-template-columns: 1fr;
  }

  .parcelas {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Nav extras ========== */
.nav-item__tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: var(--gold-muted);
  padding: 3px 7px;
  border-radius: 999px;
  line-height: 1.2;
}

.nav-item__tag--maint {
  color: #a16207;
  background: rgba(232, 176, 6, 0.2);
}

.nav-item--hot.is-active .nav-item__tag,
.nav-item.is-active .nav-item__tag {
  background: rgba(255, 255, 255, 0.7);
}

.nav-item.is-active .nav-item__tag--maint {
  background: rgba(255, 255, 255, 0.75);
  color: #a16207;
}

.crumb-sep {
  color: rgba(20, 24, 31, 0.4);
  font-weight: 700;
  margin: 0;
  flex-shrink: 0;
}

/* ========== Goals combo — mensal + dia ========== */
.goals-combo {
  position: relative;
  margin-bottom: 0;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 248, 219, 0.5) 0%, #fff 28%);
  border: 1px solid #efe3b0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.goals-combo__glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.18), transparent 68%);
  pointer-events: none;
}

.goals-combo__block {
  position: relative;
  z-index: 1;
  padding: 16px 18px 14px;
}

.goals-combo__block--day {
  padding-top: 14px;
  background: rgba(255, 255, 255, 0.55);
}

/* ========== Meta do dia — arena + prêmio ========== */
.day-arena {
  position: relative;
}

.day-arena__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.day-arena__eyebrow {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.day-arena__top h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.day-arena__date {
  margin: 4px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.day-arena__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.day-arena__grid--solo {
  grid-template-columns: 1fr;
}

.day-progress-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  min-height: 100%;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.18), transparent 46%),
    radial-gradient(circle at 100% 100%, rgba(5, 150, 105, 0.1), transparent 40%),
    linear-gradient(165deg, #ffffff 0%, #f6f8f5 100%);
  border: 1px solid rgba(232, 220, 160, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Meta diária sem premiação — faixa full-width (como a meta mensal) */
.day-progress-card.day-progress-card--solo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
  min-height: 0;
  width: 100%;
  padding: 16px 18px;
}

.day-progress-card--solo .day-progress-card__head {
  width: 100%;
}

.day-progress-card--solo .day-progress-card__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 22px;
  align-items: center;
  width: 100%;
}

.day-progress-card--solo .day-progress-card__ring {
  width: 112px;
  height: 112px;
}

.day-progress-card--solo .day-progress-card__ring svg {
  width: 112px;
  height: 112px;
}

.day-progress-card--solo .day-progress-card__ring-text strong {
  font-size: 1.45rem;
}

.day-progress-card--solo .day-progress-card__track-block {
  width: 100%;
}

.day-progress-card--solo .day-progress-card__track {
  height: 14px;
}

.day-progress-card--solo .day-progress-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 10px;
}

.day-progress-card--solo .day-progress-metric {
  padding: 14px 16px;
}

.day-progress-card--solo .day-progress-metric strong {
  font-size: 1.18rem;
}

.day-progress-card.is-done {
  border-color: rgba(5, 150, 105, 0.35);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.16), transparent 46%),
    linear-gradient(165deg, #ffffff 0%, #f0fdf6 100%);
}

.day-progress-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.day-progress-card__status {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: rgba(245, 197, 24, 0.16);
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
}

.day-progress-card__status.is-done {
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.28);
}

.day-progress-card__hint {
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--muted);
}

.day-progress-card__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.day-progress-card__ring {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 18px rgba(5, 150, 105, 0.12));
}

.day-progress-card:not(.is-done) .day-progress-card__ring svg circle:last-of-type {
  animation: dayProgressPulse 2.4s ease-in-out infinite;
}

@keyframes dayProgressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.day-progress-card__ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.day-progress-card__ring-text strong {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  line-height: 1;
}

.day-progress-card__ring-text span {
  margin-top: 4px;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-progress-card__track-block {
  min-width: 0;
}

.day-progress-card__track-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-2);
}

.day-progress-card__track {
  height: 12px;
  border-radius: 999px;
  background: #e8ecf1;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(20, 24, 31, 0.06);
}

.day-progress-card__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8b006, #f5c518 40%, #22c55e);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
  transition: width 0.35s ease;
}

.day-progress-card__track-msg {
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--muted);
  line-height: 1.35;
}

.day-progress-card__track-msg b {
  color: var(--ink);
  font-weight: 750;
}

.day-progress-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.day-progress-metric {
  padding: 12px 12px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(228, 232, 239, 0.95);
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.03);
}

.day-progress-metric span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-progress-metric strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.day-progress-metric .is-meta { color: var(--gold-600); }
.day-progress-metric--live {
  background: linear-gradient(160deg, #ecfdf5, #fff);
  border-color: #a7f3d0;
}
.day-progress-metric--live strong { color: var(--ok); }
.day-progress-metric .is-lack { color: var(--danger); }

.day-jackpot {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 100%;
  padding: 22px 20px 20px;
  border-radius: 18px;
  color: #fff8db;
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 197, 24, 0.35), transparent 40%),
    linear-gradient(155deg, #1b222d 0%, #14181f 55%, #0f3d2e 140%);
  border: 1px solid rgba(245, 197, 24, 0.28);
  box-shadow: 0 14px 34px rgba(20, 24, 31, 0.22);
}

.day-jackpot__glow {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -40px;
  bottom: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.28), transparent 68%);
  pointer-events: none;
}

.day-jackpot__badge {
  position: relative;
  z-index: 1;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe082;
  background: rgba(245, 197, 24, 0.14);
  border: 1px solid rgba(245, 197, 24, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 4px;
}

.day-jackpot__trophy {
  position: relative;
  z-index: 1;
  margin: 2px 0 4px;
  filter: drop-shadow(0 8px 16px rgba(245, 197, 24, 0.35));
  animation: dayTrophyFloat 3.2s ease-in-out infinite;
}

@keyframes dayTrophyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.day-jackpot__kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 248, 219, 0.72);
}

.day-jackpot__value {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.day-jackpot__mode {
  position: relative;
  z-index: 1;
  margin: 2px 0 8px;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.35;
  color: rgba(255, 248, 219, 0.78);
  max-width: 28ch;
}

.day-jackpot__pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.day-jackpot__pill {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1b222d;
  background: #f5c518;
  border-radius: 999px;
  padding: 5px 9px;
}

.day-jackpot__pill--soft {
  color: #fff8db;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.day-podium-panel {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(245, 197, 24, 0.18), transparent 42%),
    linear-gradient(165deg, #1b222d 0%, #14181f 60%, #1a2430 100%);
  border: 1px solid rgba(245, 197, 24, 0.28);
  box-shadow: 0 14px 34px rgba(20, 24, 31, 0.2);
  color: #fff8db;
}

.day-podium-panel__glow {
  position: absolute;
  width: 140px;
  height: 140px;
  left: -30px;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22), transparent 70%);
  pointer-events: none;
}

.day-podium-panel__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe082;
}

.day-podium-panel__head h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
}

.day-podium-panel__head p:last-child {
  position: relative;
  z-index: 1;
  margin: 4px 0 14px;
  font-size: 0.8rem;
  color: rgba(255, 248, 219, 0.7);
  font-weight: 550;
}

.day-podium-panel__list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.day-podium-panel__list--1,
.day-podium-panel__list--2,
.day-podium-panel__list--3 {
  grid-template-columns: 1fr;
  width: 100%;
}

/* 1 prêmio: título no topo, quadro do prêmio centralizado no espaço livre */
.day-podium-panel--1 {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  height: 100%;
  box-sizing: border-box;
}

.day-podium-panel--1 .day-podium-panel__head {
  width: 100%;
  flex: 0 0 auto;
}

.day-podium-panel--1 .day-podium-panel__head p:last-child {
  margin-bottom: 0;
}

.day-podium-panel--1 .day-podium-panel__list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.day-podium-panel--1 .day-podium-card {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.day-podium-panel--1 .day-podium-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.day-podium-panel--1 .day-podium-card__pill {
  margin-left: auto;
}

.day-podium-panel--3 {
  padding: 14px 14px 12px;
}

.day-podium-panel--3 .day-podium-panel__head p:last-child {
  margin-bottom: 10px;
}

.day-podium-panel--3 .day-podium-panel__list {
  gap: 6px;
}

.day-podium-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.day-podium-panel--3 .day-podium-card {
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.day-podium-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.28));
}

.day-podium-card__icon svg {
  display: block;
}

.day-podium-panel--3 .day-podium-card__icon {
  width: 34px;
  height: 34px;
}

.day-podium-panel--3 .day-podium-card__icon svg {
  width: 32px;
  height: 32px;
}

.day-podium-card--gold .day-podium-card__icon {
  animation: dayTrophyFloat 3.2s ease-in-out infinite;
}

.day-podium-card__body {
  min-width: 0;
  flex: 1;
}

.day-podium-card__place {
  display: block;
  margin: 0 0 2px;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 248, 219, 0.62);
}

.day-podium-panel--3 .day-podium-card__place {
  margin-bottom: 0;
  font-size: 0.62rem;
}

.day-podium-card__body strong {
  display: block;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.day-podium-panel--3 .day-podium-card__body strong {
  font-size: 1.02rem;
}

.day-podium-card__body span {
  font-size: 0.74rem;
  font-weight: 650;
  color: rgba(255, 248, 219, 0.72);
}

.day-podium-panel--3 .day-podium-card__body span {
  font-size: 0.68rem;
}

.day-podium-card__pill {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1b222d;
  background: #f5c518;
  border-radius: 999px;
  padding: 5px 8px;
}

.day-podium-panel--3 .day-podium-card__pill {
  font-size: 0.6rem;
  padding: 4px 7px;
}

.day-podium-card--gold {
  border-color: rgba(245, 197, 24, 0.35);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.2), rgba(255, 255, 255, 0.05));
}

.day-podium-card--silver {
  border-color: rgba(197, 206, 219, 0.28);
  background: linear-gradient(135deg, rgba(197, 206, 219, 0.14), rgba(255, 255, 255, 0.04));
}

.day-podium-card--bronze {
  border-color: rgba(196, 122, 74, 0.35);
  background: linear-gradient(135deg, rgba(196, 122, 74, 0.16), rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .day-progress-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.12), transparent 46%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(245, 197, 24, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .day-progress-card.is-done {
  border-color: rgba(34, 197, 94, 0.35);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.14), transparent 46%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(5, 150, 105, 0.08));
}

html[data-theme="dark"] .day-progress-card__ring-track {
  stroke: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="dark"] .day-progress-card__track {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .day-progress-card__track i {
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.45);
}

html[data-theme="dark"] .day-progress-card__track-labels {
  color: rgba(255, 255, 255, 0.45);
}

html[data-theme="dark"] .day-progress-card__track-msg {
  color: rgba(255, 255, 255, 0.62);
}

html[data-theme="dark"] .day-progress-card__track-msg b,
html[data-theme="dark"] .day-progress-card__track-msg a {
  color: #fff;
}

html[data-theme="dark"] .day-progress-card__hint {
  color: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .day-progress-card__status {
  color: #ffe082;
  background: rgba(245, 197, 24, 0.16);
  border-color: rgba(245, 197, 24, 0.4);
}

html[data-theme="dark"] .day-progress-card__status.is-done {
  color: #6ee7b7;
  background: rgba(5, 150, 105, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

html[data-theme="dark"] .day-progress-metric {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .day-progress-metric--live {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(52, 211, 153, 0.32);
}

html[data-theme="dark"] .day-arena__eyebrow {
  color: #ffe082;
}

html[data-theme="dark"] .day-arena__date {
  color: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .goals-combo__dot::before {
  background: rgba(255, 255, 255, 0.22);
}

html[data-theme="dark"] .goals-combo__dot.is-on::before {
  background: #22c55e;
}

html[data-theme="dark"] .goals-combo__dot.is-mid::before {
  background: #f5c518;
}

html[data-theme="dark"] .goals-combo__dot.is-weekend::before {
  background: rgba(255, 255, 255, 0.28);
  opacity: 0.75;
}

html[data-theme="dark"] .goals-combo__dot.is-future::before {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.32);
}

html[data-theme="dark"] .goals-combo__dot-tip {
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 197, 24, 0.2), transparent 48%),
    linear-gradient(165deg, #252c38 0%, #151a22 100%);
  border-color: rgba(245, 197, 24, 0.4);
}

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

@media (max-width: 720px) {
  .day-progress-card--solo .day-progress-card__stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .day-progress-card--solo .day-progress-card__metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .day-progress-card__stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .day-progress-card__track-block {
    width: 100%;
  }

  .day-progress-card__metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .day-jackpot__trophy,
  .day-progress-card:not(.is-done) .day-progress-card__ring svg circle:last-of-type {
    animation: none;
  }
}

.goals-combo__divider {
  height: 1px;
  margin: 0 20px;
  background: linear-gradient(90deg, transparent, #e8dca0, transparent);
}

.goals-combo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.goals-combo__titles h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.goals-combo__titles time,
.goals-combo__titles p {
  display: inline-block;
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
}

.goals-combo__ring {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.goals-combo__ring--sm {
  width: 64px;
  height: 64px;
}

.goals-combo__ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  pointer-events: none;
}

.goals-combo__ring-text strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.goals-combo__ring--sm .goals-combo__ring-text strong {
  font-size: 0.92rem;
}

.goals-combo__ring-text span {
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.goals-combo__figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.goals-combo__fig {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(228, 232, 239, 0.95);
}

.goals-combo__fig span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.goals-combo__fig strong {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.goals-combo__fig--live {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.goals-combo__fig--live strong {
  color: var(--ok);
}

.goals-combo__fig .is-meta {
  color: var(--gold-600);
}

.goals-combo__fig .is-lack {
  color: var(--danger);
}

.goals-combo__track-wrap {
  margin-bottom: 14px;
}

.goals-combo__track-wrap--last {
  margin-bottom: 0;
}

.goals-combo__track {
  height: 8px;
  border-radius: 999px;
  background: #eceff3;
  overflow: hidden;
}

.goals-combo__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8b006, #f5c518 45%, #22c55e);
}

.goals-combo__ends {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--muted-2);
}

.goals-combo__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed #e8dca0;
}

.goals-combo__pace {
  display: flex;
  align-items: center;
  gap: 10px;
}

.goals-combo__pace-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.goals-combo__dots {
  display: flex;
  align-items: center;
  gap: 2px;
}

.goals-combo__dot {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  outline: none;
}

.goals-combo__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dde2ea;
  display: block;
}

.goals-combo__dot.is-on::before {
  background: var(--ok);
}

.goals-combo__dot.is-mid::before {
  background: var(--gold-500);
}

.goals-combo__dot.is-weekend::before {
  background: #cfd5df;
  opacity: 0.55;
}

.goals-combo__dot.is-future::before {
  background: transparent;
  border: 1.5px solid #cfd5df;
  box-sizing: border-box;
}

.goals-combo__dot-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  min-width: 118px;
  padding: 9px 11px 8px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 197, 24, 0.22), transparent 48%),
    linear-gradient(165deg, #1f2630 0%, #14181f 100%);
  border: 1px solid rgba(245, 197, 24, 0.35);
  box-shadow: 0 12px 28px rgba(20, 24, 31, 0.28);
  color: #fff8db;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
  z-index: 80;
}

.goals-combo__dot-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #14181f;
}

.goals-combo__dot-tip strong {
  display: block;
  margin: 0 0 3px;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe082;
}

.goals-combo__dot-tip em {
  display: block;
  font-style: normal;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
}

.goals-combo__dot-tip small {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  font-weight: 650;
  color: rgba(255, 248, 219, 0.72);
}

.goals-combo__dot:hover .goals-combo__dot-tip,
.goals-combo__dot:focus .goals-combo__dot-tip,
.goals-combo__dot:focus-visible .goals-combo__dot-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.goals-combo__dot.is-on .goals-combo__dot-tip small {
  color: #86efac;
}

.goals-combo__dot.is-mid .goals-combo__dot-tip small {
  color: #fde68a;
}

/* Evita o overflow do card cortar o tooltip das bolinhas */
.goals-combo:has(.goals-combo__dot:hover),
.goals-combo:has(.goals-combo__dot:focus),
.goals-combo:has(.goals-combo__dot:focus-visible) {
  overflow: visible;
}

.goals-combo__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 550;
}

.goals-combo__hint a,
.goals-combo__setup {
  color: var(--gold-600);
  font-weight: 700;
  text-decoration: none;
}

.goals-combo__hint a:hover,
.goals-combo__setup:hover {
  text-decoration: underline;
}

.goals-combo__setup {
  font-size: 0.95rem;
}

/* ========== Página Metas ========== */
.metas-hero--solo {
  margin-bottom: 18px;
}

.metas-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.metas-empresa-switch {
  margin: 0;
}

.metas-empresa-switch .field--inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.metas-empresa-switch .field--inline span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.metas-empresa-switch select {
  min-width: 200px;
}

.metas-studio {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 197, 24, 0.1), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  box-shadow: 0 10px 28px rgba(20, 24, 31, 0.04);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.metas-studio__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(228, 232, 239, 0.95);
  background: rgba(255, 255, 255, 0.72);
}

.metas-studio__hint {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--muted);
}

.metas-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #eef1f5;
  border: 1px solid rgba(228, 232, 239, 0.95);
}

.metas-tabs__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.metas-tabs__btn.is-active {
  background: linear-gradient(180deg, #ffe082, var(--gold-400));
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(232, 176, 6, 0.28);
}

.metas-pane {
  padding: 18px;
}

.metas-pane[hidden] {
  display: none !important;
}

.metas-pane__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.metas-editor,
.metas-rail {
  border: 1px solid rgba(228, 232, 239, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.metas-editor {
  padding: 18px;
  overflow: hidden;
}

.metas-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.metas-editor__head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.metas-chip {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: rgba(245, 197, 24, 0.16);
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.metas-chip.is-done {
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.28);
}

.metas-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metas-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metas-form__actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

.metas-form.is-busy,
.metas-rail__edit.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.metas-form.is-busy .btn--primary,
.metas-rail__edit.is-busy .btn--primary {
  min-width: 7.5rem;
}

.metas-premio-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metas-premio-picker__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.metas-premio-picker__label span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
}

.metas-premio-picker__label small {
  font-size: 0.72rem;
  color: var(--muted);
}

.metas-premio-picker__opts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metas-premio-picker__btn {
  appearance: none;
  border: 1px solid rgba(228, 232, 239, 0.95);
  background: #f7f8fb;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.metas-premio-picker__btn.is-active {
  border-color: rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.16);
  color: var(--ink);
}

.metas-premios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metas-premio-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(228, 232, 239, 0.95);
  background: #fafbfc;
  min-width: 0;
}

.metas-premio-card[hidden] {
  display: none !important;
}

.metas-premio-card__place {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
  background: #eef1f5;
}

.metas-premio-card--gold {
  border-color: rgba(245, 197, 24, 0.35);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.14), rgba(255, 255, 255, 0.7));
}
.metas-premio-card--gold .metas-premio-card__place {
  background: rgba(245, 197, 24, 0.28);
  color: #8a6a00;
}

.metas-premio-card--silver {
  border-color: rgba(183, 192, 205, 0.55);
  background: linear-gradient(135deg, rgba(183, 192, 205, 0.16), rgba(255, 255, 255, 0.7));
}
.metas-premio-card--silver .metas-premio-card__place {
  background: #dfe5ee;
  color: #4b5565;
}

.metas-premio-card--bronze {
  border-color: rgba(196, 122, 74, 0.35);
  background: linear-gradient(135deg, rgba(196, 122, 74, 0.14), rgba(255, 255, 255, 0.7));
}
.metas-premio-card--bronze .metas-premio-card__place {
  background: rgba(196, 122, 74, 0.22);
  color: #8a4b22;
}

.metas-premio-card__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.metas-premio-card__fields .field,
.metas-form .field {
  min-width: 0;
}

.metas-premio-card__fields input,
.metas-premio-card__fields select,
.metas-form input,
.metas-form select {
  max-width: 100%;
  box-sizing: border-box;
}

.metas-rail {
  padding: 14px;
  min-height: 280px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 251, 0.9));
}

.metas-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px 10px;
  border-bottom: 1px solid rgba(228, 232, 239, 0.9);
}

.metas-rail__head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--ink);
}

.metas-rail__head span {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink);
  background: rgba(245, 197, 24, 0.2);
}

.metas-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.metas-rail__item {
  border: 1px solid rgba(228, 232, 239, 0.95);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.metas-rail__item.is-active {
  border-color: rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.08);
}

.metas-rail__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.metas-rail__badge {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 800;
  color: #8a6a00;
  background: rgba(245, 197, 24, 0.22);
}

.metas-rail__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.metas-rail__copy strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.metas-rail__copy em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ok);
}

.metas-rail__copy small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.metas-rail__pct {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted);
}

.metas-rail__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 8px 8px;
}

.metas-rail__edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 12px 10px;
  min-width: 0;
}

.metas-rail__edit[hidden] {
  display: none !important;
}

.metas-rail__edit input {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.metas-rail__item.is-editing .metas-rail__link {
  opacity: 0.45;
  pointer-events: none;
}

.metas-rail__item.is-editing .metas-rail__actions {
  display: none !important;
}

.metas-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}

.metas-empty--soft {
  padding: 18px;
  border-radius: 12px;
  background: #f7f8fb;
  border: 1px dashed rgba(228, 232, 239, 0.95);
  text-align: left;
}

.metas-empty strong {
  color: var(--ink);
  font-size: 0.98rem;
}

@media (max-width: 920px) {
  .metas-pane__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .metas-form__row,
  .metas-premio-card__fields,
  .metas-premio-picker__opts {
    grid-template-columns: 1fr;
  }

  .metas-studio__bar {
    padding: 12px 14px;
  }

  .metas-pane {
    padding: 14px;
  }
}

/* legado histórico mensal (compat) */
.metas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metas-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.metas-item.is-active {
  border-color: rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.08);
}

.metas-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: inherit;
  flex-wrap: wrap;
}

.metas-item__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}

.metas-item__link:hover {
  background: rgba(245, 197, 24, 0.08);
}

.metas-item__money {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ok);
}

.metas-item__edit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

.metas-item__edit[hidden] {
  display: none !important;
}

.metas-item__value {
  margin: 0;
}

.metas-item__value input {
  width: 132px;
  max-width: 38vw;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.metas-item__value input:focus {
  outline: none;
  border-color: rgba(245, 197, 24, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.18);
}

.metas-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding-right: 4px;
}

.metas-item.is-editing .metas-item__actions [data-meta-edit-btn] {
  display: none;
}

.metas-item__del {
  margin: 0;
}

.metas-item__av {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #fff3bf, #f5c518);
  color: #5c4500;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
}

.metas-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metas-item__body strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

.metas-item__pct {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 999px;
  padding: 4px 9px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="dark"] .metas-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .metas-item__value input {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

html[data-theme="dark"] .metas-item.is-active {
  background: rgba(245, 197, 24, 0.1);
  border-color: rgba(245, 197, 24, 0.35);
}

html[data-theme="dark"] .metas-item__av {
  background: linear-gradient(145deg, #5c4a12, #c9a214);
  color: #fff8db;
}

@media (max-width: 900px) {
  .metas-layout {
    grid-template-columns: 1fr;
  }
}

.goals-combo__hint b {
  color: var(--ink);
  font-weight: 750;
}

@media (max-width: 800px) {
  .goals-combo__figures {
    grid-template-columns: 1fr;
  }

  .goals-combo__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.day-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.day-stats span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.day-stats strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}

.t-blue { color: #2563eb; }
.t-ok { color: var(--ok); }
.t-danger { color: var(--danger); }

.progress--light {
  background: var(--line);
}

.day-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.quick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick:hover {
  transform: translateY(-2px);
  border-color: var(--gold-500);
}

.quick__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-2);
  flex-shrink: 0;
}

.quick__icon--gold {
  background: var(--gold-soft);
  color: var(--gold-600);
}

.quick strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
}

.quick small {
  color: var(--muted);
  font-size: 0.78rem;
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.admin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-2);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-links a:hover {
  background: var(--gold-soft);
  border-color: #f0df8a;
}

.btn--on-dark {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn--lg {
  padding: 12px 18px;
  height: fit-content;
  align-self: end;
  margin-bottom: 22px;
}

/* ========== Simulações ========== */
.sim-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sim-panel__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
}

.sim-panel__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sim-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.sim-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
}

.field small {
  color: var(--muted);
  font-size: 0.78rem;
}

.field input,
.field select {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.field input:focus,
.field select:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(232, 176, 6, 0.18);
}

.parcelas {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.parcela {
  padding: 12px 8px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-weight: 750;
  font-family: var(--display);
  color: var(--ink-2);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.parcela:hover {
  border-color: var(--gold-500);
}

.parcela.is-active {
  background: var(--ink);
  color: var(--gold-400);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.offer {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fff8db, #fff);
  border: 1px solid #f0df8a;
  transition: box-shadow 0.25s ease;
}

.offer.is-pulse {
  box-shadow: 0 0 0 4px rgba(232, 176, 6, 0.25);
}

.offer__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.offer__brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
}

.offer__brand span {
  font-size: 0.8rem;
  color: var(--muted);
}

.offer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer__links a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.offer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.offer__grid > div {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.offer__grid span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.offer__grid strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 750;
}

.offer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-hint {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========== Perfil ========== */
.profile-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.info-list dt {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 650;
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.role-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
}

@media (max-width: 1100px) {
  .split-grid,
  .profile-grid,
  .offer__grid {
    grid-template-columns: 1fr;
  }

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

  .parcelas {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== Login / acesso ========== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0f1218;
  overflow-x: hidden;
}

.login-split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  width: 100%;
  max-width: 100%;
}

/* —— Painel visual (esquerda) —— */
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 36px clamp(20px, 4vw, 48px) 32px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  background:
    linear-gradient(155deg, #1a1f29 0%, #14181f 42%, #1c1810 100%);
}

.login-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.login-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.login-hero__orb--1 {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.45), transparent 68%);
  animation: login-orb 10s ease-in-out infinite;
}

.login-hero__orb--2 {
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  bottom: 8%;
  left: -60px;
  background: radial-gradient(circle, rgba(232, 176, 6, 0.22), transparent 70%);
  animation: login-orb 12s ease-in-out infinite reverse;
}

.login-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}

.login-hero__shine {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 35%, rgba(245, 197, 24, 0.08) 50%, transparent 65%);
  animation: login-shine 7s ease-in-out infinite;
}

@keyframes login-orb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-18px, 14px) scale(1.05);
  }
}

@keyframes login-shine {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-4%);
  }
  50% {
    opacity: 1;
    transform: translateX(4%);
  }
}

.login-hero__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: login-rise 0.55s ease both;
}

.login-logo {
  display: block;
  width: min(300px, 100%);
  max-width: 100%;
  height: auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.35));
  user-select: none;
}

.login-hero__body {
  max-width: 480px;
  width: 100%;
  padding: 24px 0;
  animation: login-rise 0.65s ease 0.08s both;
  min-width: 0;
}

.login-hero__eyebrow {
  margin: 0 0 14px;
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 197, 24, 0.14);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-hero__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.6vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
  overflow-wrap: anywhere;
}

.login-hero__title em {
  font-style: normal;
  color: var(--gold-400);
}

.login-hero__lead {
  margin: 18px 0 0;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
  max-width: 38ch;
}

.login-hero__points {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

.login-hero__points li:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(245, 197, 24, 0.35);
  transform: translateX(4px);
}

.login-hero__point-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(245, 197, 24, 0.15);
  color: var(--gold-400);
}

.login-hero__points strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.login-hero__points span {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  overflow-wrap: anywhere;
}

.login-hero__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  animation: login-rise 0.7s ease 0.14s both;
}

.login-hero__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-500);
  flex-shrink: 0;
}

/* —— Painel do formulário (direita) —— */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(16px, 4vw, 28px);
  min-width: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(245, 197, 24, 0.12), transparent 55%),
    var(--bg);
}

.login-panel__inner {
  width: 100%;
  max-width: 400px;
  animation: login-rise 0.55s ease 0.12s both;
}

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

.login-panel__head {
  margin-bottom: 26px;
}

.login-panel__eyebrow {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.login-panel__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.login-panel__sub {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.login-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .field {
  min-width: 0;
}

.login-form .field input {
  width: 100%;
  max-width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem; /* evita zoom automático no iOS */
  box-sizing: border-box;
}

.login-form__pass {
  position: relative;
  min-width: 0;
}

.login-form__pass input {
  padding-right: 48px;
}

.login-form__eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.login-form__eye:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.login-form__submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 14px 18px;
  font-size: 0.98rem;
  border-radius: 12px;
}

.login-panel__hint {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.4;
}

/* Tablet / landscape estreito */
@media (max-width: 1100px) {
  .login-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .login-hero__points li:nth-child(n + 3) {
    display: none;
  }
}

/* Empilha: mobile e tablet vertical */
@media (max-width: 900px) {
  .login-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero {
    min-height: auto;
    padding: 28px 20px 24px;
    padding-top: max(28px, env(safe-area-inset-top));
    gap: 16px;
  }

  .login-hero__body {
    padding: 12px 0 0;
  }

  .login-hero__title {
    font-size: clamp(1.7rem, 6vw, 2.25rem);
  }

  .login-hero__title br {
    display: none;
  }

  .login-hero__lead {
    max-width: none;
  }

  .login-hero__points {
    margin-top: 20px;
  }

  .login-hero__points li:nth-child(n + 2) {
    display: none;
  }

  .login-hero__points li:hover {
    transform: none;
  }

  .login-panel {
    padding: 28px 20px max(40px, env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .login-panel__inner {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Celular */
@media (max-width: 560px) {
  .login-logo {
    width: min(220px, 85%);
  }

  .login-hero {
    padding: 22px 16px 18px;
  }

  .login-hero__eyebrow {
    margin-bottom: 10px;
  }

  .login-hero__lead {
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .login-hero__points,
  .login-hero__foot {
    display: none;
  }

  .login-panel {
    padding: 24px 16px max(32px, env(safe-area-inset-bottom));
  }

  .login-panel__head {
    margin-bottom: 20px;
  }

  .login-form__submit {
    min-height: 48px;
  }
}

/* Telas baixas (notebook / landscape mobile) */
@media (max-height: 720px) and (min-width: 901px) {
  .login-hero {
    padding-top: 24px;
    padding-bottom: 20px;
    gap: 12px;
  }

  .login-hero__body {
    padding: 8px 0;
  }

  .login-hero__points {
    margin-top: 16px;
    gap: 8px;
  }

  .login-hero__points li {
    padding: 10px 12px;
  }

  .login-hero__points li:nth-child(n + 3) {
    display: none;
  }

  .login-hero__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
  }

  .login-panel {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-hero__orb,
  .login-hero__shine,
  .login-hero__brand,
  .login-hero__body,
  .login-hero__foot,
  .login-panel__inner {
    animation: none !important;
  }

  .login-hero__points li:hover {
    transform: none;
  }
}

/* ========== Usuários & acessos ========== */
.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  border: 1px solid transparent;
}

.flash--ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
  color: var(--ok);
}

.flash--error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.users-panel .panel__head {
  margin-bottom: 8px;
}

.users-panel {
  overflow: hidden;
}

.table-wrap--users {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.users-table {
  table-layout: fixed;
  width: 100%;
  min-width: 720px;
}

.users-table th,
.users-table td {
  padding: 10px 10px;
}

.users-table .th-num,
.users-table .td-num {
  width: 72px;
  text-align: right;
  white-space: nowrap;
}

.users-table .th-actions,
.users-table .td-actions {
  width: 220px;
}

.users-table .person {
  min-width: 0;
  gap: 10px;
}

.users-table .person__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.users-table .person__meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person__you {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  vertical-align: middle;
  background: var(--gold-soft);
  color: #8a6a00;
}

.users-table code.users-login {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.cell-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px !important;
}

.users-table tr.is-inactive td {
  opacity: 0.62;
}

.users-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.users-table .td-actions {
  position: sticky;
  right: 0;
  background: var(--surface, #fff);
  box-shadow: -8px 0 12px -10px rgba(20, 24, 31, 0.28);
  z-index: 1;
}

.users-table thead .th-actions {
  position: sticky;
  right: 0;
  background: var(--surface, #fff);
  z-index: 2;
  box-shadow: -8px 0 12px -10px rgba(20, 24, 31, 0.28);
}

.users-inline-form {
  display: inline;
  margin: 0;
}

.btn--sm {
  padding: 6px 9px;
  font-size: 0.78rem;
  border-radius: 9px;
  white-space: nowrap;
}

.badge-nivel {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  background: #f1f5f9;
  color: var(--muted);
}

.badge-nivel--master {
  background: #111827;
  color: var(--gold-400);
}

.badge-nivel--admin {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-nivel--gerente {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-nivel--colab {
  background: var(--ok-soft);
  color: var(--ok);
}

.users-hierarchy,
.users-hierarchy__list {
  display: none !important;
}

.nav-sub a.is-active {
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 700;
}

.nav-sub a.is-active::before {
  background: var(--gold-500);
}

@media (max-width: 900px) {
  .users-table {
    min-width: 0;
    table-layout: auto;
  }

  .users-table thead {
    display: none;
  }

  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td {
    display: block;
    width: 100%;
  }

  .users-table tr {
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
  }

  .users-table tr:last-child {
    margin-bottom: 0;
  }

  .users-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    text-align: right;
  }

  .users-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .users-table td:first-child {
    padding-top: 0;
    justify-content: flex-start;
    text-align: left;
  }

  .users-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-2);
    text-align: left;
    flex-shrink: 0;
  }

  .users-table td:first-child::before {
    display: none;
  }

  .users-table .td-num {
    text-align: right;
  }

  .users-table td[data-label="Ações"],
  .users-table .td-actions {
    position: static;
    box-shadow: none;
    background: transparent;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    width: auto;
  }

  .users-table td[data-label="Ações"]::before {
    margin-bottom: 6px;
  }

  .users-table .users-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .users-table .users-actions .btn,
  .users-table .users-inline-form {
    width: 100%;
  }

  .users-table .users-inline-form .btn {
    width: 100%;
  }

  .users-panel .table-wrap,
  .table-wrap--users {
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .page-head__actions {
    width: 100%;
  }

  .page-head__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

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

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 31, 0.45);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 18px 18px 16px;
  animation: login-rise 0.25s ease both;
}

.modal__dialog--wide {
  width: min(980px, 100%);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 750;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.modal__close:hover {
  color: var(--ink);
  background: #fff;
}

.user-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.user-cats {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.user-cats legend {
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
}

.user-cats__hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.user-cats__hint--gestao {
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gold-soft);
  border: 1px solid rgba(232, 176, 6, 0.28);
  color: var(--ink-2);
  font-weight: 650;
}

html[data-theme="dark"] .user-cats__hint--gestao {
  background: rgba(245, 197, 24, 0.12);
  border-color: rgba(245, 197, 24, 0.22);
  color: var(--ink-2);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-600);
}

.check--ativo {
  margin-top: 2px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.modal__dialog--confirm {
  width: min(440px, 100%);
}

.modal__confirm-text {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}

.btn--danger:hover {
  filter: brightness(1.05);
  color: #fff;
}

body.is-modal-open {
  overflow: hidden;
}

.user-form .field small {
  margin-top: 2px;
}

@media (max-width: 700px) {
  .users-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal {
    padding: 10px;
    align-items: end;
  }

  .modal__dialog {
    width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 12px 12px;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== Configurações ========== */
.config-panel .panel__head {
  margin-bottom: 16px;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
}

.config-form__actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.config-preview-toggle {
  margin: 0;
  user-select: none;
}

.config-preview[hidden] {
  display: none !important;
}

.config-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-preview__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.config-preview__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd84a 0%, var(--gold-400) 55%, #eab308 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.config-preview__bar .brand__mark {
  width: 36px;
  height: 36px;
  font-size: 1.05rem;
}

.config-preview__bar strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--ink);
}

/* ========== Meu perfil ========== */
.profile-panel {
  margin-bottom: 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.profile-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-400);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.profile-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.profile-hero__meta strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 750;
  line-height: 1.2;
}

.profile-hero__meta span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-badge--ok {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.profile-badge--off {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.profile-badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.config-sync {
  padding: 0;
  overflow: hidden;
}

.config-sync__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.config-sync__toggle:hover {
  background: rgba(245, 197, 24, 0.06);
}

.config-sync__toggle-text {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.config-sync__toggle-text strong {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.config-sync__toggle-text span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

.config-sync__chev {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

.config-sync.is-open > .config-sync__toggle .config-sync__chev {
  transform: rotate(180deg);
}

.config-sync__body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.config-sync.is-open > .config-sync__body {
  display: block;
}

.config-sync__body > .flash {
  margin-top: 16px;
}

.config-sync-form {
  padding-top: 16px;
}

.config-sync__meters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.config-sync__meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.config-sync__meter i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.config-sync__meter--ok i { background: var(--ok); }
.config-sync__meter--warn i { background: var(--warn); }
.config-sync__meter--off i { background: var(--danger); }

.config-sync__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.config-sync__seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.config-sync__seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.config-sync__seg-btn:hover {
  color: var(--ink);
  background: rgba(245, 197, 24, 0.16);
}

.config-sync__count {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
}

.config-sync__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.config-sync__row {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.config-sync__row:last-child {
  border-bottom: 0;
}

.config-sync__label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.12s ease;
}

.config-sync__label:hover {
  background: rgba(245, 197, 24, 0.06);
}

.config-sync__row.is-checked .config-sync__label {
  background: rgba(245, 197, 24, 0.1);
}

.config-sync__label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
  accent-color: #14181f;
  cursor: pointer;
}

.config-sync__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-sync__meta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.config-sync__meta code {
  font-size: 0.74rem;
  color: var(--muted);
  background: none;
  padding: 0;
}

.config-sync__state {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
  min-width: 118px;
}

.config-sync__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--muted-2);
}

.config-sync__dot--ok { background: var(--ok); }
.config-sync__dot--outdated { background: var(--warn); }
.config-sync__dot--missing { background: var(--danger); }

.config-sync__status-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-2);
  line-height: 1.25;
}

.config-sync__status-txt small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.74rem;
}

.config-sync__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.config-sync__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 36ch;
}

.config-sync-modal-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.config-sync-modal-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.config-sync-modal-list li:last-child {
  border-bottom: 0;
}

.config-sync-modal-list strong {
  font-size: 0.9rem;
}

.config-sync-modal-list code {
  font-size: 0.74rem;
  color: var(--muted);
  background: none;
  padding: 0;
}

.config-tables-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.config-tables-result.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

html[data-theme="dark"] .config-sync__toggle:hover {
  background: rgba(245, 197, 24, 0.08);
}

html[data-theme="dark"] .config-sync__body {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .config-sync__seg {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .config-sync__list {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .config-sync__row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .config-sync__label:hover,
html[data-theme="dark"] .config-sync__row.is-checked .config-sync__label {
  background: rgba(245, 197, 24, 0.1);
}

html[data-theme="dark"] .config-sync__label input[type="checkbox"] {
  accent-color: var(--gold-400);
}

html[data-theme="dark"] .config-sync-modal-list {
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .config-sync-modal-list li {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .profile-badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

@media (max-width: 640px) {
  .config-sync__label {
    flex-wrap: wrap;
  }

  .config-sync__state {
    width: 100%;
    padding-left: 28px;
    min-width: 0;
  }
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.profile-facts > div {
  min-width: 0;
}

.profile-facts dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-grid .config-form {
  max-width: none;
}

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

.muted-note {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.empresa-admin-box {
  margin-top: 4px;
}

/* ========== Config por empresa ========== */
.config-back {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
}

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

.config-form--wide {
  max-width: 640px;
}

.config-section-title {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 24, 31, 0.08);
}

.config-section-title h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}

.config-section-title p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.config-section-title code {
  font-size: 0.8rem;
  background: rgba(20, 24, 31, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

.config-panel .panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.config-empresa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-empresa-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 248, 219, 0.35);
  border: 1px solid rgba(20, 24, 31, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.config-empresa-card.is-inactive {
  opacity: 0.72;
}

.config-empresa-card:hover {
  background: rgba(255, 248, 219, 0.85);
  border-color: rgba(234, 179, 8, 0.45);
  transform: translateY(-1px);
  color: inherit;
}

.config-empresa-card__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-400);
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.config-empresa-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-empresa-card__body strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}

.config-empresa-card__body span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 550;
}

.config-empresa-card__chev {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 700;
}

/* ========== Abas Ativos / Inativos (regra de listagens) ========== */
.list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.list-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.list-tabs__btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.list-tabs__btn.is-active {
  color: var(--ink);
  background: var(--surface, #fff);
  box-shadow: 0 1px 3px rgba(20, 24, 31, 0.08);
}

.list-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(20, 24, 31, 0.08);
  color: var(--ink-2);
}

.list-tabs__btn.is-active .list-tabs__count {
  background: rgba(234, 179, 8, 0.22);
  color: #8a6a00;
}

html[data-theme="dark"] .list-tabs__btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .list-tabs__btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

html[data-theme="dark"] .list-tabs__count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

html[data-theme="dark"] .list-tabs__btn.is-active .list-tabs__count {
  background: rgba(234, 179, 8, 0.25);
  color: #f5d76e;
}

html[data-theme="dark"] .users-table .td-actions,
html[data-theme="dark"] .users-table thead .th-actions {
  background: var(--surface);
}

/* ========== Tokens Umbler ========== */
.token-search-panel {
  margin-bottom: 16px;
}

.token-search-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.token-bearer-field {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.token-bearer-field__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.token-bearer-field input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
  background: transparent !important;
  color: var(--ink);
}

.token-bearer-field:focus-within {
  border-color: rgba(234, 179, 8, 0.7);
}

.token-search-modal-form {
  margin-bottom: 8px;
}

.token-search-modal-form__actions {
  margin-top: 4px;
}

.token-search-status {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft, #ecfdf5);
  color: var(--ok, #047857);
  font-size: 0.88rem;
  line-height: 1.4;
}

.token-search-status.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.token-search-results {
  margin-top: 4px;
}

.token-search-results .list-tabs {
  margin-bottom: 10px;
}

.token-search-wrap {
  margin-top: 4px;
  max-height: min(48vh, 420px);
  overflow: auto;
}

.token-search-table .muted-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.token-search-warn {
  color: var(--warn) !important;
  margin-top: 4px;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}

.token-badge--ok {
  background: var(--ok-soft, #ecfdf5);
  color: var(--ok, #047857);
}

#tokenApiModal {
  z-index: 90;
}

@media (max-width: 800px) {
  .token-search-panel__head .btn {
    width: 100%;
    justify-content: center;
  }
}

.token-empresa-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.token-empresa-switch__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.token-empresa-switch select {
  min-width: 220px;
  max-width: min(100%, 320px);
  padding: 10px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.token-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.token-layout--list-only {
  grid-template-columns: 1fr;
}

.token-panel {
  margin: 0;
}

.token-panel--form {
  position: sticky;
  top: calc(var(--topbar-h, 64px) + 16px);
}

.token-panel--form.is-editing {
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.45), var(--shadow-sm, 0 4px 14px rgba(20, 24, 31, 0.06));
}

.token-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px 4px;
}

.token-form .field {
  margin: 0;
}

.token-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.token-form textarea:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.25);
}

.token-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.token-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 48px 24px;
  color: var(--muted);
}

.token-empty[hidden],
.token-list[hidden] {
  display: none !important;
}

.token-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(245, 197, 24, 0.14);
  color: var(--ink);
  margin-bottom: 4px;
}

.token-empty strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}

.token-empty span {
  font-size: 0.9rem;
  max-width: 260px;
}

.token-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.token-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--surface) 42%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.token-item:hover {
  border-color: rgba(234, 179, 8, 0.45);
  box-shadow: var(--shadow-sm);
}

.token-item__av {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #14181f;
  color: var(--gold-400);
  font-family: var(--display);
  font-weight: 750;
  font-size: 0.78rem;
}

.token-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.token-item__top strong {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 750;
}

.token-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.token-item__meta,
.token-item__secret {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.token-chip {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-chip--org {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

html[data-theme="dark"] .token-chip--org {
  background: rgba(147, 197, 253, 0.12);
  border-color: rgba(147, 197, 253, 0.28);
  color: #93c5fd;
}

.token-mask {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--muted);
  background: transparent;
  padding: 0;
}

.token-copy {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.token-copy:hover {
  background: rgba(245, 197, 24, 0.2);
}

.btn--danger-text {
  color: #b91c1c !important;
}

.btn--danger-text:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

.flash a {
  margin-left: 8px;
  font-weight: 700;
  color: inherit;
}

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

  .token-panel--form {
    position: static;
  }
}

/* ========== Modo escuro (visual da entrada) ========== */
.theme-toggle__icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

html[data-theme="dark"] {
  --ink: #f5f7fa;
  --ink-2: #d5dbe4;
  --muted: rgba(255, 255, 255, 0.62);
  --muted-2: rgba(255, 255, 255, 0.42);

  --bg: #12151c;
  --surface: #1b212b;
  --surface-2: #242b36;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --gold-soft: rgba(245, 197, 24, 0.14);
  --gold-muted: rgba(245, 197, 24, 0.2);
  --gold-600: #f5c518;

  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);

  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 46% 34% at 100% -6%, rgba(245, 197, 24, 0.22), transparent 58%),
    radial-gradient(ellipse 34% 28% at -8% 108%, rgba(232, 176, 6, 0.14), transparent 62%),
    linear-gradient(165deg, #1a1f29 0%, #12151c 48%, #17140f 100%);
  background-attachment: fixed;
}

html[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, #1c222e 0%, #14181f 100%);
  border-bottom: 1px solid rgba(245, 197, 24, 0.32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  color: #f5f7fa;
}

html[data-theme="dark"] .topbar__menu-toggle,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .crumb,
html[data-theme="dark"] .user-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

html[data-theme="dark"] .topbar__menu-toggle:hover,
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .crumb:hover,
html[data-theme="dark"] a.user-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: none;
}

html[data-theme="dark"] .theme-toggle[aria-pressed="true"] {
  background: rgba(245, 197, 24, 0.18);
  color: var(--gold-400);
  border-color: rgba(245, 197, 24, 0.4);
}

html[data-theme="dark"] .crumb-current,
html[data-theme="dark"] .crumb-sep,
html[data-theme="dark"] .brand__text span,
html[data-theme="dark"] .user-chip__meta span {
  color: rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .icon-btn__dot {
  border-color: #14181f;
}

html[data-theme="dark"] a.user-chip.is-active {
  outline-color: rgba(245, 197, 24, 0.55);
}

html[data-theme="dark"] .brand__mark,
html[data-theme="dark"] .user-chip__avatar,
html[data-theme="dark"] .profile-hero__avatar,
html[data-theme="dark"] .config-empresa-card__mark {
  background: var(--gold-400);
  color: #14181f;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.22);
}

html[data-theme="dark"] .config-preview__bar .brand__mark {
  background: #14181f;
  color: var(--gold-400);
  box-shadow: none;
}

html[data-theme="dark"] .config-preview__bar strong {
  color: #14181f;
}

html[data-theme="dark"] .sidebar {
  background: rgba(16, 19, 26, 0.92);
  border-right-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .sidebar-tip {
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.16), rgba(255, 255, 255, 0.04));
  border-color: rgba(245, 197, 24, 0.28);
}

html[data-theme="dark"] .nav-item.is-active .nav-item__tag {
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold-400);
}

html[data-theme="dark"] .btn--primary,
html[data-theme="dark"] .parcela.is-active {
  background: #0c0f14;
  color: var(--gold-400);
  border-color: rgba(245, 197, 24, 0.45);
}

html[data-theme="dark"] .kpi--hero,
html[data-theme="dark"] .status-card--money,
html[data-theme="dark"] .offer {
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.14), rgba(255, 255, 255, 0.03));
  border-color: rgba(245, 197, 24, 0.28);
}

html[data-theme="dark"] .kpi__icon--money {
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}

html[data-theme="dark"] .kpi__icon--conv,
html[data-theme="dark"] .status--caixa {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .status-card--info strong,
html[data-theme="dark"] .t-blue {
  color: #93c5fd;
}

html[data-theme="dark"] .goals-combo {
  background: linear-gradient(180deg, rgba(245, 197, 24, 0.12) 0%, #1b212b 34%);
  border-color: rgba(245, 197, 24, 0.24);
}

html[data-theme="dark"] .goals-combo__block--day {
  background: rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .goals-combo__divider {
  background: linear-gradient(90deg, transparent, rgba(245, 197, 24, 0.35), transparent);
}

html[data-theme="dark"] .goals-combo__fig,
html[data-theme="dark"] .product-pill,
html[data-theme="dark"] .offer__links a,
html[data-theme="dark"] .offer__grid > div {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .goals-combo__fig--live {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
}

html[data-theme="dark"] .goals-combo__track {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .goals-combo__footer {
  border-top-color: rgba(245, 197, 24, 0.25);
}


html[data-theme="dark"] .goals-combo__ring circle[stroke="#e8ecf1"] {
  stroke: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .funnel__step--caixa {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(147, 197, 253, 0.35);
}

html[data-theme="dark"] .alert-chip--danger,
html[data-theme="dark"] .flash--error {
  border-color: rgba(248, 113, 113, 0.35);
}

html[data-theme="dark"] .alert-chip--warn,
html[data-theme="dark"] .funnel__step--warn {
  border-color: rgba(251, 191, 36, 0.35);
}

html[data-theme="dark"] .alert-chip--ok,
html[data-theme="dark"] .funnel__step--ok,
html[data-theme="dark"] .flash--ok {
  border-color: rgba(52, 211, 153, 0.35);
}

html[data-theme="dark"] .prio--low,
html[data-theme="dark"] .badge-nivel {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .token-form textarea,
html[data-theme="dark"] .modal__close:hover {
  background: #12161e;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder,
html[data-theme="dark"] .token-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

html[data-theme="dark"] .config-empresa-card {
  background: rgba(245, 197, 24, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .config-empresa-card:hover {
  background: rgba(245, 197, 24, 0.16);
  border-color: rgba(245, 197, 24, 0.4);
}

html[data-theme="dark"] .config-section-title {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .config-section-title code,
html[data-theme="dark"] .token-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink-2);
}

html[data-theme="dark"] .profile-badge--ok {
  color: #34d399;
}

html[data-theme="dark"] .profile-badge--off,
html[data-theme="dark"] .btn--danger-text {
  color: #f87171 !important;
}

html[data-theme="dark"] .btn--danger-text:hover {
  background: rgba(248, 113, 113, 0.12) !important;
}

html[data-theme="dark"] .person__av {
  --bg: rgba(245, 197, 24, 0.16);
  --fg: #f5c518;
}

/* Tokens Umbler — modo noturno */
html[data-theme="dark"] .modal__backdrop {
  background: rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .token-bearer-field {
  background: #12161e;
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .token-bearer-field__prefix {
  background: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .token-bearer-field input {
  color: var(--ink);
}

html[data-theme="dark"] .token-bearer-field:focus-within {
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.12);
}

html[data-theme="dark"] .token-empresa-switch select {
  background: #12161e;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

html[data-theme="dark"] .token-search-status {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

html[data-theme="dark"] .token-search-status.is-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.32);
}

html[data-theme="dark"] .token-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .token-badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

html[data-theme="dark"] .token-item {
  background: linear-gradient(180deg, rgba(245, 197, 24, 0.08) 0%, var(--surface) 48%);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .token-item:hover {
  border-color: rgba(245, 197, 24, 0.4);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .token-item__av {
  background: #0c0f14;
  color: var(--gold-400);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 24, 0.28);
}

html[data-theme="dark"] .token-empty__icon {
  background: rgba(245, 197, 24, 0.14);
  color: var(--gold-400);
}

html[data-theme="dark"] .token-empty strong {
  color: var(--ink);
}

html[data-theme="dark"] .token-copy {
  color: var(--ink-2);
}

html[data-theme="dark"] .token-copy:hover {
  background: rgba(245, 197, 24, 0.18);
  color: var(--gold-400);
}

html[data-theme="dark"] .token-mask {
  color: rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .token-search-wrap {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .token-search-table th {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .token-search-table td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: var(--ink-2);
}

html[data-theme="dark"] .token-search-table tr.is-inactive td {
  opacity: 0.55;
}

html[data-theme="dark"] .token-search-table code.users-login {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .modal__confirm-text {
  color: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .modal__confirm-text a {
  color: var(--gold-400);
}

html[data-theme="dark"] .modal__close {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink-2);
}

html[data-theme="dark"] .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

html[data-theme="dark"] .page-head h1 {
  color: var(--ink);
}

html[data-theme="dark"] .page-head p {
  color: var(--muted);
}

html[data-theme="dark"] .flash {
  border-width: 1px;
  border-style: solid;
}

html[data-theme="dark"] .flash--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

html[data-theme="dark"] .flash--error {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ========== Propostas (prototipo visual) ========== */
.prop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(320px, 100%);
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
}

.prop-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}

.prop-search input::placeholder {
  color: var(--muted-2);
}

.prop-board {
  margin-bottom: var(--gap);
}

.prop-filter-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.prop-filter-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.prop-filter-card.is-active {
  box-shadow: 0 0 0 2px rgba(232, 176, 6, 0.45), var(--shadow-sm);
  border-color: rgba(232, 176, 6, 0.55);
}

.main:has(.prop-panel) {
  min-height: calc(100dvh - var(--topbar-h));
  min-height: calc(100vh - var(--topbar-h));
  padding-bottom: 20px;
}

.prop-panel {
  padding: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.prop-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}

.prop-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.prop-chip {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.prop-chip:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

.prop-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.prop-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.prop-select select {
  appearance: none;
  padding: 7px 32px 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364708a' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.prop-list-meta {
  padding: 10px 16px 0;
  flex-shrink: 0;
}

.prop-list-meta p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.prop-list-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.prop-mock-tag {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-muted);
  color: var(--gold-600);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.prop-table-wrap {
  margin: 0;
  padding: 4px 0 0;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 180px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.prop-page-hint {
  color: var(--muted-2);
  font-weight: 600;
}

.prop-pager__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.prop-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.prop-table th,
.prop-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.prop-table th:first-child,
.prop-table td:first-child {
  padding-left: 16px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 4px 0 8px -6px rgba(20, 24, 31, 0.18);
}

.prop-table th:first-child {
  background: var(--surface);
  z-index: 2;
}

.prop-table tbody tr:hover td:first-child {
  background: var(--surface-2);
}

.prop-table .person {
  min-width: 0;
  max-width: 220px;
}

.prop-table .person > div {
  min-width: 0;
}

.prop-table .person strong,
.prop-table .person small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.prop-table th:last-child,
.prop-table td:last-child {
  padding-right: 16px;
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: -4px 0 8px -6px rgba(20, 24, 31, 0.18);
}

.prop-table th:last-child {
  z-index: 2;
}

.prop-table tbody tr:hover td:last-child {
  background: var(--surface-2);
}

.prop-th-actions {
  text-align: right;
}

.status--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status--info {
  background: #eff6ff;
  color: #2563eb;
}

.prop-tipo {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-2);
}

.prop-tipo--refin {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.prop-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--muted);
}

.prop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.prop-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.prop-action:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-2);
}

.prop-action--sync:hover {
  background: rgba(245, 197, 24, 0.16);
  border-color: rgba(245, 197, 24, 0.45);
  color: var(--ink);
}
.prop-action--perdido {
  color: #b91c1c;
}
.prop-action--perdido:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(220, 38, 38, 0.4);
  color: #991b1b;
}
.prop-action--sync.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.prop-action--sync.is-busy svg {
  animation: propSyncSpin 0.8s linear infinite;
}
.prop-action--sync.is-ok {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(22, 163, 74, 0.4);
  color: #166534;
}
.prop-action--sync.is-err {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(220, 38, 38, 0.4);
  color: #991b1b;
}
@keyframes propSyncSpin {
  to { transform: rotate(-360deg); }
}

.prop-action--wa {
  color: #128c7e;
}

.prop-action--wa:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.prop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 48px 20px;
}

.prop-empty[hidden] {
  display: none !important;
}

.prop-empty__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted);
  margin-bottom: 6px;
}

.prop-empty strong {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.prop-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.prop-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  flex-shrink: 0;
}

.prop-pager__info {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.prop-pager[hidden] {
  display: none !important;
}

.prop-pager__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-page {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--muted);
}

.prop-page:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.prop-page.is-active {
  background: var(--ink);
  color: #fff;
}

.prop-page-ellipsis {
  color: var(--muted-2);
  padding: 0 4px;
}

.prop-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .page-head__actions .prop-search {
    width: 100%;
    min-width: 0;
  }

  .prop-toolbar__right {
    justify-content: stretch;
  }

  .prop-select {
    flex: 1;
    min-width: 0;
  }

  .prop-select select {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .prop-table thead {
    display: none;
  }

  .prop-table,
  .prop-table tbody,
  .prop-table tr,
  .prop-table td {
    display: block;
    width: 100%;
  }

  .prop-table tr {
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
  }

  .prop-table td {
    border: 0;
    padding: 4px 8px;
  }

  .prop-actions {
    justify-content: flex-start;
    margin-top: 6px;
  }
}

html[data-theme="dark"] .prop-search {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .prop-filter-card.is-active {
  box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.4), 0 8px 22px rgba(0, 0, 0, 0.28);
  border-color: rgba(245, 197, 24, 0.45);
}

html[data-theme="dark"] .prop-toolbar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .prop-toolbar__right {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .prop-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .prop-chip.is-active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #14181f;
}

html[data-theme="dark"] .prop-select select {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink-2);
}

html[data-theme="dark"] .prop-mock-tag {
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold-400);
}

html[data-theme="dark"] .status--info {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}

html[data-theme="dark"] .prop-tipo {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

html[data-theme="dark"] .prop-tipo--refin {
  background: rgba(109, 40, 217, 0.22);
  border-color: rgba(167, 139, 250, 0.28);
  color: #c4b5fd;
}

html[data-theme="dark"] .prop-action {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

html[data-theme="dark"] .prop-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

html[data-theme="dark"] .prop-action--wa:hover {
  background: rgba(5, 150, 105, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

html[data-theme="dark"] .prop-empty__icon {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .prop-pager {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .prop-page.is-active {
  background: var(--gold-500);
  color: #14181f;
}

html[data-theme="dark"] .prop-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .prop-table th:first-child,
html[data-theme="dark"] .prop-table td:first-child,
html[data-theme="dark"] .prop-table th:last-child,
html[data-theme="dark"] .prop-table td:last-child {
  background: var(--surface);
}

html[data-theme="dark"] .prop-table tbody tr:hover td:first-child,
html[data-theme="dark"] .prop-table tbody tr:hover td:last-child {
  background: rgba(255, 255, 255, 0.04);
}

.prop-cpf {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.prop-parcela {
  color: var(--muted);
  font-weight: 650;
}

.prop-portal {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.prop-portal.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}

.prop-portal.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.prop-sheet {
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow: hidden;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.prop-sheet__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 8px;
}

.prop-sheet__glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 110px;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.26), rgba(245, 197, 24, 0.04) 60%, transparent);
  pointer-events: none;
}

.prop-sheet__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.prop-sheet__identity {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.prop-sheet__who {
  min-width: 0;
}

.prop-sheet__av {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--bg, #fff8db);
  color: var(--fg, #c99200);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(232, 176, 6, 0.25);
}

.prop-sheet__top h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.prop-sheet__tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.prop-sheet__tags .status,
.prop-sheet__tags .prop-tipo,
.prop-sheet__tags .prop-portal {
  flex: 0 0 auto;
  font-size: 0.7rem;
  padding: 3px 8px;
}

.prop-sheet__money {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 10px;
}

.prop-sheet__fig {
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf5, var(--surface));
  border: 1px solid rgba(232, 176, 6, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.prop-sheet__fig span {
  display: block;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.prop-sheet__fig strong {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.prop-sheet__fig--parcel strong {
  color: var(--ink);
}

.prop-sheet__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 2px;
  align-items: stretch;
}

.prop-sheet__block {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 12px 12px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* display:flex acima sobrescreve o [hidden] nativo */
.prop-sheet__block[hidden] {
  display: none !important;
}

.prop-sheet__block--wide {
  grid-column: 1 / -1;
}

.prop-sheet__block h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.prop-sheet__rows {
  display: grid;
  gap: 0;
  flex: 1;
}

.prop-sheet__rows > div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.prop-sheet__rows > div:last-child {
  border-bottom: 0;
}

.prop-sheet__rows span {
  font-size: 0.78rem;
  color: var(--muted-2);
  font-weight: 650;
}

.prop-sheet__rows b {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.prop-sheet__dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.prop-sheet__dates[data-cols="1"] {
  grid-template-columns: 1fr;
}

.prop-sheet__dates[data-cols="2"] {
  grid-template-columns: 1fr 1fr;
}

.prop-sheet__dates[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.prop-sheet__dates[data-cols="4"],
.prop-sheet__dates[data-cols="5"],
.prop-sheet__dates[data-cols="6"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prop-sheet__date[hidden] {
  display: none !important;
}

.prop-sheet__date {
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.prop-sheet__date span {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.prop-sheet__date b {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.prop-sheet__chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
}

.prop-sheet__chat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prop-sheet__chat-copy h3 {
  margin: 0;
}

.prop-sheet__chat code {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prop-sheet__umbler {
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.prop-sheet__obs {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.status.status--pago {
  background: rgba(4, 120, 87, 0.14);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.22);
}

.prop-sheet__pago {
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.1), rgba(16, 185, 129, 0.06));
  border-color: rgba(4, 120, 87, 0.22);
}

.prop-sheet__pago-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.prop-sheet__pago-copy h3 {
  margin: 0 0 4px;
}

.prop-sheet__pago-copy p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.prop-sheet__pago-meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.prop-sheet__pago-meta span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.prop-sheet__pago-meta b {
  font-size: 0.95rem;
  color: #047857;
}

html[data-theme="dark"] .status.status--pago {
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.28);
}

html[data-theme="dark"] .prop-sheet__pago {
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.22), rgba(16, 185, 129, 0.08));
  border-color: rgba(52, 211, 153, 0.28);
}

html[data-theme="dark"] .prop-sheet__pago-meta b {
  color: #34d399;
}

.prop-sheet__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  margin-top: 0;
  flex-shrink: 0;
  background: var(--surface);
}

.prop-sheet__actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prop-sheet__actions-row .btn--ghost {
  margin-left: auto;
}

.prop-sheet__sync-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.prop-sheet__modo {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
}

.prop-modo {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.prop-modo.is-active {
  background: #111;
  color: #fff;
}

.prop-sheet__sync {
  display: none;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-sizing: border-box;
}

.prop-sheet__sync:not([hidden]) {
  display: block;
}

.prop-sheet__sync.is-ok {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.28);
}

.prop-sheet__sync.is-err {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.24);
}

html[data-theme="dark"] .prop-sheet__sync.is-ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.28);
}

html[data-theme="dark"] .prop-sheet__sync.is-err {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}

html[data-theme="dark"] .prop-sheet__modo {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .prop-modo.is-active {
  background: #f5c518;
  color: #111;
}

@media (max-width: 640px) {
  .prop-sheet__money,
  .prop-sheet__body {
    grid-template-columns: 1fr;
  }

  .prop-sheet__dates[data-cols="1"] {
    grid-template-columns: 1fr;
  }

  .prop-sheet__dates[data-cols="2"],
  .prop-sheet__dates[data-cols="3"],
  .prop-sheet__dates[data-cols="4"],
  .prop-sheet__dates[data-cols="5"],
  .prop-sheet__dates[data-cols="6"] {
    grid-template-columns: 1fr 1fr;
  }

  .prop-sheet__chat {
    flex-direction: column;
    align-items: stretch;
  }

  .prop-sheet__umbler {
    width: 100%;
    justify-content: center;
  }

  .prop-sheet__rows > div {
    grid-template-columns: 1fr;
    gap: 2px;
    align-items: start;
  }

  .prop-sheet__rows b {
    text-align: left;
  }
}

html[data-theme="dark"] .prop-sheet__fig {
  background: linear-gradient(180deg, rgba(245, 197, 24, 0.12), rgba(255, 255, 255, 0.03));
  border-color: rgba(245, 197, 24, 0.28);
}

html[data-theme="dark"] .prop-sheet__block {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .prop-sheet__date {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .prop-sheet__rows > div {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .prop-sheet__chat code {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme="dark"] .prop-sheet__actions {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 31, 0.92);
}

html[data-theme="dark"] .prop-portal.is-ok {
  background: rgba(5, 150, 105, 0.18);
  color: #34d399;
}

html[data-theme="dark"] .prop-portal.is-warn {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}


/* ========== Simulações ========== */
.main:has(.sim-shell) {
  min-height: calc(100dvh - var(--topbar-h));
  min-height: calc(100vh - var(--topbar-h));
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.sim-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.sim-cpf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(100, 112, 138, 0.35);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 112, 138, 0.04),
      rgba(100, 112, 138, 0.04) 8px,
      transparent 8px,
      transparent 16px
    ),
    var(--surface);
}

.sim-cpf-bar__copy {
  min-width: 0;
}

.sim-cpf-bar__tag {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sim-cpf-bar__copy strong {
  display: block;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.sim-cpf-bar__copy p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted-2);
}

.sim-cpf-bar__form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0.72;
}

.sim-cpf-bar__form input {
  width: min(220px, 38vw);
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.sim-cpf-bar__badge {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(100, 112, 138, 0.12);
}

.sim-studio {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.sim-studio__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 197, 24, 0.16), transparent 48%),
    var(--surface);
}

.sim-studio__head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.sim-studio__head p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.sim-live {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.sim-live__pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.sim-live__pill.is-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.sim-console {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.sim-step {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(228, 232, 239, 0.7);
}

.sim-step:last-child {
  border-bottom: 0;
}

.sim-step[hidden] {
  display: none !important;
}

.sim-step__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.sim-step__label > span {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-600);
  letter-spacing: 0.04em;
}

.sim-step__label strong {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--ink);
}

.sim-step__label em {
  width: 100%;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted-2);
}

.sim-nis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sim-nis__btn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.sim-nis__btn:hover {
  border-color: rgba(232, 176, 6, 0.55);
  transform: translateY(-1px);
}

.sim-nis__btn.is-active {
  background: linear-gradient(145deg, #f5c518, #e8b006);
  border-color: #e8b006;
  color: #14181f;
  box-shadow: 0 8px 16px rgba(232, 176, 6, 0.28);
}

.sim-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  width: min(280px, 100%);
}

.sim-switch__btn {
  min-height: 38px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.9rem;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.sim-switch__btn.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 14px rgba(20, 24, 31, 0.18);
}

.sim-prazo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sim-prazo__btn {
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.sim-prazo__btn:hover {
  border-color: rgba(232, 176, 6, 0.5);
  transform: translateY(-1px);
}

.sim-prazo__btn.is-active {
  background: linear-gradient(145deg, #f5c518, #e8b006);
  border-color: #e8b006;
  color: #14181f;
  box-shadow: 0 8px 16px rgba(232, 176, 6, 0.28);
}

.sim-prazo__btn[hidden] {
  display: none !important;
}

.sim-canvas {
  flex: 1 1 auto;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top, rgba(245, 197, 24, 0.08), transparent 50%),
    linear-gradient(180deg, #f4f6fa 0%, #eef1f5 100%);
}

.sim-canvas[hidden] {
  display: none !important;
}

.sim-canvas__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(228, 232, 239, 0.8);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.sim-canvas__bar strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.sim-canvas__bar span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.sim-canvas__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.sim-canvas__stage {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 16px;
  min-height: 0;
}

.sim-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.sim-nav:hover:not(:disabled) {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}

.sim-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sim-frame {
  position: relative;
  min-height: 360px;
  height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(228, 232, 239, 0.95);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 40px rgba(20, 24, 31, 0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
}

.sim-frame img {
  max-width: 100%;
  max-height: min(68vh, 620px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(20, 24, 31, 0.12);
}

.sim-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  max-width: 360px;
  padding: 20px;
  animation: sim-idle-in 0.45s ease both;
}

.sim-idle[hidden] {
  display: none !important;
}

.sim-idle__mark {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.sim-idle__mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-500);
  opacity: 0.35;
  animation: sim-dot 1.2s ease-in-out infinite;
}

.sim-idle__mark span:nth-child(2) { animation-delay: 0.15s; }
.sim-idle__mark span:nth-child(3) { animation-delay: 0.3s; }

.sim-idle strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sim-idle p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.sim-preview__loading,
.sim-preview__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 650;
  text-align: center;
  padding: 20px;
}

.sim-preview__loading[hidden],
.sim-preview__empty[hidden],
.sim-frame img[hidden] {
  display: none !important;
}

.sim-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--gold-500);
  animation: sim-spin 0.8s linear infinite;
}

@keyframes sim-spin {
  to { transform: rotate(360deg); }
}

@keyframes sim-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes sim-idle-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sim-zoom {
  padding: 12px;
}

.sim-zoom__backdrop {
  background: rgba(12, 15, 20, 0.72);
  backdrop-filter: blur(8px);
}

.sim-zoom-dialog {
  width: min(980px, 100%);
  max-height: min(94vh, 980px);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.sim-zoom__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 197, 24, 0.18), transparent 46%),
    var(--surface);
}

.sim-zoom__title {
  min-width: 0;
}

.sim-zoom__eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.sim-zoom__title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.sim-zoom__title p {
  margin: 6px 0 0;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.35;
}

.sim-zoom__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  padding-top: 4px;
}

.sim-zoom__pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 750;
}

.sim-zoom__pill.is-gold {
  background: linear-gradient(145deg, #f5c518, #e8b006);
  border-color: #e8b006;
  color: #14181f;
}

.sim-zoom__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: background 0.12s ease, color 0.12s ease;
}

.sim-zoom__close:hover {
  color: var(--ink);
  background: #fff;
}

.sim-zoom-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  background:
    radial-gradient(ellipse at top, rgba(245, 197, 24, 0.08), transparent 55%),
    linear-gradient(180deg, #f5f7fa, #eef1f5);
  overflow: auto;
}

.sim-zoom__nav {
  justify-self: center;
  box-shadow: var(--shadow-sm);
}

.sim-zoom__frame {
  width: 100%;
  max-width: 860px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(228, 232, 239, 0.95);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px rgba(20, 24, 31, 0.1);
  display: grid;
  place-items: center;
}

.sim-zoom__frame img,
.sim-zoom-body img {
  max-width: 100%;
  max-height: min(68vh, 640px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 12px;
}

.sim-zoom__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.sim-zoom__foot > span {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted-2);
}

.sim-zoom__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .sim-zoom__head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sim-zoom__pills {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .sim-zoom__close {
    grid-column: 2;
    grid-row: 1;
  }

  .sim-zoom-body {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
    padding: 12px 8px;
  }

  .sim-zoom__nav {
    width: 40px;
    height: 40px;
  }

  .sim-zoom__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sim-zoom__actions .btn {
    flex: 1;
    justify-content: center;
  }
}

html[data-theme="dark"] .sim-zoom__head,
html[data-theme="dark"] .sim-zoom__foot {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .sim-zoom-body {
  background:
    radial-gradient(ellipse at top, rgba(245, 197, 24, 0.1), transparent 55%),
    rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .sim-zoom__frame {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

html[data-theme="dark"] .sim-zoom__pill,
html[data-theme="dark"] .sim-zoom__close {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .sim-cpf-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .sim-cpf-bar__form {
    width: 100%;
  }

  .sim-cpf-bar__form input {
    flex: 1;
    width: auto;
  }

  .sim-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sim-studio__head {
    flex-direction: column;
  }

  .sim-live {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .sim-canvas__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .sim-canvas__actions .btn {
    flex: 1;
    justify-content: center;
  }

  .sim-canvas__stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: 10px;
    gap: 6px;
  }

  .sim-nav {
    width: 40px;
    height: 40px;
  }

  .sim-frame {
    min-height: 280px;
    padding: 12px;
    border-radius: 14px;
  }

  .sim-nis__btn {
    width: 38px;
    height: 38px;
  }

  .sim-switch {
    width: 100%;
  }
}

html[data-theme="dark"] .sim-cpf-bar {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 8px,
      transparent 8px,
      transparent 16px
    ),
    var(--surface);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .sim-studio__head,
html[data-theme="dark"] .sim-console,
html[data-theme="dark"] .sim-canvas__bar {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .sim-canvas {
  background:
    radial-gradient(ellipse at top, rgba(245, 197, 24, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

html[data-theme="dark"] .sim-frame {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

html[data-theme="dark"] .sim-nis__btn,
html[data-theme="dark"] .sim-prazo__btn,
html[data-theme="dark"] .sim-switch,
html[data-theme="dark"] .sim-live__pill,
html[data-theme="dark"] .sim-nav,
html[data-theme="dark"] .sim-cpf-bar__form input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .sim-switch__btn.is-active {
  background: var(--gold-500);
  color: #14181f;
  box-shadow: 0 6px 14px rgba(232, 176, 6, 0.22);
}

html[data-theme="dark"] .sim-live__pill.is-ink {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #14181f;
}

html[data-theme="dark"] .sim-step {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ========== Módulos por empresa ========== */
.config-modulos {
  padding: 14px 16px 12px;
}

.config-modulos__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.config-modulos__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.config-modulos__head p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.config-modulos__hint {
  flex-shrink: 0;
  min-height: 1.2em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted-2);
}

.config-modulos__hint.is-busy {
  color: var(--muted);
}

.config-modulos__hint.is-ok {
  color: var(--ok);
}

.config-modulos__hint.is-err {
  color: var(--danger);
}

.config-modulos__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.config-modulos__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.config-modulos__row:last-child {
  border-bottom: 0;
}

.config-modulos__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.config-modulos__seg {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 210px;
}

.config-modulos__opt {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  transition: background 0.12s ease, color 0.12s ease;
}

.config-modulos__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

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

.config-modulos__opt.is-active,
.config-modulos__opt:has(input:checked) {
  background: var(--ink);
  color: #fff;
}

.config-modulos__opt:has(input[value="manutencao"]:checked) {
  background: linear-gradient(145deg, #f5c518, #e8b006);
  color: #14181f;
}

.config-modulos__opt:has(input[value="desligado"]:checked),
.config-modulos__opt.is-active:has(input[value="desligado"]) {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.modulo-gate-panel {
  max-width: 560px;
}

.modulo-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px 4px;
}

.modulo-gate__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modulo-gate__badge--off {
  background: rgba(100, 112, 138, 0.14);
  color: var(--muted);
}

.modulo-gate__badge--maint {
  background: rgba(232, 176, 6, 0.2);
  color: #a16207;
}

.modulo-gate h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.modulo-gate p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .config-modulos__head {
    flex-direction: column;
    align-items: stretch;
  }

  .config-modulos__seg {
    width: 100%;
    min-width: 0;
  }
}

html[data-theme="dark"] .config-modulos__list,
html[data-theme="dark"] .config-modulos__row {
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .config-modulos__seg {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .config-modulos__opt:has(input:checked) {
  background: var(--gold-500);
  color: #14181f;
}

html[data-theme="dark"] .config-modulos__opt:has(input[value="desligado"]:checked),
html[data-theme="dark"] .config-modulos__opt.is-active:has(input[value="desligado"]) {
  background: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

html[data-theme="dark"] .nav-item__tag--maint {
  background: rgba(245, 197, 24, 0.18);
  color: #fbbf24;
}

html[data-theme="dark"] .modulo-gate__badge--maint {
  background: rgba(245, 197, 24, 0.18);
  color: #fbbf24;
}


/* ========== Tokens Crefisa ========== */
.tokv {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tokv-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #2c3342 0%, #3a4254 48%, #323948 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f7f8fb;
}

.tokv-hero__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.tokv-hero__aurora {
  position: absolute;
  width: 55%;
  height: 180%;
  top: -40%;
  filter: blur(36px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.tokv-hero__aurora--1 {
  left: -8%;
  background: linear-gradient(180deg, transparent, rgba(240, 196, 26, 0.55), transparent);
  transform: rotate(18deg);
  animation: tokv-aurora 9s ease-in-out infinite;
}

.tokv-hero__aurora--2 {
  left: 28%;
  background: linear-gradient(180deg, transparent, rgba(52, 211, 153, 0.4), transparent);
  transform: rotate(-12deg);
  animation: tokv-aurora 11s ease-in-out infinite 0.8s;
}

.tokv-hero__aurora--3 {
  right: -6%;
  left: auto;
  background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.38), transparent);
  transform: rotate(8deg);
  animation: tokv-aurora 10s ease-in-out infinite 1.4s;
}

.tokv-hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(240, 196, 26, 0.28);
  box-shadow: 0 0 24px rgba(240, 196, 26, 0.08);
  top: 50%;
  right: 12%;
  translate: 0 -50%;
  animation: tokv-ring 4.8s ease-out infinite;
}

.tokv-hero__ring--1 {
  width: 90px;
  height: 90px;
}

.tokv-hero__ring--2 {
  width: 90px;
  height: 90px;
  animation-delay: 2.4s;
}

@keyframes tokv-aurora {
  0%, 100% {
    transform: translateX(0) rotate(var(--tokv-rot, 12deg)) scaleY(1);
    opacity: 0.35;
  }
  50% {
    transform: translateX(18px) rotate(calc(var(--tokv-rot, 12deg) + 6deg)) scaleY(1.12);
    opacity: 0.7;
  }
}

.tokv-hero__aurora--1 { --tokv-rot: 18deg; }
.tokv-hero__aurora--2 { --tokv-rot: -12deg; }
.tokv-hero__aurora--3 { --tokv-rot: 8deg; }

@keyframes tokv-ring {
  0% {
    transform: scale(0.55);
    opacity: 0.7;
  }
  70% {
    opacity: 0.2;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tokv-hero__aurora,
  .tokv-hero__ring {
    animation: none;
  }
}

.tokv-hero__copy,
.tokv-hero__stats {
  position: relative;
  z-index: 1;
}

.tokv-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 196, 26, 0.95);
}

.tokv-hero__copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}

.tokv-hero__copy > p:last-child {
  margin: 8px 0 0;
  max-width: 42ch;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(247, 248, 251, 0.72);
}

.tokv-hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 8px;
  align-self: center;
  min-width: min(420px, 100%);
}

.tokv-hero__stats li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  text-align: center;
}

.tokv-hero__stats strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.tokv-hero__stats span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(247, 248, 251, 0.58);
}

.tokv-table-wrap {
  overflow-x: auto;
}

.tokv-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.tokv-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tokv-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tokv-row:last-child td {
  border-bottom: 0;
}

.tokv-row:hover td {
  background: rgba(240, 196, 26, 0.05);
}

.tokv-row.is-ok td:first-child {
  box-shadow: inset 3px 0 0 var(--ok);
}

.tokv-row.is-wait td:first-child {
  box-shadow: inset 3px 0 0 var(--warn);
}

.tokv-row.is-err td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}

.tokv-slot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tokv-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(100, 112, 138, 0.12);
}

.tokv-row.is-ok .tokv-orb {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14);
}

.tokv-row.is-live .tokv-orb {
  animation: tokv-glow 2.2s ease-in-out infinite;
}

.tokv-row.is-wait .tokv-orb {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
  animation: tokv-pulse 1.4s ease-out infinite;
}

.tokv-row.is-err .tokv-orb {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

@keyframes tokv-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.82; }
}

@keyframes tokv-pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

.tokv-slot strong {
  display: block;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.tokv-slot small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.tokv-login {
  display: inline-block;
  max-width: 220px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-2);
  word-break: break-all;
}

.tokv-status {
  display: grid;
  gap: 4px;
}

.tokv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tokv-badge--sucesso {
  background: var(--ok-soft);
  color: var(--ok);
}

.tokv-badge--aguardando {
  background: var(--warn-soft);
  color: var(--warn);
}

.tokv-badge--erro {
  background: var(--danger-soft);
  color: var(--danger);
}

.tokv-badge--neutro {
  background: rgba(100, 112, 138, 0.12);
  color: var(--muted);
}

.tokv-status small {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted-2);
}

.tokv-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.tokv-time {
  display: grid;
  gap: 2px;
}

.tokv-time strong {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--ink);
}

.tokv-time small {
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--muted-2);
}

.tokv-time.is-late strong,
.tokv-late {
  color: var(--danger) !important;
  font-weight: 800;
}

.tokv-creds {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tokv-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tokv-chip.is-on {
  border-color: rgba(5, 150, 105, 0.25);
  background: var(--ok-soft);
  color: var(--ok);
}

.tokv-chip.is-off {
  border-color: rgba(220, 38, 38, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.tokv-chip.is-ready {
  border-color: rgba(232, 176, 6, 0.4);
  background: var(--gold-muted);
  color: var(--gold-600);
}

.tokv-empty {
  text-align: center;
  padding: 40px 20px !important;
}

.tokv-empty strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--ink);
}

.tokv-empty span {
  color: var(--muted);
  font-size: 0.9rem;
}

html[data-theme="dark"] .tokv {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .tokv-table th {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .tokv-table td {
  border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .tokv-login,
html[data-theme="dark"] .tokv-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .tokv-hero {
    flex-direction: column;
    gap: 16px;
  }

  .tokv-hero__stats {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .tokv-hero {
    padding: 18px 16px;
  }

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

/* ========== Tokens do sistema (favoritos) ========== */
.toks {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.toks__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.toks__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.toks__head p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.toks-empty {
  padding: 28px 16px;
  text-align: center;
}

.toks-empty strong {
  display: block;
  font-family: var(--display);
  margin-bottom: 4px;
  color: var(--ink);
}

.toks-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.toks-table-wrap {
  overflow-x: auto;
}

.toks-table {
  width: 100%;
  border-collapse: collapse;
}

.toks-table th,
.toks-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.toks-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
}

.toks-row:last-child td {
  border-bottom: 0;
}

.toks-row:hover td {
  background: rgba(240, 196, 26, 0.05);
}

.toks-row.is-ok td:first-child {
  box-shadow: inset 3px 0 0 var(--ok);
}

.toks-row.is-wait td:first-child {
  box-shadow: inset 3px 0 0 var(--warn);
}

.toks-row.is-err td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}

.toks-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.toks-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(100, 112, 138, 0.12);
}

.toks-row.is-ok .toks-orb {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14);
}

.toks-row.is-wait .toks-orb {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.toks-row.is-err .toks-orb {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.toks-name strong {
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.toks-slotcell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.toks-slotcell strong {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--ink);
}

.toks-slotcell code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.toks-td-status,
.toks-td-creds {
  width: 1%;
  white-space: nowrap;
}

.toks-td-creds .tokv-creds {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toks-th-actions,
.toks-td-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  padding-left: 8px;
  padding-right: 16px;
}

.toks-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
}

.toks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.toks-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--ink);
}

.toks-btn--danger:hover {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--danger);
}

.toks-form-msg {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 650;
}

.toks-form-msg.is-err {
  background: var(--danger-soft);
  color: var(--danger);
}

html[data-theme="dark"] .toks,
html[data-theme="dark"] .toks__head,
html[data-theme="dark"] .toks-table th {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .toks-table td,
html[data-theme="dark"] .toks-slotcell code,
html[data-theme="dark"] .toks-btn {
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .toks-slotcell code,
html[data-theme="dark"] .toks-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

@media (max-width: 640px) {
  .toks__head {
    flex-direction: column;
  }

  .toks__head .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== Uso em módulos ========== */
.tokuso {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tokuso__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.tokuso__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tokuso__head p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.tokuso-status {
  align-self: center;
  min-height: 1.2em;
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--muted);
  white-space: nowrap;
}

.tokuso-status.is-busy { color: var(--gold-600); }
.tokuso-status.is-ok { color: var(--ok); }
.tokuso-status.is-err { color: var(--danger); }

.tokuso-empty {
  padding: 20px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tokuso-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 220px;
}

.tokuso-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #fafbfc;
}

.tokuso-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.tokuso-nav__item:hover {
  background: rgba(240, 196, 26, 0.12);
  color: var(--ink);
}

.tokuso-nav__item.is-active {
  background: #14181f;
  color: #fff;
}

.tokuso-nav__meta {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.tokuso-nav__item.is-active .tokuso-nav__meta {
  color: rgba(240, 196, 26, 0.9);
}

.tokuso-panel {
  padding: 16px 18px 18px;
  background: #fff;
}

.tokuso-panel__intro {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.tokuso-panel__intro strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

.tokuso-binds {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.tokuso-bind {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.tokuso-bind:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tokuso-bind__info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tokuso-bind__info strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.tokuso-bind__info span {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.tokuso-bind__current {
  margin-top: 4px;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}

.tokuso-bind__current.is-empty {
  background: var(--surface-2);
  color: var(--muted);
}

.tokuso-select {
  display: block;
  position: relative;
  margin: 0;
}

.tokuso-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.tokuso-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.tokuso-select select:hover,
.tokuso-select select:focus {
  outline: none;
  border-color: rgba(201, 146, 0, 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(240, 196, 26, 0.16);
}

.tokuso-bind--multi {
  display: block;
  padding-top: 14px;
}

.tokuso-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8fa;
}

.tokuso-picker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tokuso-picker__titles {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tokuso-picker__titles strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.tokuso-picker__titles span {
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--muted);
}

.tokuso-picker__badge {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 160, 107, 0.12);
  color: var(--ok);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.tokuso-picker__badge.is-empty {
  background: rgba(20, 24, 31, 0.06);
  color: var(--muted);
}

.tokuso-picker__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tokuso-picker__tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(20, 24, 31, 0.06);
  gap: 2px;
}

.tokuso-picker__tab {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

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

.tokuso-picker__tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.tokuso-picker__search {
  flex: 1 1 140px;
  min-width: 120px;
  margin: 0;
}

.tokuso-picker__search input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 650;
}

.tokuso-picker__search input:focus {
  outline: none;
  border-color: rgba(201, 146, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(240, 196, 26, 0.16);
}

.tokuso-picker__actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.tokuso-picker__btn {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.tokuso-picker__btn:hover {
  border-color: rgba(201, 146, 0, 0.45);
  color: var(--ink);
}

.tokuso-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-height: 248px;
  overflow: auto;
  padding-right: 2px;
}

.tokuso-check {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--ink-2);
}

.tokuso-check:hover {
  border-color: rgba(201, 146, 0, 0.4);
}

.tokuso-check.is-on {
  border-color: rgba(201, 146, 0, 0.55);
  background: rgba(240, 196, 26, 0.14);
  color: var(--ink);
}

.tokuso-check input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--gold-500);
}

.tokuso-check__body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.tokuso-check__body b {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tokuso-check__body small {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tokuso-check__mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  position: relative;
}

.tokuso-check.is-on .tokuso-check__mark {
  background: #14181f;
}

.tokuso-check.is-on .tokuso-check__mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border-right: 1.8px solid #f0c41a;
  border-bottom: 1.8px solid #f0c41a;
  transform: rotate(40deg);
}

.tokuso-picker__empty {
  margin: 0;
  padding: 10px 4px 2px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.tokuso-select select:disabled {
  opacity: 0.65;
  cursor: wait;
}

html[data-theme="dark"] .tokuso,
html[data-theme="dark"] .tokuso__head,
html[data-theme="dark"] .tokuso-nav,
html[data-theme="dark"] .tokuso-panel {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .tokuso-nav__item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

html[data-theme="dark"] .tokuso-bind {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .tokuso-select select {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

html[data-theme="dark"] .tokuso-picker {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .tokuso-picker__tabs {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .tokuso-picker__tab.is-active,
html[data-theme="dark"] .tokuso-check,
html[data-theme="dark"] .tokuso-picker__search input,
html[data-theme="dark"] .tokuso-picker__btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

html[data-theme="dark"] .tokuso-check.is-on {
  background: rgba(240, 196, 26, 0.14);
  border-color: rgba(240, 196, 26, 0.4);
}

html[data-theme="dark"] .tokuso-check.is-on .tokuso-check__mark {
  background: #f0c41a;
}

html[data-theme="dark"] .tokuso-check.is-on .tokuso-check__mark::after {
  border-color: #14181f;
}

@media (max-width: 860px) {
  .tokuso-shell {
    grid-template-columns: 1fr;
  }

  .tokuso-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tokuso-nav__item {
    width: auto;
  }

  .tokuso-bind {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tokuso-checks {
    grid-template-columns: 1fr;
    max-height: 280px;
  }

  .tokuso-picker__actions {
    margin-left: 0;
    width: 100%;
  }

  .tokuso-picker__btn {
    flex: 1;
  }
}

/* ========== Fila de simulações ========== */
.fq-head h1 {
  letter-spacing: -0.03em;
}
.fq-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.fq-btn-danger {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.28) !important;
}
.fq-btn-danger:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.08) !important;
}
.fq-btn-danger:disabled {
  opacity: 0.45;
}

/* Deck de disparo */
.fq-deck {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #efe3b0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(240, 196, 26, 0.18), transparent 55%),
    linear-gradient(165deg, #fffdf5 0%, #ffffff 48%, #f7f8fb 100%);
  box-shadow: var(--shadow);
  padding: 16px 18px 16px;
}

.fq-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(232, 176, 6, 0.2);
  backdrop-filter: blur(6px);
}
.fq-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  min-width: 0;
  position: relative;
}
.fq-metric:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(20, 24, 31, 0.08);
}
.fq-metric span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.fq-metric strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.fq-metric--warn strong { color: var(--warn); }
.fq-metric--info strong { color: #2563eb; }
.fq-metric--ok strong { color: var(--ok); }
.fq-metric--danger strong { color: var(--danger); }
.fq-deck__glow {
  pointer-events: none;
  position: absolute;
  inset: auto -20% -40% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 196, 26, 0.22), transparent 70%);
  filter: blur(8px);
}
.fq-deck__top {
  position: relative;
  margin-bottom: 14px;
}
.fq-deck__intro h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.fq-deck__intro p {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.9rem;
}
.fq-deck__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 176, 6, 0.22);
}
.fq-deck__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fq-deck__start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 16px;
}
.fq-deck__stop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.fq-deck__params {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.fq-param {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(232, 176, 6, 0.22);
  backdrop-filter: blur(4px);
}
.fq-param__label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fq-param input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 780;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  padding: 0;
  line-height: 1.1;
}
.fq-param em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--muted-2);
}

.fq-deck__progress {
  position: relative;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(20, 24, 31, 0.04);
  border: 1px solid var(--line);
}
.fq-deck__progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 650;
}
.fq-deck__progress-meta strong {
  font-variant-numeric: tabular-nums;
  font-family: var(--display);
}
.fq-deck__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.fq-deck__bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), #22c55e);
  transition: width 0.28s ease;
}

@keyframes fq-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

/* Queue panel */
.fq-queue {
  padding: 0;
  overflow: hidden;
}
.fq-queue__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.fq-queue__title h2 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.fq-queue__title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.fq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fq-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fq-chip:hover {
  border-color: var(--line-2);
  color: var(--ink);
}
.fq-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold-400);
}

.fq-list {
  display: flex;
  flex-direction: column;
}

.fq-item {
  display: grid;
  grid-template-columns: 36px 10px minmax(160px, 1.4fr) minmax(120px, 0.9fr) minmax(110px, 0.8fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background 0.15s ease;
}
.fq-item:last-child {
  border-bottom: 0;
}
.fq-item:hover {
  background: rgba(240, 196, 26, 0.05);
}
.fq-item.is-run {
  background: rgba(59, 130, 246, 0.04);
}
.fq-item.is-ok {
  background: rgba(5, 150, 105, 0.03);
}
.fq-item.is-err {
  background: rgba(220, 38, 38, 0.03);
}

.fq-item__pos {
  font-family: var(--display);
  font-weight: 750;
  font-size: 0.85rem;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.fq-item__orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}
.fq-item.is-run .fq-item__orb {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  animation: fq-pulse 1.1s ease-in-out infinite;
}
.fq-item.is-ok .fq-item__orb {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}
.fq-item.is-err .fq-item__orb {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.fq-item__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fq-item__av {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--gold-soft);
  color: var(--gold-600);
  font-family: var(--display);
  font-weight: 750;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.fq-item.is-ok .fq-item__av {
  background: var(--ok-soft);
  color: var(--ok);
}
.fq-item.is-err .fq-item__av {
  background: var(--danger-soft);
  color: var(--danger);
}
.fq-item.is-run .fq-item__av {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.fq-item__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fq-item__meta strong {
  font-size: 0.94rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fq-item__meta span {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fq-item__cpf {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
}

.fq-item__when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fq-item__when span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fq-item__when strong {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fq-item__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.fq-act {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.fq-act:hover:not(:disabled) {
  transform: translateY(-1px);
}
.fq-act--go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold-400);
}
.fq-act--go:hover:not(:disabled) {
  background: #1c2330;
}
.fq-act--del:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--danger);
  background: var(--danger-soft);
}
.fq-act:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fq-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 48px 20px;
}
.fq-empty__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold-600);
  margin-bottom: 4px;
}
.fq-empty strong {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--ink);
}
.fq-empty p {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.9rem;
}
.fq-filter-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .fq-item {
    grid-template-columns: 28px 10px minmax(140px, 1.2fr) minmax(110px, 0.8fr) auto auto;
  }
  .fq-item__when {
    display: none;
  }
}
@media (max-width: 900px) {
  .fq-deck__params {
    grid-template-columns: 1fr 1fr;
  }
  .fq-queue__toolbar {
    flex-direction: column;
  }
  .fq-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .fq-metric:nth-child(2)::after {
    display: none;
  }
  .fq-metric:nth-child(1),
  .fq-metric:nth-child(2) {
    border-bottom: 1px solid rgba(20, 24, 31, 0.06);
  }
}
@media (max-width: 720px) {
  .fq-deck__top {
    flex-direction: column;
  }
  .fq-deck__params {
    grid-template-columns: 1fr;
  }
  .fq-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .fq-item {
    grid-template-columns: 10px 1fr auto;
    grid-template-areas:
      "orb who acts"
      ". cpf cpf"
      ". status status";
    gap: 8px 10px;
    padding: 14px;
  }
  .fq-item__pos,
  .fq-item__when {
    display: none;
  }
  .fq-item__orb { grid-area: orb; align-self: start; margin-top: 14px; }
  .fq-item__who { grid-area: who; }
  .fq-item__actions { grid-area: acts; align-self: start; }
  .fq-item__cpf { grid-area: cpf; }
  .fq-item__status { grid-area: status; }
}

html[data-theme="dark"] .fq-deck {
  border-color: rgba(245, 197, 24, 0.28);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245, 197, 24, 0.12), transparent 55%),
    linear-gradient(165deg, #232018 0%, var(--surface) 50%, var(--surface-2) 100%);
}
html[data-theme="dark"] .fq-metrics {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(245, 197, 24, 0.16);
}
html[data-theme="dark"] .fq-metric:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .fq-param {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(245, 197, 24, 0.18);
}
html[data-theme="dark"] .fq-deck__bar {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .fq-btn-danger {
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
html[data-theme="dark"] .fq-item:hover {
  background: rgba(245, 197, 24, 0.06);
}
html[data-theme="dark"] .fq-empty__icon {
  background: rgba(245, 197, 24, 0.14);
  color: var(--gold-400);
}

/* ========== Atualizar simulações ========== */
.as-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.as-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  max-width: 720px;
}
.as-tabs__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
  overflow: hidden;
  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}
.as-tabs__item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  transition: background .18s ease;
}
.as-tabs__item:hover {
  border-color: rgba(245, 197, 24, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
.as-tabs__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.as-tabs__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.as-tabs__copy strong {
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 780;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.as-tabs__copy small {
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--muted);
  line-height: 1.3;
}
.as-tabs__item.is-active {
  border-color: rgba(245, 197, 24, 0.55);
  background:
    linear-gradient(135deg, rgba(245, 197, 24, 0.16), transparent 55%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.18), 0 10px 24px rgba(15, 23, 42, 0.06);
}
.as-tabs__item.is-active::before {
  background: var(--gold-500);
}
.as-tabs__item.is-active .as-tabs__icon {
  background: rgba(245, 197, 24, 0.22);
  border-color: rgba(245, 197, 24, 0.4);
  color: var(--ink);
}
.as-tabs__item.is-active .as-tabs__copy strong {
  color: var(--ink);
}
@media (max-width: 640px) {
  .as-tabs {
    grid-template-columns: 1fr;
    max-width: none;
  }
}
html[data-theme="dark"] .as-tabs__item.is-active {
  background:
    linear-gradient(135deg, rgba(245, 197, 24, 0.14), transparent 55%),
    var(--surface);
}
html[data-theme="dark"] .as-tabs__item:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.as-soon {
  position: relative;
  overflow: hidden;
  padding: 48px 24px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.as-soon__orb {
  position: absolute;
  inset: -40% auto auto 50%;
  width: 280px;
  height: 280px;
  margin-left: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.22), transparent 70%);
  pointer-events: none;
}
.as-soon strong {
  position: relative;
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.as-soon p {
  position: relative;
  margin: 0 auto;
  max-width: 42ch;
  color: var(--muted);
}

.as-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: stretch;
}

.as-stage {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(245, 197, 24, 0.08) 0%, transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
  min-width: 0;
  height: fit-content;
}
.as-stage__glow {
  position: absolute;
  right: -80px;
  top: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.18), transparent 68%);
  pointer-events: none;
  transition: opacity .4s ease;
}
.as-stage[data-running="1"] .as-stage__glow {
  opacity: 1;
  animation: asGlowPulse 2.4s ease-in-out infinite;
}
@keyframes asGlowPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}

.as-stage__hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.as-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.as-ring svg { display: block; transform: rotate(-90deg); }
.as-ring__track {
  fill: none;
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 8;
}
.as-ring__fill {
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset .45s cubic-bezier(.22, 1, .36, 1);
}
.as-stage[data-running="1"] .as-ring__fill {
  stroke: url(#none);
  stroke: #16a34a;
}
.as-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  line-height: 1;
}
.as-ring__label strong {
  font-size: 1.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.as-ring__label span {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.as-stage__copy h2 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.as-stage__desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
  line-height: 1.45;
}
.as-stage__desc code {
  font-size: 0.82rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.as-stage__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.as-stage__live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.4);
}
.as-stage__live i.is-on {
  background: #16a34a;
  animation: asDotPulse 1.2s ease-in-out infinite;
}
@keyframes asDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.as-stage__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.as-stage__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.as-stage__meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-500);
}
.as-day {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 22px 28px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
}
.as-day__glow {
  position: absolute;
  left: 50%;
  top: -48%;
  width: 280px;
  height: 280px;
  margin-left: -140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.85;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.22), transparent 68%);
  transition: background .35s ease, opacity .35s ease;
}
.as-day__mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}
.as-day__icon { display: none; }
.as-day.is-completo .as-day__icon--ok { display: block; }
.as-day.is-parcial .as-day__icon--warn { display: block; }
.as-day.is-pendente .as-day__icon--wait { display: block; }
.as-day__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 52rem;
}
.as-day__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid transparent;
}
.as-day__msg {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
  max-width: 28ch;
  text-wrap: balance;
}
.as-day__meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 148px));
  gap: 10px;
  margin-top: 6px;
  justify-content: center;
}
.as-day__meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
}
.as-day__meter em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.as-day__meter strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
}
.as-day__meter strong i {
  font-style: normal;
}
@media (max-width: 520px) {
  .as-day__meters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 280px;
  }
}
.as-day.is-completo {
  border-color: rgba(22, 163, 74, 0.28);
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.12), transparent 58%),
    var(--surface);
}
.as-day.is-completo .as-day__glow {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.28), transparent 68%);
}
.as-day.is-completo .as-day__mark {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(34, 197, 94, 0.16);
}
.as-day.is-completo .as-day__label {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(22, 163, 74, 0.22);
}
.as-day.is-parcial {
  border-color: rgba(202, 138, 4, 0.32);
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.16), transparent 58%),
    var(--surface);
}
.as-day.is-parcial .as-day__glow {
  background: radial-gradient(circle, rgba(245, 197, 24, 0.34), transparent 68%);
}
.as-day.is-parcial .as-day__mark {
  color: #854d0e;
  border-color: rgba(202, 138, 4, 0.4);
  background: rgba(250, 204, 21, 0.2);
}
.as-day.is-parcial .as-day__label {
  color: #854d0e;
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(202, 138, 4, 0.28);
}
.as-day.is-pendente {
  border-color: rgba(37, 99, 235, 0.22);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.1), transparent 58%),
    var(--surface);
}
.as-day.is-pendente .as-day__glow {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.24), transparent 68%);
}
.as-day.is-pendente .as-day__mark {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(59, 130, 246, 0.12);
}
.as-day.is-pendente .as-day__label {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}
html[data-theme="dark"] .as-day__meter {
  background: rgba(255,255,255,0.04);
}
html[data-theme="dark"] .as-day__label {
  background: rgba(255,255,255,0.06);
}

.as-token-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  max-width: 100%;
}
.as-token-now__label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.as-token-now strong {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.as-token-now.is-active {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(34, 197, 94, 0.1);
}
.as-token-now.is-active strong {
  color: #166534;
}

.as-stage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.as-btn-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
}
.as-btn-stop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
}

.as-lanes {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}
.as-lane {
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.as-lane__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  padding: 0 4px;
}
.as-lane__head strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 780;
}
.as-lane__head span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.as-lane__head em {
  font-style: normal;
  color: var(--ink);
}

.as-digits {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.as-digit {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: default;
  overflow: hidden;
  transition:
    transform .25s cubic-bezier(.22, 1, .36, 1),
    background .25s ease,
    border-color .25s ease,
    color .25s ease,
    box-shadow .25s ease;
}
.as-digit:disabled {
  cursor: default;
  opacity: 1;
}
.as-digit:not(:disabled) {
  cursor: pointer;
}
.as-digit:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.as-digit__n {
  position: relative;
  z-index: 1;
}
.as-digit__pulse {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(245, 197, 24, 0.45), transparent 70%);
  pointer-events: none;
}
.as-digit.is-ready {
  background: var(--surface);
  color: var(--ink);
  border-color: rgba(245, 197, 24, 0.35);
}
.as-digit.is-empty {
  border-style: dashed;
  opacity: 0.7;
}
.as-digit.is-run {
  color: var(--ink);
  border-color: var(--gold-500);
  background: rgba(245, 197, 24, 0.18);
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.18);
}
.as-digit.is-run .as-digit__pulse {
  opacity: 1;
  animation: asDigitPulse 1.1s ease-in-out infinite;
}
@keyframes asDigitPulse {
  0%, 100% { transform: scale(0.85); opacity: .55; }
  50% { transform: scale(1.25); opacity: 1; }
}
.as-digit.is-ok {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(34, 197, 94, 0.14);
  animation: asDigitPop .45s cubic-bezier(.22, 1, .36, 1);
}
.as-digit.is-err {
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(248, 113, 113, 0.16);
  animation: asDigitShake .4s ease;
}
@keyframes asDigitPop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes asDigitShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.as-feed {
  /* height:0 + min-height:100% = acompanha a coluna da esquerda sem estourar a grade */
  display: flex;
  flex-direction: column;
  height: 0;
  min-height: 100%;
  max-height: 100%;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
  overflow: hidden;
  min-width: 0;
}
.as-feed__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px;
  flex-shrink: 0;
}
.as-feed__head strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 780;
}
.as-feed__head span {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.as-ticker {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.as-ticker__empty {
  margin: auto 0;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.as-ticker__row {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  animation: asTickerIn .35s ease;
}
.as-ticker__row.is-ok { border-color: rgba(22, 163, 74, 0.25); color: #166534; }
.as-ticker__row.is-err { border-color: rgba(220, 38, 38, 0.25); color: #991b1b; }
.as-ticker__row.is-warn { border-color: rgba(202, 138, 4, 0.3); color: #854d0e; }
@keyframes asTickerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.as-json-dialog {
  width: min(860px, 100%);
}
.as-json-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.as-json-view {
  margin: 0;
  max-height: min(68vh, 640px);
  overflow: auto;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f141c;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .as-layout {
    grid-template-columns: 1fr;
  }
  .as-stage {
    height: auto;
  }
  .as-feed {
    height: auto;
    min-height: 0;
    max-height: 280px;
  }
  .as-ticker {
    min-height: 140px;
  }
}
@media (max-width: 900px) {
  .as-stage__hero {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
  }
  .as-lanes {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .as-stage { padding: 20px 16px 16px; }
  .as-digits { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .as-digit { font-size: 1rem; border-radius: 12px; }
}

html[data-theme="dark"] .as-lane {
  background: rgba(255, 255, 255, 0.03);
}
html[data-theme="dark"] .as-ring__track {
  stroke: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .as-digit.is-ready {
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .as-stage {
  background:
    linear-gradient(160deg, rgba(245, 197, 24, 0.1) 0%, transparent 42%),
    var(--surface);
}
html[data-theme="dark"] .as-json-view {
  background: #0a0d12;
}
