/* CMS de revendas: menu lateral escuro, topo claro, conteudo em cartoes. */
:root {
  --bg: #f3f4f8;
  --card: #ffffff;
  --text: #1f2433;
  --muted: #6b7183;
  --line: #e4e6ee;
  --side: #161a25;
  --side-2: #10131b;
  --side-text: #aeb4c4;
  --side-on: #ffffff;
  --brand: #2563eb;
  --brand-2: #0891b2;
  --brand-soft: #e8f0ff;
  --ok: #138a52;
  --ok-soft: #e4f6ec;
  --err: #c2312f;
  --err-soft: #fdeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 4px 16px rgba(20, 24, 40, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }

/* botoes e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #c9cdd9; }
.btn-primary { border: 0; color: #fff; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.btn-primary:hover { filter: brightness(1.06); }
.btn.block { width: 100%; padding: 11px 16px; }
.link { color: var(--brand); text-decoration: none; }
.link:hover { text-decoration: underline; }
.as-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
input, select { width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: auto; accent-color: var(--brand); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.form .check { color: var(--text); }
.inline { display: inline; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* avisos e selos */
.alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; font-size: 14px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-err { background: var(--err-soft); color: var(--err); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-dark { background: #23283a; color: #fff; }

/* menu suspenso (idioma, usuario) */
.drop { position: relative; }
.drop summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; padding: 6px 8px; border-radius: 8px; }
.drop summary::-webkit-details-marker { display: none; }
.drop summary .ic { width: 16px; height: 16px; }
.drop[open] summary { background: #f0f1f6; }
.drop-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; z-index: 30; display: grid; }
.drop-menu a, .drop-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: 14px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; text-decoration: none; color: var(--text); }
.drop-menu a:hover, .drop-menu button:hover, .drop-menu .on { background: var(--brand-soft); color: var(--brand); }
.drop-menu form { margin: 0; }

/* estrutura do painel */
.app { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand .ic { width: 28px; height: 28px; color: #5aa0ff; }
.nav { padding: 6px 0 24px; }
.nav-top, .nav-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 20px; color: var(--side-text); background: none; border: 0;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-decoration: none; cursor: pointer; text-align: left; }
.nav-head span { flex: 1; }
.nav-head .ic:last-child { width: 16px; height: 16px; transition: transform .2s; }
.nav-top:hover, .nav-head:hover { color: var(--side-on); }
.nav-top.on { color: var(--side-on); background: rgba(255, 255, 255, .06); box-shadow: inset 3px 0 0 var(--brand); }
.nav-items { display: none; background: var(--side-2); padding: 4px 0; }
.nav-group.open .nav-items { display: block; }
.nav-group.open .nav-head { color: var(--side-on); }
.nav-group.open .nav-head .ic:last-child { transform: rotate(180deg); }
.nav-item { display: block; padding: 10px 20px 10px 52px; font-size: 14px; color: var(--side-text); text-decoration: none; }
.nav-item:hover { color: var(--side-on); }
.nav-item.on { color: var(--side-on); background: rgba(37, 99, 235, .18); box-shadow: inset 3px 0 0 var(--brand); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 20; }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 14px; }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.content { padding: 24px; max-width: 1280px; width: 100%; }
.page-head { margin-bottom: 18px; }
.scrim { display: none; }

/* cartoes e grades */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card.narrow { max-width: 560px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.grid2 .card { margin: 0; }
.grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.grid-side .card { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; gap: 14px; align-items: center; }
.tile-ic, .mini-ic, .soon-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.tile-n { font-size: 22px; font-weight: 700; }
.tile-l { font-size: 13px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.step { background: #eceef4; border-radius: var(--radius); padding: 18px; position: relative; }
.step-n { position: absolute; top: 14px; right: 16px; font-size: 28px; font-weight: 800; color: #d3d7e2; }
.step-cards { display: grid; gap: 10px; margin-top: 12px; }
.mini { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 12px 14px; text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.mini:hover { outline: 2px solid var(--brand-soft); }
.mini-ic { width: 38px; height: 38px; }
.soon { display: flex; gap: 18px; align-items: center; }

/* tabelas */
.table-card { padding: 0; overflow: auto; }
.filters { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.filters input { max-width: 340px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfd; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .empty { text-align: center; color: var(--muted); padding: 30px; }

/* tela de entrada */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; background: #fff; }
.auth-lang { width: 100%; max-width: 440px; display: flex; justify-content: flex-end; padding: 18px 16px 0; }
.auth-box { width: 100%; max-width: 380px; padding: 20px 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 26px; font-weight: 700; margin: 10px 0 26px; }
.auth-brand .ic { width: 36px; height: 36px; color: var(--brand); }
.auth-title { font-size: 18px; margin: 0; }
.auth-form { display: grid; gap: 14px; }
.auth-foot { color: var(--muted); font-size: 12px; margin-top: auto; padding: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tabs:has(.tab:only-child) { grid-template-columns: 1fr; }
.tab { background: #fff; border: 0; padding: 11px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.tab + .tab { border-left: 1px solid var(--line); }
.tab.on { color: var(--brand); background: var(--brand-soft); }
.pane { display: none; }
.pane.on { display: block; }
.phone-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.code-input { text-align: center; font-size: 22px; letter-spacing: 8px; }

/* celular */
@media (max-width: 900px) {
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
  .burger { display: inline-flex; }
  .content { padding: 16px; }
  .who { display: none; }
}
