/* ==================================================
   TOKENS — tema claro (padrão) e escuro
   ================================================== */
:root {
  /* OneLife Sports — dourado sobre azul-marinho */
  --g1: #ffc62e;  --g2: #f0ab00;  --g3: #d99a00;
  --grad: linear-gradient(135deg, var(--g1) 0%, var(--g2) 60%, var(--g3) 100%);
  --sobre-marca: #002147;        /* texto/ícone em cima do dourado */
  --navy: #002147;
  --navy-2: #0a2a5e;
  --brand-soft: #fff4d9;
  --brand-ink: #8a5a00;
  --ink: #0a1a33;
  --ink-2: #2d3f5c;
  --muted: #64748b;
  --line: #e5e9f0;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f5f9;
  --white: #ffffff;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #d97706;
  --star: #f59e0b;
  --r: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow: 0 10px 30px -12px rgba(15,23,42,.22);
}

:root[data-theme="dark"] {
  /* o escuro usa o azul-marinho da marca, não cinza neutro */
  --sobre-marca: #002147;
  --brand-soft: rgba(240,171,0,.16);
  --brand-ink: #ffc62e;
  --ink: #e8eef8;
  --ink-2: #b2c0d6;
  --muted: #8295b2;
  --line: #1c3053;
  --bg: #04101f;
  --surface: #0a1c35;
  --surface-2: #0d2340;
  --surface-3: #132c4d;
  --danger: #f87171;
  --danger-soft: rgba(248,113,113,.16);
  --warn: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 12px 34px -12px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}
.material-symbols-rounded { line-height: 1; user-select: none; }
.muted { color: var(--muted); }
/* classes com display:flex venceriam o [hidden] padrão do navegador */
[hidden] { display: none !important; }

/* ---------- Flashes ---------- */
.flashes { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.flash { padding: 12px 16px; border-radius: 11px; font-size: 14px; font-weight: 500; color: #fff; box-shadow: var(--shadow); animation: fIn .28s ease; }
.flash-success { background: #f0ab00; } .flash-danger { background: #dc2626; }
.flash-warning { background: #d97706; } .flash-info { background: #334155; }
@keyframes fIn { from { opacity: 0; transform: translateX(16px) } to { opacity: 1; transform: none } }

/* ==================================================
   LOGIN — foto full-bleed + cartão de vidro
   ================================================== */
.auth-page { overflow: hidden; background: #002147; }

.auth-stage { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
/* ancora no topo: garante que a logo da foto nunca seja cortada */
.stage-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* véu discreto: escurece de leve e puxa o verde da marca, sem apagar a foto */
.stage-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 82% 55%, rgba(2,20,17,.42), transparent 72%),
    linear-gradient(to right, rgba(2,14,36,.35) 0%, rgba(2,14,36,.10) 38%, rgba(2,14,36,.30) 100%);
}

/* ----- valores da empresa -----
   No Portal original os cartões ficam sobre um painel navy SÓLIDO — é dele que
   vem o contraste. Sobre a foto isso se perde, então o bloco ganha o próprio
   painel de vidro escuro, que funciona como essa base. */
.valores {
  position: absolute; z-index: 4;
  left: 5.5%; top: auto; bottom: 9.6vh;   /* o JS acerta no pixel */
  width: clamp(400px, 39vw, 545px);
  padding: 20px 20px 22px;
  color: #fff;
  background: linear-gradient(165deg, rgba(0,33,71,.80), rgba(0,20,45,.88));
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.10);
}

.valores-titulo {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--g2); margin-bottom: 15px;
}
.valores-titulo::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(240,171,0,.5), transparent);
}

.valores-lista {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
}

.valores-lista li {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 700; font-size: 12.5px; line-height: 1.25;
  cursor: help; outline: none;
  transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.valores-lista li:hover,
.valores-lista li:focus-visible {
  background: rgba(240,171,0,.18);
  border-color: var(--g2);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(0,0,0,.7);
}
.valores-lista b {
  color: var(--g2); font-size: 12.5px; font-weight: 800; font-style: italic;
  min-width: 18px; flex-shrink: 0;
}

/* o espaço livre da foto some em tela estreita ou muito baixa */
@media (max-width: 1150px), (max-height: 580px) {
  .valores { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .valores-lista li:hover, .valores-lista li:focus-visible { transform: none; }
}

/* A logo foi apagada da arte e entra como PNG, dentro da coluna: assim ela
   nunca é coberta pelo cartão e acompanha telas de qualquer altura.
   Eixo vertical: centro da logo original, 1152/1671 = 68.94% da largura. */
.card-zone {
  position: absolute; z-index: 3;
  left: 68.94%; transform: translateX(-50%);
  top: 20px; bottom: 20px;
  width: min(396px, 86vw);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(12px, 3vh, 34px);
  overflow-y: auto; scrollbar-width: none;
}
.card-zone::-webkit-scrollbar { display: none; }

.stage-logo {
  /* a marca é um lockup largo (~4:1): o teto em vh é generoso de propósito,
     senão ela ficaria minúscula só para caber em altura */
  width: min(clamp(230px, 26vw, 420px), 76vh); flex-shrink: 0; color: #fff;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.45));
  animation: logoIn .5s ease both;
}
@keyframes logoIn { from { opacity: 0; transform: translateY(-10px); } }

.glass-card {
  position: relative; width: 100%; flex-shrink: 0;
  padding: 24px 28px 20px;
  background: linear-gradient(160deg, rgba(10,36,74,.62), rgba(3,20,48,.78));
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  box-shadow: 0 34px 70px -22px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.14);
  color: #fff;
  animation: cardIn .5s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }

/* a foto já traz a logo: só mostra no card quando o recorte some (telas estreitas) */
.glass-logo { display: none; width: 182px; height: auto; margin: 0 auto 22px; }

.glass-kicker { display: block; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #ffc62e; margin-bottom: 7px; }
.glass-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 5px; }
.glass-sub { text-align: center; font-size: 13px; color: rgba(255,255,255,.62); margin: 0; }

/* altura reservada: o aviso de erro ocupa este mesmo espaço, então o cartão
   não muda de tamanho quando o login falha */
.glass-aviso {
  min-height: 46px; margin-bottom: 15px;
  display: flex; align-items: center; justify-content: center;
}
.glass-aviso .galert { margin-bottom: 0; width: 100%; }

.glass-form { display: flex; flex-direction: column; gap: 12px; }
.gfield { display: flex; flex-direction: column; gap: 6px; }
.gfield-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }
.gfield-input {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 0 13px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.gfield-input:focus-within { border-color: rgba(255,198,46,.8); background: rgba(255,255,255,.11); box-shadow: 0 0 0 4px rgba(240,171,0,.16); }
.gfield-input > .material-symbols-rounded { font-size: 19px; color: rgba(255,255,255,.5); }
.gfield-input input {
  flex: 1; border: 0; outline: 0; background: transparent; color: #fff;
  font-family: inherit; font-size: 14.5px; padding: 11px 0;
}
.gfield-input input::placeholder { color: rgba(255,255,255,.34); }
/* evita o preenchimento automático pintar o campo de branco */
.gfield-input input:-webkit-autofill,
.gfield-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  transition: background-color 9999s ease-out;
}
.gtoggle { border: 0; background: none; cursor: pointer; color: rgba(255,255,255,.5); padding: 4px; display: flex; }
.gtoggle:hover { color: #fff; }

.gcheck { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,.72); cursor: pointer; margin-top: 2px; }
.gcheck input { width: 16px; height: 16px; accent-color: #ffc62e; }

.gbtn {
  margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #ffc62e 0%, #f0ab00 100%); color: #002147;
  border: 0; border-radius: 12px; padding: 13px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 14px 30px -12px rgba(255,198,46,.8);
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.gbtn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.gbtn:active { transform: translateY(0); }

.glass-foot {
  display: flex; align-items: center; gap: 7px; margin-top: 14px; padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 10.5px; color: rgba(255,255,255,.5); line-height: 1.4;
}
.glass-foot .material-symbols-rounded { font-size: 16px; color: #ffc62e; flex-shrink: 0; }

/* janela muito baixa: o rodapé do cartão sai para nada ser cortado */
@media (max-height: 620px) {
  .glass-foot { display: none; }
  .glass-sub { margin-bottom: 13px; }
}

/* avisos dentro do cartão (nunca por cima da logo) */
.galert {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.35;
}
.galert .material-symbols-rounded { font-size: 18px; flex-shrink: 0; }
.galert-danger { background: rgba(248,113,113,.16); border: 1px solid rgba(248,113,113,.34); color: #fecaca; }
.galert-warning { background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.3); color: #fde68a; }
.galert-info, .galert-success { background: rgba(255,198,46,.15); border: 1px solid rgba(255,198,46,.32); color: #fde3a0; }

/* ----- modal de primeiro acesso (criar senha) ----- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2,12,30,.74); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: bgIn .25s ease both;
}
@keyframes bgIn { from { opacity: 0 } }
.modal {
  width: min(410px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 30px 32px 28px; color: #fff; text-align: left;
  background: linear-gradient(160deg, rgba(10,36,74,.96), rgba(3,18,44,.98));
  border: 1px solid rgba(255,255,255,.16); border-radius: 22px;
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.14);
  animation: modalIn .34s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(135deg, #ffc62e, #f0ab00); color: #002147; font-size: 26px;
}
.modal h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.modal-sub { font-size: 13px; color: rgba(255,255,255,.64); line-height: 1.55; margin: 0 0 20px; }
.modal-sub strong { color: #ffc62e; }

.match { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: -2px; }
.match .material-symbols-rounded { font-size: 17px; }
.match.ok { color: #ffc62e; }
.match.no { color: #fca5a5; }
.gbtn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; filter: none; }

/* telas estreitas: o painel escuro da foto some no recorte -> centraliza tudo */
@media (max-width: 860px) {
  .stage-photo { object-position: 70% top; }
  .stage-scrim { background: linear-gradient(to bottom, rgba(2,14,36,.55), rgba(2,14,36,.88)); }
  .card-zone { left: 50%; top: 20px; }
}

/* ==================================================
   CENTRAL (ERP shell)
   ================================================== */
.erp-page { overflow: hidden; }
.erp { display: flex; flex-direction: column; height: 100vh; }

/* ----- top bar ----- */
.topbar { height: 48px; flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: stretch; justify-content: space-between; padding-right: 12px; }
.tb-tabs { display: flex; align-items: stretch; min-width: 0; flex: 1; }
.tabstrip { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.tabstrip::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  border: 0; border-right: 1px solid var(--line); background: var(--surface);
  padding: 0 16px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; position: relative; max-width: 220px; transition: background .12s, color .12s;
}
.tab:hover { background: var(--surface-2); color: var(--ink-2); }
.tab .material-symbols-rounded { font-size: 18px; }
.tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.active { color: var(--g2); font-weight: 600; }
:root[data-theme="dark"] .tab.active { color: var(--g1); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; background: var(--grad); }
.tab-close { font-size: 16px !important; border-radius: 4px; padding: 2px; margin-left: 2px; opacity: .5; }
.tab-close:hover { background: var(--danger-soft); color: var(--danger); opacity: 1; }

.tb-right { display: flex; align-items: center; gap: 10px; }

/* botão de tema (sol / lua) */
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: background .14s, color .14s, border-color .14s, transform .14s;
}
.theme-btn:hover { background: var(--surface-3); color: var(--ink); transform: rotate(-18deg); }
.theme-btn .material-symbols-rounded { font-size: 19px; }

/* usuário + dropdown */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 10px 5px 5px; cursor: pointer; font-family: inherit; transition: background .12s, border-color .12s; }
.user-btn:hover { background: var(--surface-2); }
.uavatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: var(--sobre-marca); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.uavatar.lg { width: 40px; height: 40px; font-size: 16px; }
.uavatar.sm { width: 26px; height: 26px; font-size: 12px; }
.uinfo { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.uinfo strong { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.uinfo small { font-size: 10.5px; color: var(--muted); }
.user-btn .caret { font-size: 18px; color: var(--muted); }

.user-drop {
  position: absolute; top: calc(100% + 9px); right: 0; width: 252px; z-index: 900;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow);
  padding: 7px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .16s ease;
}
.user-drop.open { opacity: 1; visibility: visible; transform: none; }
.ud-head { display: flex; align-items: center; gap: 11px; padding: 11px 11px 13px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ud-head strong { display: block; font-size: 13.5px; color: var(--ink); }
.ud-head small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ud-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; padding: 11px 12px; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-decoration: none; text-align: left; }
.ud-item:hover { background: var(--brand-soft); color: var(--brand-ink); }
.ud-item .material-symbols-rounded { font-size: 20px; }
.ud-item.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ----- corpo ----- */
.erp-body { flex: 1; display: grid; grid-template-columns: 236px 1fr; min-height: 0; }
.erp-body.no-side { grid-template-columns: 1fr; }
.erp-body.no-side .erp-side { display: none; }

.erp-side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.side-brand { padding: 20px 16px 17px; border-bottom: 1px solid var(--line); text-align: center; }
/* marca em vetor: o símbolo é amarelo fixo e o texto usa currentColor,
   então a mesma arte serve para o tema claro e o escuro */
.marca { display: block; line-height: 0; color: var(--navy); }
.marca svg { width: 100%; height: auto; display: block; }
:root[data-theme="dark"] .marca { color: #fff; }
.side-brand .marca { width: 168px; margin: 0 auto; }
/* no login a marca está sempre sobre o azul escuro da arte */
.stage-logo.marca { color: #fff; }
.side-brand small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 9px; letter-spacing: .04em; }

.side-group { padding: 14px 10px 4px; }
.side-title { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .8; padding: 0 10px 8px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 11px; border-radius: 9px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.side-item:hover { background: var(--surface-3); }
.side-item .material-symbols-rounded { font-size: 19px; color: var(--muted); }
.side-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side-item.active .material-symbols-rounded { color: var(--g2); }
:root[data-theme="dark"] .side-item.active .material-symbols-rounded { color: var(--g1); }
.side-item[data-filter="@fav"].active .material-symbols-rounded { color: var(--star); }
.side-item .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.side-item.active .count { background: var(--surface); color: var(--brand-ink); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.side-foot .material-symbols-rounded { font-size: 16px; }

.erp-main { position: relative; min-width: 0; overflow: hidden; background: var(--bg); }
.view { display: none; height: 100%; overflow-y: auto; padding: 26px 30px 36px; }
.view.active { display: block; }

.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.vh-title { display: flex; align-items: center; gap: 13px; }
.vh-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--grad); color: var(--sobre-marca); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.view-head h1 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.vh-count { font-size: 12.5px; color: var(--muted); }

.searchbar { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 15px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.searchbar .material-symbols-rounded { color: var(--muted); font-size: 20px; }
.searchbar input { flex: 1; border: 0; outline: 0; padding: 13px 0; font-size: 14px; font-family: inherit; background: transparent; color: var(--ink); }
.searchbar kbd { font-family: inherit; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }

/* ----- cards de módulo ----- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 15px; }
.mod-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mc-open {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  background: none; border: 0; padding: 18px; cursor: pointer; font-family: inherit; text-align: left; color: inherit;
}
.mc-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--grad); color: var(--sobre-marca); display: flex; align-items: center; justify-content: center; margin-bottom: 13px; }
.mc-icon .material-symbols-rounded { font-size: 23px; }
.mc-icon.sm { width: 32px; height: 32px; border-radius: 8px; margin: 0; }
.mc-icon.sm .material-symbols-rounded { font-size: 18px; }
.mc-name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.mc-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.mc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g2); }

.mc-star {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: none;
  color: var(--line); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s, transform .12s;
}
.mc-star .material-symbols-rounded { font-size: 20px; }
.mc-star:hover { background: var(--surface-3); color: var(--star); transform: scale(1.1); }
.mc-star.on { color: var(--star); }
.mc-star.on .material-symbols-rounded { font-variation-settings: 'FILL' 1; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .material-symbols-rounded { font-size: 52px; color: var(--line); }
.empty h3 { margin: 14px 0 6px; font-size: 16px; color: var(--ink-2); }
.empty p { margin: 0; font-size: 13.5px; }
.empty.sm { padding: 34px 20px; }

/* panes dos módulos */
#panes { position: absolute; inset: 0; pointer-events: none; }
.pane { position: absolute; inset: 0; display: none; background: var(--surface); }
.pane.active { display: block; pointer-events: auto; }
.pane iframe { width: 100%; height: 100%; border: 0; display: block; }
.pane-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 14px; background: var(--surface); z-index: 2; }
.spin { width: 19px; height: 19px; border: 2.5px solid var(--line); border-top-color: var(--g2); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg) } }

@media (max-width: 860px) {
  .erp-body { grid-template-columns: 1fr; }
  .erp-side { display: none; }
  .uinfo { display: none; }
}

/* ==================================================
   PAINEL ADMIN (dentro do iframe)
   ================================================== */
.admin-embed { background: var(--bg); min-height: 100vh; }
.admin-nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 20px; height: 52px; position: sticky; top: 0; z-index: 50; }
.an-brand { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-right: 18px; }
.an-brand .material-symbols-rounded { font-size: 20px; color: var(--g2); }
:root[data-theme="dark"] .an-brand .material-symbols-rounded { color: var(--g1); }
.admin-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background .12s, color .12s; }
.admin-nav a:hover { background: var(--surface-3); color: var(--ink-2); }
.admin-nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.admin-nav a .material-symbols-rounded { font-size: 19px; }
.admin-body { padding: 26px 28px 44px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-sub { font-size: 13px; color: var(--muted); margin: 5px 0 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 18px; font-size: 13.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.cell-user { display: flex; align-items: center; gap: 10px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.badge-on { background: rgba(240,171,0,.18); color: #15803d; }
.badge-off { background: var(--danger-soft); color: var(--danger); }
.badge-admin { background: rgba(99,102,241,.16); color: #4338ca; }
.badge-user { background: var(--surface-3); color: var(--muted); }
.badge-sector { background: var(--brand-soft); color: var(--brand-ink); }
:root[data-theme="dark"] .badge-on { color: #4ade80; }
:root[data-theme="dark"] .badge-admin { color: #a5b4fc; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13.5px; border-radius: 10px; padding: 10px 16px; text-decoration: none; transition: filter .12s, transform .12s; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn .material-symbols-rounded { font-size: 19px; }
.btn-grad { background: var(--grad); color: var(--sobre-marca); box-shadow: 0 8px 18px -8px rgba(240,171,0,.5); }
.btn-light { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 10px; font-size: 13px; }
.actions { display: flex; gap: 7px; }
.actions form { display: inline; }
.link-btn { margin-left: auto; background: none; border: 0; color: var(--g2); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px; }
:root[data-theme="dark"] .link-btn { color: var(--g1); }
.link-btn:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------- formulário de conta (card único, em linhas) ---------- */
.crumb { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--g2); }
.crumb .material-symbols-rounded { font-size: 16px; }
.crumb span:last-child { color: var(--ink-2); font-weight: 600; }

.sheet { max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }

.sheet-head { display: flex; align-items: center; gap: 15px; padding: 22px 26px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sheet-avatar { width: 50px; height: 50px; border-radius: 14px; background: var(--grad); color: var(--sobre-marca); display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; flex-shrink: 0; box-shadow: 0 10px 20px -10px rgba(240,171,0,.55); }
.sheet-head h1 { font-size: 19px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.02em; }
.sheet-head p { font-size: 13px; color: var(--muted); margin: 0; }

.sheet-body { padding: 4px 26px; }
.line { display: grid; grid-template-columns: 215px 1fr; gap: 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-top { align-items: start; }
.line-label strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.line-label small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.line-label .link-btn { margin: 7px 0 0; padding: 0; display: inline-block; }

.line-field input[type=text], .line-field input[type=email] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--surface); outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.line-field input:focus { border-color: var(--g2); box-shadow: 0 0 0 4px rgba(240,171,0,.18); }
.finput { display: flex; align-items: center; gap: 9px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.finput:focus-within { border-color: var(--g2); box-shadow: 0 0 0 4px rgba(240,171,0,.18); }
.finput > .material-symbols-rounded { font-size: 19px; color: var(--muted); }
.finput input { flex: 1; border: 0 !important; outline: 0; background: transparent; color: var(--ink); font-family: inherit; font-size: 14px; padding: 11px 0; box-shadow: none !important; }
.req { color: var(--danger); }

/* seletor Usuário / Administrador */
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 4px; gap: 4px; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .14s, color .14s; }
.seg-opt span .material-symbols-rounded { font-size: 18px; }
.seg-opt:hover span { color: var(--ink-2); }
.seg-opt input:checked ~ span { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }

/* interruptor de conta ativa */
.switch-row { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-mark { width: 40px; height: 23px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background .16s, border-color .16s; }
.switch-mark::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .16s; }
.switch-row input:checked ~ .switch-mark { background: var(--g2); border-color: var(--g2); }
.switch-row input:checked ~ .switch-mark::after { transform: translateX(17px); background: #fff; }
.switch-txt { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }

/* escolha de módulos */
.mod-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 10px; }
.pick { display: flex; align-items: center; gap: 11px; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; cursor: pointer; transition: border-color .13s, background .13s; }
.pick:hover { border-color: var(--g2); background: var(--brand-soft); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-box { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .13s, border-color .13s; }
.pick-box .material-symbols-rounded { font-size: 14px; color: var(--sobre-marca); opacity: 0; transition: opacity .13s; }
.pick input:checked ~ .pick-box { background: var(--g2); border-color: var(--g2); }
.pick input:checked ~ .pick-box .material-symbols-rounded { opacity: 1; }
.pick-icon { font-size: 19px; color: var(--muted); }
.pick input:checked ~ .pick-icon { color: var(--g2); }
.pick-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-text strong { font-size: 13px; font-weight: 600; }
.pick-text small { font-size: 11px; color: var(--muted); }

.mod-pick.is-locked { opacity: .4; pointer-events: none; filter: grayscale(.5); }
.locked-note { display: flex; align-items: center; gap: 9px; background: var(--brand-soft); color: var(--brand-ink); padding: 10px 13px; border-radius: 10px; font-size: 12.5px; margin-top: 11px; }
.locked-note .material-symbols-rounded { font-size: 17px; flex-shrink: 0; }
.hint-plain { font-size: 13px; color: var(--muted); margin: 0; }

/* estado da senha */
.badge-wait { background: rgba(217,119,6,.15); color: #b45309; }
:root[data-theme="dark"] .badge-wait { color: #fbbf24; }
.badge .material-symbols-rounded { font-size: 14px; }
.pw-state { display: flex; flex-direction: column; gap: 11px; align-items: flex-start; }
.reset-pw { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.reset-pw input { width: 16px; height: 16px; accent-color: var(--g2); }

.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 26px; border-top: 1px solid var(--line); background: var(--surface-2); }
.foot-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.foot-note .material-symbols-rounded { font-size: 17px; color: var(--g2); }
.foot-btns { display: flex; gap: 10px; margin-left: auto; }

@media (max-width: 760px) {
  .line { grid-template-columns: 1fr; gap: 10px; }
  .sheet-foot { flex-direction: column; align-items: stretch; }
  .foot-btns { margin-left: 0; }
}
