:root {
  color-scheme: dark;
  --bg: #001218;
  --panel: #06242d;
  --panel-strong: #082e38;
  --line: #164854;
  --text: #f7fbfc;
  --muted: #9db7be;
  --green: #00d99a;
  --gold: #f2c94c;
  --danger: #ff6b6b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 217, 154, .13), transparent 32rem),
    radial-gradient(circle at 95% 90%, rgba(242, 201, 76, .08), transparent 30rem),
    var(--bg);
}

button, input { font: inherit; }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(500px, 1.05fr);
}

.brand-panel,
.access-panel {
  padding: clamp(32px, 6vw, 88px);
}

.brand-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.brand { display: inline-flex; width: fit-content; color: inherit; text-decoration: none; }
.brand-logo { display: flex; align-items: center; gap: 5px; width: min(445px, 94%); }
.brand-symbol { display: block; width: 110px; height: 110px; object-fit: contain; transform: translateY(-4px); }
.brand-identity { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 7px; }
.brand-wordmark { display: block; width: 100%; height: auto; }
.brand-tagline { color: #b8c8cc; font-size: clamp(.46rem, .72vw, .69rem); font-weight: 800; letter-spacing: .025em; white-space: nowrap; text-align: center; }
.brand-tagline strong { color: var(--green); }
.brand-copy { margin: auto 0; max-width: 650px; }
.eyebrow, .kicker { color: var(--green); font-size: .77rem; font-weight: 800; letter-spacing: .18em; }
.brand-copy h1 { margin: 24px 0; font-size: clamp(2.8rem, 5.5vw, 5.7rem); line-height: .96; letter-spacing: -.065em; }
.brand-copy p { max-width: 560px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.28rem); line-height: 1.7; }
.security-note { margin: 0; color: var(--muted); font-size: .86rem; }
.security-note span { color: var(--green); margin-right: 8px; }

.access-panel { display: grid; place-items: center; }
.access-card {
  width: min(100%, 520px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(8, 46, 56, .96), rgba(4, 31, 39, .98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, .32);
}
.access-heading, .dashboard-header { display: flex; align-items: center; gap: 18px; }
.access-heading h2, .dashboard-header h2 { margin: 5px 0 0; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.04em; }
.kicker { margin: 0; }
.lock {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #00171d;
  background: var(--green);
  font-size: 2rem;
  font-weight: 900;
}
.lock svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.intro { margin: 24px 0 30px; color: var(--muted); line-height: 1.6; }
label { display: block; margin: 20px 0 9px; color: #d6e3e7; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
input {
  width: 100%;
  height: 58px;
  border: 1px solid #24525d;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  background: #031b22;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 217, 154, .12); }
.password-field { position: relative; }
.password-field input { padding-right: 92px; }
.password-field button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 42px;
  border: 0;
  padding: 0 12px;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
}
.message { min-height: 24px; margin: 16px 0 0; color: var(--danger); font-size: .9rem; }
.primary-button, .secondary-button {
  border-radius: 14px;
  cursor: pointer;
  font-weight: 850;
}
.primary-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  color: #00171d;
  background: var(--green);
  box-shadow: 0 13px 30px rgba(0, 217, 154, .17);
}
.primary-button:disabled { cursor: wait; opacity: .65; }
.secondary-button { border: 1px solid var(--line); padding: 10px 18px; color: var(--text); background: transparent; }
.restricted { margin: 24px 0 0; color: #78959d; font-size: .78rem; line-height: 1.55; text-align: center; }
.dashboard { width: min(100%, 700px); }
.dashboard-header { justify-content: space-between; align-items: flex-start; }
.ready-state { padding: clamp(44px, 8vw, 90px) 10px 35px; text-align: center; }
.ready-icon { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 24px; border: 1px solid rgba(0, 217, 154, .5); border-radius: 50%; color: var(--green); background: rgba(0, 217, 154, .1); font-size: 2rem; }
.ready-state h3 { margin: 0 0 12px; font-size: 1.55rem; }
.ready-state p { max-width: 470px; margin: 0 auto; color: var(--muted); line-height: 1.65; }

.admin-portal { min-height: 100vh; --admin-sidebar-width: 272px; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--admin-sidebar-width);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid #153741;
  background: #061a22;
}
.sidebar-brand a { display: flex; align-items: flex-start; gap: 7px; color: inherit; text-decoration: none; }
.sidebar-brand > a > img { width: 48px; height: 48px; margin-top: -7px; object-fit: contain; }
.sidebar-brand a span { display: flex; flex-direction: column; gap: 2px; }
.sidebar-brand a span img { width: 132px; }
.sidebar-brand small { color: #81969b; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-brand > button { display: none; }
.admin-nav { display: grid; gap: 5px; margin-top: 33px; }
.admin-nav a {
  min-height: 43px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  color: #f2f6f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.012em;
  text-decoration: none;
}
.admin-nav a span { width: 21px; color: #68828a; text-align: center; font-size: 17px; }
.admin-nav a:hover { color: white; background: rgba(255, 255, 255, .045); }
.admin-nav a.active { color: #effcf8; background: rgba(0, 217, 154, .1); }
.admin-nav a.active span { color: var(--green); }
.admin-account-card { margin-top: auto; padding: 17px; border: 1px solid #254b54; border-radius: 17px; background: #092630; }
.admin-account-card > div { display: flex; align-items: center; gap: 10px; }
.admin-account-card > div > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: #002117; background: var(--green); font-size: 11px; font-weight: 900; }
.admin-account-card p { margin: 12px 0; color: #9dafb4; font-size: 11px; line-height: 1.5; }
.admin-account-card > div p { margin: 0; }
.admin-account-card small, .admin-account-card strong { display: block; }
.admin-account-card strong { margin-top: 2px; color: white; font-size: 13px; }
.admin-account-card button { width: 100%; min-height: 38px; border: 1px solid #32606b; border-radius: 10px; color: white; background: transparent; cursor: pointer; font-weight: 800; transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.admin-account-card button:hover { border-color: var(--gold); color: var(--gold); background: rgba(242, 201, 76, .07); box-shadow: 0 0 0 3px rgba(242, 201, 76, .07); }
.admin-backdrop { display: none; }
.admin-main { min-height: 100vh; margin-left: var(--admin-sidebar-width); }
.admin-topbar { min-height: 135px; padding: 25px clamp(25px, 4vw, 55px); display: flex; align-items: center; gap: 25px; border-bottom: 1px solid #163842; background: rgba(5, 24, 32, .92); }
.admin-topbar > div { flex: 1; }
.admin-topbar .admin-topbar-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.admin-topbar.clients-context { min-height: 148px; }
.admin-topbar.clients-context > .admin-topbar-copy > span { color: var(--gold); font-size: 10px; }
.admin-topbar.clients-context h1 { margin-top: 10px; font-size: 30px; }
.admin-topbar.clients-context p { color: #e7eef0; font-size: 13px; }
.admin-topbar > div > span { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.admin-topbar h1 { margin: 6px 0 3px; font-size: 25px; line-height: 1.1; letter-spacing: -.025em; }
.admin-topbar p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-menu-button { display: none; }
.admin-status { padding: 8px 11px; border: 1px solid #235044; border-radius: 20px; color: #b7cbc6; font-size: 10px; }
.admin-status i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.admin-content { width: min(calc(100% - 48px), 1400px); margin: 0 auto; padding: 34px 0 60px; }
.admin-welcome-card { min-height: 260px; padding: clamp(28px, 5vw, 56px); display: flex; align-items: center; gap: 28px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(150deg, #092731, #071d26); }
.admin-welcome-card .ready-icon { flex: 0 0 auto; margin: 0; }
.admin-welcome-card h2 { margin: 8px 0 12px; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.admin-welcome-card > div > p:last-child { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.65; }

.clients-page { width: min(calc(100% - 48px), 1680px); }
.clients-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.clients-heading h2 { margin: 7px 0 6px; font-size: clamp(1.75rem, 2.8vw, 2.25rem); letter-spacing: -.035em; }
.clients-heading p { margin: 0; color: var(--muted); }
.clients-kicker { color: var(--gold) !important; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.clients-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.clients-total-pill { min-height: 36px; padding: 0 15px; display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; color: #fff; background: #169a65; font-size: 11px; font-weight: 800; }
.clients-total-pill strong { color: #fff; }
.gold-action { min-height: 36px; padding: 0 15px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; color: #191500; background: linear-gradient(135deg, #f8cc36, #eeb800); box-shadow: 0 9px 22px rgba(242, 201, 76, .12); cursor: pointer; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.gold-action:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gold-action span { font-size: 15px; }
.client-metrics { display: grid; grid-template-columns: minmax(145px, .95fr) minmax(145px, .95fr) minmax(155px, 1.08fr) minmax(145px, .95fr) minmax(125px, .78fr) minmax(205px, 1.34fr); gap: 9px; margin-bottom: 20px; }
.client-metrics article { min-height: 72px; padding: 11px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #24434c; border-radius: 14px; background: rgba(3, 18, 24, .76); }
.client-metrics p { min-width: 0; margin: 0; }
.client-metrics strong, .client-metrics small { display: block; }
.client-metrics strong { font-size: 18px; line-height: 1.05; }
.client-metrics strong em { color: var(--gold); font-size: 8px; font-style: normal; text-transform: uppercase; }
.client-metrics small { margin-top: 4px; color: #c5d1d5; font-size: 10px; line-height: 1.25; }
.metric-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #07181d; }
.metric-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plans-metric .plans-copy { flex: 1; }
.plans-metric .plans-copy strong { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.plans-metric .plans-copy strong span { display: inline-flex; align-items: baseline; gap: 4px; }
.plans-metric .plans-copy strong b { color: white; font-size: 17px; font-weight: 500; }
.plans-metric .plans-copy strong em { line-height: 1; }
.metric-icon.gold { background: #f0ba00; }.metric-icon.green { background: #20a26e; }.metric-icon.red { color: white; background: #df4653; }.metric-icon.purple { color: white; background: #7957d5; }.metric-icon.coral { color: white; background: #c43f49; }
/* Card "Parceiros por nível": 4 sub-valores, não cabe no layout ícone+número
   pensado pra 1 valor só — vira uma mini-legenda 2x2 dentro do próprio card. */
.client-metrics-partners { grid-template-columns: minmax(145px, 1fr) minmax(145px, 1fr) minmax(110px, .7fr) minmax(110px, .7fr) minmax(190px, 1.05fr); }
.levels-metric { flex-direction: column; align-items: center; justify-content: center; gap: 7px; }
.levels-metric > small { margin: 0; color: #c5d1d5; font-size: 10px; line-height: 1.25; }
.levels-grid { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 5px 18px; }
.levels-grid span { display: flex; align-items: center; gap: 5px; color: #c5d1d5; font-size: 11px; white-space: nowrap; }
.levels-grid b { color: white; font-size: 13px; font-weight: 700; }
.level-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.level-dot-bronze { background: #c5946a; }
.level-dot-prata { background: #becdd2; }
.level-dot-ouro { background: var(--gold); }
.level-dot-diamante { background: var(--green); }
.clients-panel { overflow: hidden; border: 1px solid #24434c; border-radius: 19px; background: rgba(2, 16, 21, .82); }
.clients-panel-header { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #203d45; }
.clients-panel-header h3 { margin: 0 0 5px; font-size: 18px; }
.clients-panel-header p { margin: 0; color: var(--muted); font-size: 12px; }
.client-search { width: min(390px, 42%); height: 40px; margin: 0; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #2a343b; border-radius: 11px; background: #050708; }
.client-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.client-search input { height: 37px; padding: 0; border: 0; box-shadow: none; color: #fff; background: transparent; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12.5px; font-weight: 450; letter-spacing: -.015em; text-transform: none; }
.client-search input::placeholder { color: #fff; opacity: 1; }
.client-search:focus-within { border-color: #536067; box-shadow: 0 0 0 3px rgba(255, 255, 255, .035); }
.client-filters { padding: 13px 24px; display: grid; grid-template-columns: 1fr 1fr 1fr 1.35fr; gap: 14px; border-bottom: 1px solid #203d45; }
.client-filters > label, .client-filters legend { margin: 0; color: #f7f9fa; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .035em; line-height: 1.2; }
.client-filters select { width: 100%; height: 38px; margin-top: 7px; padding: 0 11px; border: 1px solid #294952; border-radius: 9px; color: white; background: #061a22; font-size: 12px; }
.client-filters fieldset { margin: 0; padding: 0; border: 0; }
.client-filters fieldset > label { min-height: 38px; margin: 7px 0 0; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; color: white; font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.client-filters fieldset > label:has(input:checked) { color: var(--gold); background: rgba(242, 201, 76, .09); }
.client-filters input[type="radio"] { width: 13px; height: 13px; accent-color: var(--gold); }
/* Painel com um único filtro (ex. Parceiros): dispensa a grade de 4 colunas
   pensada para a barra de filtros de Clientes, senão o fieldset fica preso
   na 1ª coluna (estreita) e os 4 radios quebram em duas linhas. */
.client-filters-single { display: block; }
.clients-table-wrap { overflow-x: auto; }
.clients-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
/* Tabelas de Parceiros e Saques têm menos colunas que a de Clientes e não
   precisam da largura mínima pensada pra ela — sem isso, ficava com barra de
   rolagem horizontal mesmo cabendo tudo na tela. */
.clients-table-compact { min-width: 0; }
.clients-table-compact th, .clients-table-compact td { white-space: normal; overflow-wrap: break-word; }
.gold-heading { color: var(--gold) !important; }
.clients-table td .client-row-edit + .client-row-edit { margin-left: 8px; }
.clients-table th { padding: 15px 18px; color: #dce6e8; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.clients-table td { padding: 16px 18px; border-top: 1px solid #1d3941; color: #fff; font-size: 12px; white-space: nowrap; }
.clients-table td:first-child { display: flex; align-items: center; gap: 10px; }
.clients-table td p { margin: 0; }
.clients-table td strong, .clients-table td small { display: block; }
.clients-table td small { margin-top: 4px; color: #fff; font-size: 10px; }
.clients-table td .tag { color: #fff; }
.client-avatar { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--gold); font-size: 11px; font-weight: 900; }
.tag { padding: 5px 8px; display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 16px; font-size: 10px; font-weight: 800; }
.tag.standard { color: #8cc4f8; border-color: #173f60; background: #0b2638; }.tag.additional { color: #c1a9ff; border-color: #4e397f; background: #251c3d; }
.tag.partner { color: #f7d45f; border-color: #655219; background: #2b240d; }.tag.member { color: #8dd6ff; border-color: #24536d; background: #0d2938; }.tag.board { color: #ffc1df; border-color: #6e3450; background: #331a27; }
.tag.essential { color: #ffe27b; border-color: #67551d; background: #29230f; }.tag.plus { color: #00e6a0; border-color: #176749; background: #0b2d25; }.tag.premium { color: #ffd45b; border-color: #806016; background: #34270a; }.tag.trial { color: #bda9ff; border-color: #443272; background: #201935; }
.tag.active { color: #40e3a4; background: rgba(0, 217, 154, .1); }.tag.canceled { color: #ff8086; background: rgba(255, 92, 92, .1); }
.clients-table td:nth-child(2) .tag,
.clients-table td:nth-child(6) .tag,
.clients-table td:nth-child(7) .tag { padding: 0; border: 0; border-radius: 0; color: #fff; background: transparent; }
.clients-empty { padding: 30px; color: var(--muted); text-align: center; }

/* Clientes: textos auxiliares e títulos brancos, sem alterar os destaques. */
.admin-topbar.clients-context p,
.clients-heading p:not(.clients-kicker),
.client-metrics small,
.clients-panel-header p,
.client-filters > label,
.client-filters legend,
.clients-table th,
.clients-empty { color: #fff; }
.admin-portal:has(#clientes:not([hidden])) .sidebar-brand small,
.admin-portal:has(#clientes:not([hidden])) .admin-account-card p,
.admin-portal:has(#clientes:not([hidden])) .admin-status { color: #fff; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; padding-bottom: 24px; border-right: 0; }
  .brand-copy { margin: 70px 0 35px; }
  .brand-copy h1 { font-size: clamp(2.65rem, 11vw, 4.6rem); }
  .security-note { display: none; }
  .access-panel { padding-top: 20px; }
  body.admin-menu-open { overflow: hidden; }
  .admin-sidebar { width: min(86vw, 300px); transform: translateX(-105%); transition: transform .25s; }
  .admin-sidebar.open { transform: none; }
  .sidebar-brand > button { display: block; margin-left: auto; border: 0; color: white; background: transparent; font-size: 18px; }
  .sidebar-brand { display: flex; }
  .sidebar-brand a { flex: 1; }
  .admin-backdrop { position: fixed; inset: 0; z-index: 40; display: block; border: 0; background: rgba(0, 8, 12, .72); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .admin-backdrop.open { opacity: 1; pointer-events: auto; }
  .admin-main { margin-left: 0; }
  .admin-menu-button { width: 42px; height: 42px; display: block; flex: 0 0 auto; border: 1px solid #254b55; border-radius: 10px; color: white; background: #09252e; }
  .admin-topbar { min-height: 105px; padding: 18px 20px; }
  .admin-topbar h1 { font-size: 23px; }
  .admin-topbar p, .admin-status { display: none; }
  .admin-topbar.clients-context { align-items: flex-start; flex-wrap: wrap; }
  .admin-topbar.clients-context p { display: block; }
  .admin-topbar .admin-topbar-actions { width: 100%; justify-content: flex-start; }
  .clients-heading, .clients-panel-header { align-items: stretch; flex-direction: column; }
  .clients-heading-actions { justify-content: flex-start; }
  .client-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-search { width: 100%; }
  .client-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .brand-panel, .access-panel { padding-left: 20px; padding-right: 20px; }
  .brand-copy { margin: 48px 0 12px; }
  .brand-copy p { margin-bottom: 0; }
  .access-card { padding: 26px 20px; border-radius: 22px; }
  .lock { width: 50px; height: 50px; border-radius: 15px; }
  .brand-logo { width: min(360px, 100%); }
  .brand-symbol { width: 90px; height: 90px; transform: translateY(-3px); }
  .admin-topbar > div > span { font-size: 8px; }
  .admin-topbar h1 { font-size: 19px; }
  .admin-content { width: min(calc(100% - 28px), 1400px); padding-top: 20px; }
  .admin-welcome-card { min-height: 300px; flex-direction: column; align-items: flex-start; gap: 20px; }
  .clients-page { width: min(calc(100% - 24px), 1680px); }
  .client-metrics, .client-filters { grid-template-columns: 1fr; }
  .gold-action { flex: 1; justify-content: center; }
  .clients-total-pill { width: 100%; justify-content: center; }
}
.clients-table tbody td,
.clients-table tbody td *,
.clients-table tbody td .tag,
.clients-table tbody td small {
  color: #fff;
}

.clients-table tbody td .client-avatar {
  color: #071b21;
}
.client-avatar--active { background: var(--green); }
.client-avatar--trial { background: var(--gold); }
.client-avatar--cancelled { background: var(--danger); }
.client-avatar--inactive { background: #9db7be; }

.clients-table tbody td,
.clients-table tbody td * {
  font-weight: 400;
}

/* Visão geral: prévia visual independente da relação real de clientes. */
#visao-geral { padding-top: 22px; }
.overview-toolbar { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.overview-demo { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.overview-demo i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.overview-date { color: var(--muted); font-size: 11px; }
.overview-date strong { margin-left: 8px; padding: 6px 10px; border: 1px solid #23434b; border-radius: 7px; color: var(--text); font-weight: 500; }
.overview-period-controls { display: flex; align-items: center; gap: 12px; }
.overview-period-filter { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #23434b; border-radius: 9px; background: #03171e; }
.overview-period-filter button { min-height: 28px; padding: 0 12px; border: 0; border-radius: 6px; color: white; background: transparent; font-size: 11px; font-weight: 500; cursor: pointer; }
.overview-period-filter button[aria-pressed="true"] { color: #001e17; background: var(--green); }
.overview-period-filter button:hover:not([aria-pressed="true"]) { background: #15363f; }
.overview-period-filter button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.overview-custom-period { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.overview-custom-period[hidden] { display: none; }
.overview-custom-period label { display: flex; align-items: center; gap: 6px; margin: 0; color: white; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.overview-custom-period input { width: 132px; height: 32px; min-height: 32px; padding: 0 8px; border: 1px solid #23434b; border-radius: 7px; background: #03171e; color: white; color-scheme: dark; font: inherit; }
.overview-custom-period button { height: 32px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--green); color: #001e17; font-size: 11px; font-weight: 500; cursor: pointer; }
.overview-custom-period input:focus { box-shadow: none; }
.overview-custom-period input:focus-visible { outline: none; }
.overview-custom-period button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.overview-period-error { color: #ff7979; font-size: 11px; }
@media (max-width: 650px) { .overview-toolbar { flex-wrap: wrap; }.overview-period-controls { flex-wrap: wrap; }.overview-period-filter button { padding: 0 10px; } }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.overview-metrics article { padding: 17px 19px; border: 1px solid #1c3d46; border-radius: 14px; background: #051c24; }
.overview-metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #b2c6cc; font-size: 12px; }
.overview-active-label { color: #76edff; }
.overview-partners-label { color: var(--gold); }
.client-row-edit { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #2c565c; border-radius: 7px; color: var(--green) !important; background: #0a2a30; font-size: 11px; cursor: pointer; }
.client-row-edit:hover { border-color: var(--green); background: #103b3c; }
.client-row-edit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.client-row-edit span { color: inherit !important; }
.client-dialog { width: min(780px, calc(100% - 28px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid #2c535c; border-radius: 18px; color: white; background: #061d25; box-shadow: 0 24px 90px #0009; }
.client-dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
html.client-modal-open { overflow: hidden; overscroll-behavior: none; }
body.client-modal-open { position: fixed; top: var(--client-modal-scroll-top); left: 0; right: 0; overflow: hidden; }
.client-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 42px); }
.client-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 12px; }
.client-dialog-heading h2 { margin: 6px 0; font-size: 22px; font-weight: 600; }
.client-dialog-heading p { margin: 0; color: white; font-size: 12px; }
.client-dialog-heading button { width: 30px; height: 30px; border: 1px solid #2b4a52; border-radius: 8px; color: white; background: transparent; cursor: pointer; }
.client-dialog-message { min-height: 16px; margin: 0; padding: 0 24px 12px; color: white; font-size: 12px; }
.client-dialog-scroll { padding: 0 24px 22px; overflow-y: auto; }
.client-dialog fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.client-dialog legend, .client-linked-data h3 { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 600; }
.client-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.client-form-grid label { min-width: 0; margin: 0; color: white; font-size: 10px; font-weight: 500; letter-spacing: .04em; }
.client-form-grid input, .client-form-grid select { width: 100%; height: 38px; margin-top: 6px; padding: 0 11px; border: 1px solid #2a4a54; border-radius: 8px; color: white; background: #03171e; font: inherit; font-size: 12px; letter-spacing: 0; }
.client-form-grid input:disabled, .client-form-grid select:disabled { color: white; -webkit-text-fill-color: white; opacity: 1; background: #0b252d; }
.client-form-grid input::placeholder { color: white; opacity: 1; }
.client-field-wide { grid-column: 1 / -1; }
.client-form-grid small { display: block; margin-top: 5px; color: white; font-size: 10px; text-transform: none; letter-spacing: 0; }
.client-preferences { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.client-preferences label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.client-preferences input { width: 14px; height: 14px; accent-color: var(--green); }
.client-linked-data { padding-top: 18px; border-top: 1px solid #21424b; }
.client-linked-data dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.client-linked-data dt { color: white; font-size: 10px; }.client-linked-data dd { margin: 5px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.client-dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 16px 24px; border-top: 1px solid #21424b; }
.client-dialog-actions button { min-height: 35px; padding: 0 15px; border: 1px solid #2e545e; border-radius: 8px; color: white; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }
.client-dialog-actions .client-save { border-color: var(--green); color: white; background: var(--green); }
.client-dialog-actions .client-deactivate { margin-left: auto; border-color: #ae515a; color: white; }
.client-dialog-actions .client-deactivate:not(:disabled):hover { background: #71303b; }
.client-dialog button:disabled { opacity: .4; cursor: default; }.client-dialog-actions button:not(:disabled):hover { filter: brightness(1.15); }
@media (max-width: 520px) { .client-form-grid { grid-template-columns: 1fr; }.client-dialog-heading, .client-dialog-scroll { padding-left: 16px; padding-right: 16px; }.client-dialog-actions { padding: 14px 16px; gap: 6px; }.client-dialog-actions button { padding: 0 10px; flex: 1; }.client-linked-data dl { grid-template-columns: 1fr; } }
.overview-mini-icon { color: var(--green); font-size: 19px; line-height: 1; }
.overview-mini-icon.gold { color: var(--gold); }
.overview-active-label .overview-mini-icon { color: #76edff; }
.overview-metrics article > strong { display: block; margin: 9px 0 5px; font-size: 29px; font-weight: 650; letter-spacing: -.04em; }
.overview-metrics article > small { display: block; color: #7e9aa3; font-size: 10px; line-height: 1.5; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.overview-card { min-width: 0; padding: 22px; border: 1px solid #1c3d46; border-radius: 16px; background: linear-gradient(145deg, #06222a, #031a21); }
.overview-clients,
.overview-daily {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: #29456c;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(126, 168, 226, .16), transparent 62%),
    linear-gradient(155deg, #152c50 0%, #0b1c38 45%, #040c1e 100%);
  box-shadow: inset 0 1px 0 rgba(202, 222, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .45), 0 8px 22px rgba(0, 6, 20, .25);
}
.overview-clients::before,
.overview-daily::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(166deg, rgba(225, 237, 255, .12) 0%, rgba(225, 237, 255, .035) 34%, transparent 34.5%, transparent 100%);
}
.overview-clients .overview-donut::before { background: #0b1c38; }
.overview-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.overview-eyebrow { color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.overview-card h2 { margin: 6px 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.overview-card header p { margin: 0; color: #8eabb4; font-size: 11px; line-height: 1.5; }
.overview-period { flex-shrink: 0; padding: 6px 8px; border: 1px solid #25454c; border-radius: 7px; color: #9fb6bc; font-size: 9px; }
.overview-client-chart { display: flex; align-items: center; gap: 28px; padding: 27px 0 24px; }
.overview-donut { position: relative; display: grid; place-items: center; width: 172px; height: 172px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--green) 0 61.667%, var(--gold) 61.667% 83.333%, #35545c 83.333% 100%); transform: rotate(-90deg); }
.overview-donut::before { content: ''; position: absolute; inset: 18px; border-radius: 50%; background: #052029; }
.overview-donut > div { position: relative; text-align: center; transform: rotate(90deg); }
.overview-donut strong { display: block; font-size: 32px; font-weight: 650; letter-spacing: -.04em; }
.overview-donut span { display: block; margin-top: 4px; color: #8eabb4; font-size: 9px; }
.overview-legend { flex: 1; min-width: 0; }
.overview-legend > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #1c3941; font-size: 11px; }
.overview-legend > div > span { display: flex; align-items: center; gap: 8px; }
.overview-legend strong { font-weight: 600; white-space: nowrap; }
.overview-legend strong small { margin-left: 7px; color: #78969f; font-size: 9px; font-weight: 400; }
.overview-legend p, .overview-chart-note { margin: 12px 0 0; color: #78969f; font-size: 10px; line-height: 1.6; }
.green-dot, .gold-dot, .neutral-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--green); }
.gold-dot { background: var(--gold); }.neutral-dot { background: #66818a; }
.overview-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 17px; border-top: 1px solid #1c3941; font-size: 11px; color: #a9c0c7; }
.overview-card footer > span { display: inline-flex; align-items: center; gap: 7px; }
.overview-card footer strong { color: var(--text); font-weight: 600; }
.overview-card footer small { margin-left: 5px; color: #78969f; font-size: 9px; font-weight: 400; }
.overview-partner-total { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.overview-partner-total > strong { font-size: 34px; font-weight: 650; letter-spacing: -.04em; }
.overview-partner-total > span { color: var(--green); font-size: 12px; }
.overview-partner-total small { display: block; margin-top: 4px; color: #94acb2; font-size: 10px; }
.overview-partner-bars { display: grid; gap: 13px; margin-bottom: 24px; }
.overview-partner-bars > div { display: grid; grid-template-columns: 62px 1fr 20px; align-items: center; gap: 12px; font-size: 11px; }
.overview-partner-bars > div > div { height: 6px; border-radius: 5px; background: #15333d; }
.overview-partner-bars i { display: block; width: var(--bar); height: 100%; border-radius: inherit; background: var(--bar-color); }
.overview-partner-bars strong { text-align: right; font-size: 11px; font-weight: 500; }
.overview-conversion { color: var(--green); font-size: 26px; font-weight: 600; text-align: right; white-space: nowrap; }
.overview-conversion small, .overview-chart-total small { display: block; margin-top: 4px; color: #8eabb4; font-size: 9px; font-weight: 400; }
.overview-funnel-steps { display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.overview-funnel-steps li > div { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; }
.overview-funnel-steps strong { font-size: 14px; font-weight: 600; }
.funnel-track { display: block; height: 12px; overflow: hidden; border-radius: 4px; background: #15333d; }
.funnel-track i { display: block; height: 100%; width: var(--bar); background: var(--gold); border-radius: inherit; }
.overview-funnel-steps li:nth-child(2) .funnel-track i { background: #728f96; }
.overview-funnel-steps li:last-child .funnel-track i { background: var(--green); }
.overview-funnel-steps li > small { display: block; margin-top: 5px; color: #79969f; font-size: 9px; }
.overview-chart-total { font-size: 28px; font-weight: 600; text-align: right; }
.overview-daily-chart { display: flex; height: 190px; gap: 12px; margin: 22px 0 20px; }
.daily-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 24px; color: #719099; font-size: 9px; }
.daily-bars { flex: 1; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; border-bottom: 1px solid #32505a; background: repeating-linear-gradient(to top, transparent 0, transparent 81px, #1a3942 82px, transparent 83px); }
.daily-bars > div { position: relative; display: flex; height: calc(100% - 24px); flex: 1; max-width: 42px; flex-direction: column; justify-content: flex-end; align-items: center; margin-bottom: 24px; }
.daily-bars i { display: block; width: 100%; height: var(--height); border-radius: 5px 5px 0 0; background: var(--green); }
.daily-bars > div:nth-child(even) i { background: var(--gold); }
.daily-bars strong { margin-bottom: 6px; font-size: 10px; font-weight: 500; }
.daily-bars span { position: absolute; top: calc(100% + 9px); color: #849fa7; font-size: 9px; }

/* Textos auxiliares brancos apenas na visão geral, preservando os destaques. */
#visao-geral .overview-demo,
#visao-geral .overview-date,
#visao-geral .overview-metric-label:not(.overview-active-label):not(.overview-partners-label):not(.overview-registrations-label),
#visao-geral .overview-metrics article > small,
#visao-geral .overview-card header p,
#visao-geral .overview-period,
#visao-geral .overview-donut span,
#visao-geral .overview-legend strong small,
#visao-geral .overview-legend p,
#visao-geral .overview-chart-note,
#visao-geral .overview-card footer,
#visao-geral .overview-card footer small,
#visao-geral .overview-partner-total small,
#visao-geral .overview-conversion small,
#visao-geral .overview-chart-total small,
#visao-geral .overview-funnel-steps li > small,
#visao-geral .daily-y-axis,
#visao-geral .daily-bars span { color: #fff; }
#visao-geral .overview-registrations-label { color: var(--green); }
.admin-portal:has(#visao-geral:not([hidden])) .admin-topbar p,
.admin-portal:has(#visao-geral:not([hidden])) .admin-status,
.admin-portal:has(#visao-geral:not([hidden])) .sidebar-brand small,
.admin-portal:has(#visao-geral:not([hidden])) .admin-account-card p { color: #fff; }

@media (max-width: 1200px) {
  .overview-client-chart { gap: 16px; }.overview-donut { width: 140px; height: 140px; }
  .overview-legend strong small { display: none; }.overview-card { padding: 18px; }
}
@media (max-width: 1050px) {
  .overview-grid { grid-template-columns: 1fr; }.overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-donut { width: 172px; height: 172px; }.overview-legend strong small { display: inline; }
}
@media (max-width: 520px) {
  .overview-toolbar { align-items: flex-start; }.overview-date { display: none; }
  .overview-metrics { gap: 9px; }.overview-metrics article { padding: 14px 12px; }.overview-metric-label { font-size: 10px; }
  .overview-metrics article > small { font-size: 9px; }.overview-client-chart { flex-direction: column; }.overview-legend { width: 100%; }
  .overview-card header { gap: 8px; }.overview-period { display: none; }.overview-card h2 { font-size: 16px; }
  .overview-card footer { flex-wrap: wrap; }.overview-card footer small { margin-left: 0; }.daily-bars { gap: 9px; }
}
