
.fx-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
@media (max-width: 900px) { .fx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 330px) { .fx-tiles { grid-template-columns: 1fr; } }
.fx-tile {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.fx-tile:hover { border-color: var(--edge); transform: translateY(-1px); }
.fx-tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* É o rótulo do número -- sem ele o valor não significa nada. Estava em "ink-muted"
     (2.56:1), abaixo do AA e fora do uso decorativo que o DS reserva a esse token. */
  color: var(--ink-secondary);
}
.fx-tile-valor {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}
.fx-tile-valor .unidade {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 3px;
  letter-spacing: 0;
}
.fx-tile-nota { font-size: 12px; color: var(--ink-secondary); min-height: 17px; }
.fx-tile-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--brand-light);
  margin-bottom: 2px;
}
.fx-tile-ico svg { width: 15px; height: 15px; }

/* Atmosfera — mesmo ponto de luz do app do streamer. */
.fx-app,
.fx-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -18%, rgba(200, 96, 26, 0.14), transparent 62%),
    var(--bg-base);
}

/* Header unificado (marca + seletor + sair) */
.fx-admin-header.fx-app-header,
.fx-admin-header.fx-shell-header {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--space-3);
  flex-wrap: nowrap;
  background: rgba(19, 19, 21, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-subtle);
  view-transition-name: app-header;
}
.fx-admin-header.is-scrolled { background: rgba(19, 19, 21, 0.97); }
.fx-shell-logout { min-height: 34px; padding: 6px 12px; font-size: 12px; }

.fx-app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.fx-app-brand:hover,
.fx-app-brand:focus-visible { text-decoration: none; color: inherit; }
.fx-app-brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}
.fx-app-brand-copy { display: grid; gap: 4px; min-width: 0; }
.fx-app-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.fx-app-wordmark .wm-fluxo { font-weight: 600; color: var(--ink-primary); }
.fx-app-wordmark .wm-lurk {
  font-weight: 700;
  color: var(--brand-light);
  letter-spacing: -0.045em;
}
.fx-app-brand-ctx {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1;
}
.fx-admin-header .fx-shell-meta { justify-self: end; }

.fx-admin-nav-inline {
  justify-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fx-admin-nav-inline::-webkit-scrollbar { display: none; }
.fx-admin-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin: 0 auto;
  background: var(--bg-input);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.fx-seg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  box-sizing: border-box;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.fx-seg-link:hover { color: var(--ink-primary); text-decoration: none; }
.fx-seg-link.is-active {
  color: var(--ink-primary);
  font-weight: 600;
  background: var(--bg-elevated);
  border-color: var(--accent-line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.fx-seg-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: inherit;
  line-height: 0;
}
.fx-seg-ico svg { display: block; width: 15px; height: 15px; }
.fx-seg-label { display: inline-flex; align-items: center; line-height: 1; }
.fx-seg-link.is-active .fx-seg-ico { color: var(--brand-light); }

.fx-app-main,
.fx-shell-content {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-5);
  align-content: start;
  display: grid;
  gap: var(--space-4);
  view-transition-name: app-main;
  animation: fx-admin-enter var(--dur-slow) var(--ease-out) both;
}
.fx-app-main.wide,
.fx-shell-content.wide { max-width: none; }
@keyframes fx-admin-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-app-main,
  .fx-shell-content { animation: none; }
}

.fx-app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-top: auto;
  padding: 22px var(--space-5) calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--edge-subtle);
  background: transparent;
}
.fx-app-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.fx-app-footer-brand:hover { text-decoration: none; color: inherit; }
.fx-app-footer-brand img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}
.fx-app-footer-brand .fx-app-wordmark { font-size: 13px; letter-spacing: -0.03em; }
.fx-app-footer-sep { width: 1px; height: 12px; background: var(--edge); }
.fx-app-footer-credit {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.fx-app-footer-credit span { color: var(--brand-light); font-weight: 600; }
.fx-app-footer-credit:hover { color: var(--ink-secondary); text-decoration: none; }
.fx-app-footer-credit:hover span { color: var(--brand-mid); }

.fx-admin-bottom {
  display: none;
}

@media (max-width: 1100px) {
  .fx-admin-header.fx-app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .fx-admin-nav-inline { display: none; }
  .fx-admin-bottom {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(19, 19, 21, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--edge-subtle);
  }
  .fx-admin-bottom::-webkit-scrollbar { display: none; }
  .fx-admin-bottom .fx-bottom-link {
    flex: 1 0 auto;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 6px 8px;
    border-radius: 12px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
  }
  .fx-admin-bottom .fx-bottom-link:hover { text-decoration: none; color: var(--ink-secondary); }
  .fx-admin-bottom .fx-bottom-link.is-active {
    color: var(--brand-light);
    background: var(--accent-soft);
  }
  .fx-admin-bottom .fx-bottom-ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
  }
  .fx-admin-bottom .fx-bottom-ico svg { width: 20px; height: 20px; }
  .fx-app,
  .fx-shell { padding-bottom: 64px; }
  .fx-app-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 720px) {
  .fx-admin-header .fx-app-brand-copy { display: none; }
  .fx-app-main,
  .fx-shell-content { padding: var(--space-4); }
}

.fx-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-1);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--edge-subtle);
}
.fx-page-head-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 240px;
}
.fx-page-head-copy h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink-primary);
}
.fx-page-head-copy p,
.fx-page-head-copy .page-lead,
.ae-lead,
.page-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
}
.fx-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.fx-app .card,
.fx-shell .card {
  background: var(--bg-elevated);
  border-color: var(--edge-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.fx-app .card > h2:first-child,
.fx-shell .card > h2:first-child,
.fx-app .card .fx-section-title,
.fx-shell .card .fx-section-title {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.fx-app .card + .card,
.fx-shell .card + .card { margin-top: 0; }

.fx-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 var(--space-4);
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}
.fx-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}
.fx-subnav-link:hover {
  color: var(--ink-primary);
  background: var(--bg-overlay);
  text-decoration: none;
}
.fx-subnav-link.is-active,
.fx-subnav-link[aria-current="page"] {
  color: var(--ink-primary);
  background: var(--bg-overlay);
  border-color: var(--accent-line);
  font-weight: 600;
}

.fx-admin-stack { display: grid; gap: var(--space-4); }

.fx-step-num {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-right: 2px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-overlay);
  border: 1px solid var(--edge);
  color: var(--brand-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.fx-app .step > .btn,
.fx-shell .step > .btn,
.fx-app .step > a.btn,
.fx-shell .step > a.btn {
  justify-self: start;
  text-decoration: none;
}
.fx-app .step > a.btn:hover,
.fx-shell .step > a.btn:hover {
  text-decoration: none;
  color: #fff;
}

.fx-app .table-card,
.fx-shell .table-card,
.fx-app .table-wrap,
.fx-shell .table-wrap {
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-lg);
  overflow: auto;
  background: var(--bg-elevated);
}
.fx-app .table-card,
.fx-shell .table-card { padding: 0; }
.fx-app .table-card table,
.fx-shell .table-card table,
.fx-app .table-wrap table,
.fx-shell .table-wrap table { margin: 0; }
.fx-app .table-card th,
.fx-shell .table-card th,
.fx-app .table-wrap th,
.fx-shell .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.fx-app .step,
.fx-shell .step {
  display: grid;
  gap: var(--space-3);
}
.fx-app .step h2,
.fx-shell .step h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (max-width: 800px) {
  .fx-subnav { width: 100%; }
}

.fx-user-admin { min-height: 34px; padding: 6px 12px; font-size: 12px; text-decoration: none; }
.fx-user-admin:hover { text-decoration: none; }

.fx-app-header:not(.fx-admin-header),
.fx-shell-header:not(.fx-admin-header) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  flex-wrap: nowrap;
  background: rgba(19, 19, 21, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-subtle);
  view-transition-name: app-header;
}
.fx-shell-header:not(.fx-admin-header).is-scrolled { background: rgba(19, 19, 21, 0.97); }

.fx-shell-meta {
  justify-self: end;
  min-width: 0;
  overflow: hidden;
}

.fx-app-nav-inline {
  justify-self: center;
  display: flex;
  align-items: center;
}
.fx-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-input);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-pill);
}

.fx-app-bottom { display: none; view-transition-name: app-nav-m; }

@media (max-width: 1100px) {
  .fx-shell-user-name { display: none; }
}

@media (max-width: 1040px) {
  .fx-app-header:not(.fx-admin-header),
  .fx-shell-header:not(.fx-admin-header) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .fx-app-header:not(.fx-admin-header) .fx-app-nav-inline { display: none; }
}

@media (max-width: 1040px) {
  .fx-app-bottom {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(19, 19, 21, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--edge-subtle);
  }
  .fx-bottom-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 12px;
    color: var(--ink-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  }
  .fx-bottom-link:hover { text-decoration: none; color: var(--ink-secondary); }
  .fx-bottom-link.is-active {
    color: var(--brand-light);
    background: var(--accent-soft);
  }
  .fx-bottom-ico { display: grid; place-items: center; width: 22px; height: 22px; }
  .fx-bottom-ico svg { width: 22px; height: 22px; }
  .fx-shell-user-name { max-width: 72px; }
  .fx-shell-meta-week { display: none; }
  .fx-app-footer {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 720px) {
  .fx-app-brand-copy { display: none; }
}

.fx-crumb {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.fx-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

@keyframes sobe {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fx-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fx-page-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}
@keyframes fx-chip-entra {
  from { opacity: 0; transform: translateY(-4px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Atmosfera única — o mesmo ponto de luz do onboarding (centro-topo), não dois cantos. */
.fx-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -18%, rgba(200, 96, 26, 0.14), transparent 62%),
    var(--bg-base);
  padding-bottom: 0;
}

.fx-app-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-5);
  align-content: start;
  display: grid;
  gap: var(--space-4);
  view-transition-name: app-main;
  animation: sobe 420ms var(--ease-out) both;
}
.fx-app-main.wide { max-width: none; }

/* Hero card — saudação / identidade no topo da página */
.fx-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(200, 96, 26, 0.12), transparent 55%),
    var(--bg-elevated);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-lg);
  animation: sobe 400ms var(--ease-out) both;
}
.fx-hero-copy { display: grid; gap: 6px; min-width: 0; flex: 1 1 220px; }
.fx-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  line-height: 1.2;
}
.fx-hero-lead {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}
.fx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* Chip / selo compacto (ao vivo, status) */
.fx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--edge-subtle);
  background: var(--bg-overlay);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  animation: fx-chip-entra 320ms var(--ease-spring) both;
}
.fx-chip.is-ok {
  color: var(--ok);
  border-color: rgba(61, 171, 107, 0.35);
  background: var(--ok-soft);
}
.fx-chip.is-warn {
  color: var(--warn);
  border-color: rgba(212, 160, 23, 0.35);
  background: var(--warn-soft);
}
.fx-chip.is-live {
  color: var(--ok);
  border-color: rgba(61, 171, 107, 0.3);
}

/* Empty state padronizado */
.fx-empty {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border: 1px dashed var(--edge);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-overlay) 60%, transparent);
  color: var(--ink-secondary);
  font-size: 13px;
}
/* display:grid acima ganha do [hidden] do UA sem !important — empty ficava
   visível por cima da lista (ex.: strikes no painel com conta que TEM strike). */
.fx-empty[hidden] { display: none !important; }
.fx-empty strong { color: var(--ink-primary); font-weight: 600; font-size: 14px; }
.fx-empty .fx-empty-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--brand-light);
  margin-bottom: 4px;
}
.fx-empty .fx-empty-icon svg { width: 20px; height: 20px; }

/* Seção estilo Settings (iOS) — grupos com título curto */
.fx-settings-group { display: grid; gap: var(--space-2); }
.fx-settings-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0 2px;
}
.fx-settings-card {
  background: var(--bg-elevated);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fx-settings-card .card-body { padding: var(--space-4); }
.fx-settings-card.danger-zone {
  border-color: rgba(192, 57, 43, 0.35);
  background: linear-gradient(160deg, var(--danger-soft), var(--bg-elevated) 50%);
}

/* Campo grande (onboarding) — formulários da conta */
.fx-campo-grande {
  display: grid;
  gap: 8px;
}
.fx-campo-grande label {
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
}
.fx-campo-grande input {
  min-height: 48px;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-input);
}

/* Segmented control genérico (semana, tabs) */
.fx-segment {
  display: inline-flex;
  position: relative;
  padding: 3px;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-pill);
}
.fx-segment a,
.fx-segment button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.fx-segment a:hover,
.fx-segment button:hover { color: var(--ink-primary); text-decoration: none; }
.fx-segment a.is-active,
.fx-segment button.is-active {
  color: var(--ink-primary);
  font-weight: 600;
  background: var(--bg-elevated);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--edge-subtle);
}

@media (max-width: 720px) {
  .fx-app { padding-bottom: 72px; }
  .fx-app-main { padding: var(--space-4); gap: var(--space-3); }
  .fx-hero { padding: var(--space-4); }
  .fx-hero-title { font-size: 19px; }
  .fx-toast-host { bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-app-main,
  .fx-hero,
  .fx-chip { animation: none; }
}


/* P1-3: layout .fx-shell/.fx-shell-content vem de adminShellCss — sem redefinir. */
.fx-shell-content > *,
.fx-colunas > *,
.fx-tiles > * { min-width: 0; }
.fx-shell .table-wrap,
.fx-app .table-wrap { max-width: 100%; }


.fx-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
@media (max-width: 900px) { .fx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 330px) { .fx-tiles { grid-template-columns: 1fr; } }
.fx-tile {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.fx-tile:hover { border-color: var(--edge); transform: translateY(-1px); }
.fx-tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* É o rótulo do número -- sem ele o valor não significa nada. Estava em "ink-muted"
     (2.56:1), abaixo do AA e fora do uso decorativo que o DS reserva a esse token. */
  color: var(--ink-secondary);
}
.fx-tile-valor {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}
.fx-tile-valor .unidade {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 3px;
  letter-spacing: 0;
}
.fx-tile-nota { font-size: 12px; color: var(--ink-secondary); min-height: 17px; }
.fx-tile-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--brand-light);
  margin-bottom: 2px;
}
.fx-tile-ico svg { width: 15px; height: 15px; }


.fx-barra {
  position: relative;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  border: 1px solid var(--edge-subtle);
  overflow: hidden;
}
.fx-barra-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dim), var(--brand-core) 60%, var(--brand-mid));
  transition: width var(--dur-slow) var(--ease-spring);
}
.fx-barra-fill.ok { background: linear-gradient(90deg, #2c7a4d, var(--ok)); }
.fx-barra-marca {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--ink-secondary);
  opacity: 0.75;
}
.fx-barra-legenda {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: 7px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.fx-linhas { display: grid; gap: 2px; }
.fx-linha {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--edge-subtle);
  font-size: 13px;
}
.fx-linha:last-child { border-bottom: 0; }
.fx-linha dt { color: var(--ink-secondary); margin: 0; }
.fx-linha dd { margin: 0; color: var(--ink-primary); font-weight: 500; text-align: right; }

.fx-colunas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.fx-itens { display: grid; gap: var(--space-2); }
.fx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 12px;
  background: var(--bg-overlay);
  border: 1px solid var(--edge-subtle);
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.fx-item:hover { border-color: var(--edge); background: var(--bg-input); }
.fx-item-copy { display: grid; gap: 2px; min-width: 0; }
.fx-item-copy strong { font-weight: 600; letter-spacing: -0.01em; }
.fx-item-copy span { font-size: 12px; color: var(--ink-secondary); }

.fx-form { display: grid; gap: var(--space-3); max-width: 380px; }
.fx-form .campo-erro { font-size: 12px; color: var(--danger); min-height: 16px; }
.fx-form button { justify-self: start; }

@media (max-width: 720px) {
  .fx-shell { padding-bottom: 72px; }
  .fx-shell-content { padding: var(--space-4); }
  .fx-tile-valor { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-shell-content { animation: none; }
}
