@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Paleta base: #7d3df9 (roxo), #17171C (cinza-escuro), #ECECEF (cinza-claro), #FFFFFF.
     Tudo abaixo é variação de profundidade dessas quatro. */
  --brand: #7d3df9;
  --brand-600: #6a2ef0;
  --brand-700: #5722c4;
  --brand-alt: #4c1fb0;
  --brand-alt-600: #3f1993;
  --brand-light: #b794fb;
  --brand-soft: #f2ecfe;
  --brand-glow: rgba(125, 61, 249, .28);
  --shadow-brand: 0 14px 30px rgba(125, 61, 249, .32);

  --azul-escuro: #17171C;
  --azul-claro: #28282f;

  --ink: #17171C;
  --slate: #4d4d55;
  --slate-400: #7a7a82;

  --bg: #ffffff;
  --bg-soft: #ECECEF;
  --bg-softer: #e2e2e6;
  --line: #d9d9de;

  --success: #12a150;
  --success-soft: #eafaf0;
  --success-line: #bfe8d0;
  --mild: #b8860b;
  --mild-soft: #fdf6dc;
  --mild-line: #ecdb9c;
  --warning: #e8a33d;
  --warning-soft: #fff6e8;
  --warning-line: #f0d9ab;
  --danger: #d64545;
  --danger-soft: #fdecea;
  --danger-line: #f5c6c0;

  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(23, 23, 28, .08);
  --shadow-lg: 0 24px 60px rgba(23, 23, 28, .16);
}

* { box-sizing: border-box; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-soft);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 40px;
}
/* Header ocupa 100% da largura da janela (full-bleed), mesmo com o resto do
   body centralizando o conteúdo numa coluna de 720px. */
.site-header {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 36px);
  background: var(--bg);
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.site-header .brand-mark { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-header img { height: 52px; width: auto; display: block; }
.site-header .brand-logo { display: block; line-height: 0; border-radius: 8px; }
.site-header .brand-logo:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.site-header .brand-text { display: flex; flex-direction: column; gap: 3px; }
.site-header .wordmark { color: var(--ink); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.site-header .wordmark b { color: var(--brand); }
.site-header .brand-tagline { color: var(--slate-400); font-size: 1.01rem; }
.site-header .brand-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-left: 8px; }
.site-header .brand-badge {
  color: var(--slate); font-size: 0.99rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: 999px; padding: 7px 16px;
}
.site-header button.small { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); padding: 10px 21px; font-size: 1.1rem; }
.site-header button.small:hover { background: var(--bg-softer); }
.site-header .nav-group { display: flex; align-items: center; gap: 21px; flex-wrap: wrap; }
.site-header .link { font-size: 1.17rem; }
.site-header .user-email { color: var(--slate-400); font-size: 1.1rem; }
.nav-icon-link { display: inline-flex; align-items: center; gap: 9px; }
.nav-icon-link svg { width: 21px; height: 21px; flex-shrink: 0; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.card.wide { max-width: 720px; }
h1 { font-size: 1.4rem; margin: 0 0 4px; color: var(--ink); }
.subtitle { color: var(--slate); margin: 0 0 20px; font-size: 0.9rem; }
.manual-section h2 { font-size: 1.1rem; margin: 26px 0 10px; color: var(--ink); scroll-margin-top: 20px; }
.manual-section p, .manual-section li { color: var(--slate); font-size: 0.92rem; line-height: 1.65; }
.manual-section p { margin: 0 0 12px; }
.manual-section strong { color: var(--ink); }
.manual-section ul, .manual-section ol { margin: 6px 0 14px; padding-left: 22px; }
.manual-section li { margin-bottom: 8px; }
.manual-section .callout {
  background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 10px 0 16px; font-size: 0.9rem; color: var(--ink);
}
.manual-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.manual-section code {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; font-family: monospace; font-size: 0.88em; color: var(--ink);
}
.wifi-creds {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 10px 0 16px;
}
.wifi-creds dt { color: var(--slate); font-size: 0.85rem; font-weight: 500; }
.wifi-creds dd { margin: 0; font-family: monospace; font-size: 0.95rem; color: var(--ink); }
.manual-section figure.fig { margin: 10px 0 20px; text-align: center; }
.manual-section .fig img, .manual-section .fig svg { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg); }
.manual-section .fig.fig-flat img, .manual-section .fig.fig-flat svg { box-shadow: none; border: none; background: transparent; }
.manual-section .fig figcaption { font-size: 0.82rem; color: var(--slate-400); margin-top: 8px; font-style: italic; }
.manual-section .fig-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 10px 0 20px; }
.manual-section .fig-row figure.fig { margin: 0; flex: 1 1 220px; max-width: 260px; }
label { display: block; font-size: 0.85rem; margin: 14px 0 4px; color: var(--slate); font-weight: 500; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: inherit;
}
input::placeholder { color: var(--slate-400); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { resize: vertical; line-height: 1.45; }
.shop-mini { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .84rem; line-height: 1.45; }
.shop-mini.ok { background: #eafaf0; color: #0f6b38; border: 1px solid #b9e8cc; }
.shop-mini.warn { background: #fff7e6; color: #7a5200; border: 1px solid #f1d9a3; }
.shop-perks { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; font-size: .86rem; color: var(--ink); }
button {
  margin-top: 18px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, box-shadow .15s ease;
}
button:hover { background: var(--brand-600); box-shadow: var(--shadow-brand); }
button:active { background: var(--brand-700); }
button.secondary { background: var(--bg-softer); color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover { background: var(--line); box-shadow: none; }
button.small { width: auto; padding: 8px 16px; margin-top: 0; font-size: 0.85rem; }
.link { color: var(--brand); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.link:hover { text-decoration: underline; }
.footer-link { text-align: center; margin-top: 18px; font-size: 0.88rem; color: var(--slate); }
.msg { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 16px; border: 1px solid; }
.msg.error { background: var(--danger-soft); color: #a02f2f; border-color: var(--danger-line); }
.msg.ok { background: var(--success-soft); color: #0f7a3d; border-color: var(--success-line); }
.msg.warn { background: var(--warning-soft); color: #8a5a12; border-color: var(--warning-line); }
.topbar { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 720px; margin-bottom: 20px; }
.topbar h1 { margin: 0; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 30, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-box {
  background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 26px; width: 100%; max-width: 420px;
}
.modal-box h2 { font-size: 1.15rem; margin: 0 0 12px; color: var(--ink); }
.modal-box .modal-line { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; margin-bottom: 8px; color: var(--ink); }
.modal-box .modal-line span:first-child { color: var(--slate); }
.modal-box .modal-note { font-size: 0.85rem; color: var(--slate); margin: 14px 0 18px; }
.modal-box .modal-actions { display: flex; gap: 10px; }
.modal-box .modal-actions button { margin-top: 0; }

.current-cycle-banner {
  width: 100%; max-width: 720px; background: var(--azul-escuro); color: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 20px 26px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.current-cycle-banner .banner-left { display: flex; align-items: center; gap: 16px; }
.current-cycle-banner .banner-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.current-cycle-banner .banner-icon svg { width: 36px; height: 36px; }
.current-cycle-banner .banner-title { font-size: 1.2rem; font-weight: 800; letter-spacing: .01em; margin-bottom: 4px; }
.current-cycle-banner .banner-status { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: rgba(255,255,255,.8); }
.current-cycle-banner .banner-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.current-cycle-banner .banner-status .sep { color: rgba(255,255,255,.3); }
.current-cycle-banner .banner-right { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.55); }
.current-cycle-banner .banner-right svg { width: 22px; height: 22px; flex-shrink: 0; }
.current-cycle-banner .banner-right-label { font-size: 0.82rem; color: rgba(255,255,255,.6); }
.current-cycle-banner .banner-right-value { font-size: 0.95rem; font-weight: 700; color: #fff; }

.uf-status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  border: 1px solid; margin: 0; width: auto; font-family: inherit;
}
.uf-status-chip.ok { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.uf-status-chip.mild { background: var(--mild-soft); color: var(--mild); border-color: var(--mild-line); }
.uf-status-chip.warn { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-line); }
.uf-status-chip.severe { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); font-weight: 700; }
.uf-status-chip.none { background: var(--bg-softer); color: var(--slate); border-color: var(--line); }
.uf-status-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.uf-status-grid.selectable-grid {
  max-height: 240px; overflow-y: auto; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft);
}
.uf-status-chip.selectable {
  cursor: pointer; position: relative; padding-right: 22px;
  transition: box-shadow .15s ease, transform .08s ease;
}
.uf-status-chip.selectable:hover { filter: brightness(0.96); }
.uf-status-chip.selectable:active { transform: scale(0.96); }
.uf-status-chip.selectable::after {
  content: "✓"; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 0.72rem; font-weight: 800; color: var(--brand); opacity: 0;
}
.uf-status-chip.selectable.selected { box-shadow: 0 0 0 2px var(--brand); }
.uf-status-chip.selectable.selected::after { opacity: 1; }

.recommend-br {
  align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px;
  background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-sm);
  color: #8a5a12; font-size: 0.85rem; flex-wrap: wrap;
}
.recommend-br svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--warning); }
.recommend-br-text { flex: 1; min-width: 180px; }
.recommend-br-btn {
  margin: 0; width: auto; padding: 7px 14px; font-size: 0.82rem;
  background: var(--brand-light); color: var(--ink); border-radius: 999px; font-weight: 700;
}
.recommend-br-btn:hover { background: #a479f9; box-shadow: none; }
.bin-download-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--azul-escuro); color: #fff; border-radius: var(--radius);
  padding: 16px 18px; margin: 10px 0 14px;
}
.bin-download-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: rgba(236,236,239,.14); border: 1px solid rgba(236,236,239,.3);
  color: #ECECEF; display: flex; align-items: center; justify-content: center;
}
.bin-download-icon svg { width: 22px; height: 22px; }
.bin-download-text { flex: 1; min-width: 200px; }
.bin-download-title { font-weight: 700; font-size: 0.98rem; margin: 0 0 3px; }
.bin-download-desc { font-size: 0.82rem; color: rgba(255,255,255,.68); margin: 0; line-height: 1.45; }
.bin-download-btn {
  margin: 0; width: auto; flex-shrink: 0; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-brand);
}
.bin-download-btn svg { width: 18px; height: 18px; }
.bin-download-btn:hover { background: var(--brand-600); box-shadow: var(--shadow-brand); }
.bin-download-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.device-activation { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.device-activation-label { font-size: 0.75rem; font-weight: 500; color: var(--slate); }
.device-activation-row { display: flex; align-items: center; gap: 8px; }
.device-activation-none { color: var(--slate-400); font-size: 1.05rem; }
@media (max-width: 560px) {
  .device-row { flex-wrap: wrap; }
  .device-row .device-info { flex-basis: calc(100% - 132px); }
  .device-activation { order: 3; flex-basis: 100%; align-items: flex-start; }
}
.activation-code-box {
  font-family: monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.15em;
  background: var(--success-soft); border: 1px solid var(--success-line); color: #0f7a3d;
  border-radius: var(--radius-sm); padding: 6px 14px;
}
.bundle-offer { position: relative; margin-top: 6px; }
.bundle-badge {
  position: absolute; top: -11px; right: 16px;
  background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; box-shadow: var(--shadow);
  letter-spacing: .02em; z-index: 1;
}
.bundle-btn {
  width: 100%; margin-top: 0; border: 1.5px solid var(--brand); border-radius: var(--radius);
  background: var(--brand-soft); color: var(--ink); padding: 14px 18px; font-family: inherit;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.bundle-icon {
  display: block; width: 36px; height: 33px; flex-shrink: 0;
  background-color: var(--brand);
  -webkit-mask: url('brazil-outline.svg') center / contain no-repeat;
  mask: url('brazil-outline.svg') center / contain no-repeat;
}
.bundle-text { display: flex; flex-direction: column; text-align: left; gap: 1px; }
.bundle-title { font-weight: 700; font-size: 1.02rem; color: var(--azul-escuro); }
.bundle-sub { font-size: 0.82rem; color: var(--slate); }
.bundle-divider { width: 1px; align-self: stretch; background: rgba(99,0,255,.3); margin: 2px 0; }
.bundle-price-col { display: flex; flex-direction: column; text-align: left; gap: 1px; }
.bundle-price { font-weight: 800; font-size: 1.2rem; color: var(--azul-escuro); line-height: 1.1; }
.bundle-note { font-size: 0.78rem; color: var(--slate); }
.bundle-buy-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bundle-buy-pill {
  margin: 0; width: auto; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 11px 20px; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-brand);
  font-family: inherit;
}
.bundle-buy-pill:hover { background: var(--brand-600); box-shadow: var(--shadow-brand); }
.bundle-buy-pill.mp { background: var(--brand-alt); box-shadow: 0 10px 22px rgba(76,31,176,.32); }
.bundle-buy-pill.mp:hover { background: var(--brand-alt-600); }
.pix-icon { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.buy-row .secondary.mp-btn {
  background: var(--brand-alt); color: #fff; border: none;
}
.buy-row .secondary.mp-btn:hover { background: var(--brand-alt-600); box-shadow: none; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
th { color: var(--slate); font-weight: 500; }
.device-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; box-shadow: var(--shadow); }
.device-card h3 { margin: 0 0 2px; font-size: 1rem; color: var(--ink); }
.mac { color: var(--slate); font-size: 0.85rem; font-family: monospace; }

.section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 12px; }
/* o bloco do título cede espaço (e pode ter até 240 px) em vez de ser espremido pelos botões; sem espaço, os botões descem pra linha de baixo */
.section-head > div:not(.section-head-actions):not(.section-icon) { flex: 1 1 240px; min-width: 0; }
.section-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.section-icon svg { width: 21px; height: 21px; }
.section-title { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin: 0; }
.section-sub { color: var(--slate); font-size: 0.88rem; margin: 3px 0 0; }
.section-head-actions { margin-left: auto; flex-shrink: 1; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.section-head-action {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.section-head-action svg { width: 16px; height: 16px; flex-shrink: 0; }
@media (max-width: 520px) {
  .section-head { flex-wrap: wrap; }
  .section-head-actions { margin-left: 0; justify-content: flex-start; }
}

.device-row { display: flex; align-items: center; gap: 16px; }
.device-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--azul-escuro); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.device-avatar svg { width: 24px; height: 24px; }
.device-info { flex: 1; min-width: 0; }
.device-name-row { display: flex; align-items: center; gap: 8px; }
.device-name { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.icon-btn {
  margin: 0; width: auto; padding: 5px 9px; background: transparent; border: none;
  color: var(--slate-400); cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; font-family: inherit;
}
.icon-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.icon-btn:hover { color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.vehicle-type-picker { display: flex; gap: 12px; margin: 6px 0 4px; }
.vehicle-type-btn {
  width: 48px; height: 48px; border-radius: 50%; margin: 0; padding: 0; flex-shrink: 0;
  background: var(--azul-escuro); color: #fff; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.vehicle-type-btn svg { width: 22px; height: 22px; }
.vehicle-type-btn:hover { background: var(--azul-claro); }
.vehicle-type-btn.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(99,0,255,.25); }
.device-stats-row { display: flex; align-items: center; gap: 14px; margin: 8px 0 0; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink); }
.device-stat { display: flex; align-items: center; gap: 7px; }
.device-stat svg { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }
.device-stat-col { display: flex; flex-direction: column; line-height: 1.3; }
.device-stat-col .label { font-size: 0.78rem; color: var(--slate); }
.device-stat-col b { font-size: 0.85rem; color: var(--ink); }
.stat-sep { width: 1px; height: 20px; background: var(--line); }
.btn-outline-sm {
  margin-top: 12px; width: auto; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--brand); background: var(--bg); color: var(--brand);
  font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-outline-sm svg { width: 15px; height: 15px; }
.btn-outline-sm:hover { background: var(--brand-soft); box-shadow: none; }
.device-chevron {
  margin: 0; width: 32px; height: 32px; padding: 0; border-radius: 50%; flex-shrink: 0;
  background: transparent; border: none; color: var(--slate-400);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .15s ease;
}
.device-chevron svg { width: 20px; height: 20px; }
.device-chevron:hover { background: var(--bg-softer); box-shadow: none; color: var(--brand); }
.device-chevron.open { transform: rotate(90deg); }
.device-details { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.buy-row { display: flex; gap: 8px; margin-top: 12px; }
.buy-row select { flex: 1; }
.buy-row button { margin-top: 0; width: auto; padding: 10px 16px; }
.buy-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.token-box {
  background: var(--success-soft); border: 1px solid var(--success-line); border-radius: var(--radius-sm);
  padding: 12px; margin: 14px 0; font-family: monospace; font-size: 0.85rem;
  word-break: break-all; color: #0f7a3d;
}
.empty { color: var(--slate-400); font-size: 0.88rem; font-style: italic; margin-top: 8px; }
.empty-state-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius-lg);
  padding: 40px 24px; box-shadow: var(--shadow);
}
.empty-state-icon {
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 16px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 20px; }
.empty-state-desc { font-size: 0.88rem; color: var(--slate); margin: 0 0 20px; }
.empty-state-btn {
  width: auto; margin: 0; padding: 14px 28px; font-size: 1rem;
  display: inline-flex; align-items: center; gap: 10px;
}
.empty-state-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---- links de download de manuais (login e manual.html) ---- */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.download-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--brand-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.download-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.download-card .dl-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.download-card .dl-icon svg { width: 22px; height: 22px; }
.download-card .dl-text { display: flex; flex-direction: column; min-width: 0; }
.download-card .dl-title { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.download-card .dl-sub { font-size: 0.82rem; color: var(--slate); line-height: 1.4; }
.download-card.compact { margin-top: 18px; padding: 12px 14px; }
.manual-section h3.manual-step { font-size: 1rem; margin: 20px 0 8px; color: var(--ink); }
.manual-section .wifi-creds dd em { font-style: normal; color: var(--brand); font-weight: 700; }

/* ---- admin: formas de pagamento aceitas ---- */
.pm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); cursor: pointer; font-size: .92rem; color: var(--ink); }
.pm-row .pm-name strong { margin-right: 6px; }
.pm-row .pm-meta { font-size: .76rem; color: var(--slate-400); }
.pm-row input.pm-toggle { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--brand); cursor: pointer; }
.pm-row input.pm-toggle:disabled { cursor: not-allowed; }

.pm-desc { display: flex; align-items: center; gap: 10px; margin: -2px 0 6px 14px; }
.pm-desc label { margin: 0; font-size: .78rem; color: var(--slate); white-space: nowrap; }
.pm-desc input { margin: 0; padding: 7px 10px; font-size: .88rem; }
.pay-icon { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.buy-row button, .bundle-buy-pill { display: inline-flex; align-items: center; gap: 7px; }
.buy-row { flex-wrap: wrap; }

.pm-minform { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pm-minform label { margin: 0; }
.pm-minform input { width: 90px; margin: 0; }
.pm-minform button { width: auto; margin: 0; padding: 10px 18px; }
p.pm-meta { font-size: .78rem; color: var(--slate-400); margin: 8px 0 0; }

.pm-block { display: flex; flex-direction: column; }
.pm-dirty { color: var(--warning); font-size: .76rem; font-weight: 700; margin-left: 6px; }
.pm-dirty[hidden] { display: none; }
.pm-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pm-actions button { width: auto; margin: 0; padding: 10px 20px; }
.pm-actions button:disabled { opacity: .5; cursor: not-allowed; }

/* ---- admin: preços por estado ---- */
.pr-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.pr-bulk label { margin: 0; }
.pr-bulk input { width: 110px; margin: 0; }
.pr-bulk button { width: auto; margin: 0; padding: 10px 16px; }
.pr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pr-list > p, .pr-list > .pm-actions { grid-column: 1 / -1; }
.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); font-size: .9rem; color: var(--ink); }
.pr-row.pr-bundle { grid-column: 1 / -1; background: var(--brand-soft); border-color: var(--brand); }
.pr-name .pr-uf { color: var(--slate-400); font-size: .76rem; margin-left: 4px; }
.pr-field { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--slate); }
.pr-input { width: 92px; margin: 0; padding: 6px 8px; text-align: right; }
.pr-input.pr-invalid { border-color: var(--danger); background: var(--danger-soft); }

/* ---- atualizar por USB ---- */
.bin-download-btn.usb { background: var(--brand-alt); }
.bin-download-btn.usb:hover { background: var(--brand-alt-600); }
.usb-hint { font-size: .8rem; color: var(--slate-400); margin: 6px 2px 0; }
.usb-steps { margin: 4px 0 12px; padding-left: 20px; font-size: .88rem; color: var(--slate); line-height: 1.5; }
.usb-steps li { margin-bottom: 6px; }
.usb-progress { height: 10px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.usb-progress-bar { height: 100%; width: 0%; background: var(--brand); transition: width .15s linear; }
.modal-box .modal-note.usb-ok { color: var(--success); font-weight: 600; }
.modal-box .modal-note.usb-error { color: var(--danger); font-weight: 600; }
.modal-box .modal-note.usb-note { background: var(--bg-soft); border-left: 3px solid var(--brand); padding: 8px 10px; border-radius: 6px; color: var(--ink); }

/* ---- ativar por USB: aviso grande de sucesso ---- */
.activate-usb-btn { background: var(--success); display: inline-flex; align-items: center; gap: 6px; }
.activate-usb-btn:hover { background: #0e8a43; }
.activate-usb-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.usb-bigok {
  flex-direction: column; align-items: center; text-align: center; gap: 6px;
  margin: 8px 0 4px; padding: 26px 18px;
  background: var(--success); color: #fff; border-radius: 16px;
  animation: usbBigOkIn .35s ease-out;
}
.usb-bigok svg { width: 84px; height: 84px; }
.usb-bigok-title { font-size: 1.9rem; font-weight: 900; letter-spacing: .02em; line-height: 1.1; }
.usb-bigok-text { margin: 4px 0 0; font-size: 1rem; line-height: 1.4; opacity: .95; }
@keyframes usbBigOkIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .usb-bigok { animation: none; } }

/* ---- configurar alertas de radar por USB ---- */
.modal-box.cfg-box { max-width: 520px; max-height: 92vh; overflow-y: auto; }
.cfg-level { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); }
.cfg-level-name { grid-column: 1 / -1; font-weight: 700; font-size: .9rem; color: var(--ink); }
.cfg-level label { margin: 0 0 3px; font-size: .78rem; }
.cfg-level input { margin: 0; }
.cfg-sound { display: flex; gap: 8px; align-items: center; }
.cfg-sound select { flex: 1; margin: 0; }
.cfg-sound button { margin: 0; white-space: nowrap; }
.cfg-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: .86rem; color: var(--ink); font-weight: 400; cursor: pointer; }
.cfg-check input { width: auto; margin: 3px 0 0; flex-shrink: 0; }
.cfg-box .cfg-error { margin: 12px 0 0; }
.cfg-open-btn { display: inline-flex; align-items: center; gap: 6px; }
.cfg-open-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.cfg-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); }
.cfg-block-text { flex: 1; min-width: 200px; }
.cfg-block-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cfg-block-actions button { margin: 0; width: auto; }
.cfg-block-title { margin: 0; font-weight: 700; font-size: .92rem; color: var(--ink); }
.cfg-block-desc { margin: 2px 0 0; font-size: .82rem; color: var(--slate); }

/* ---- aparelho detectado por USB ---- */
.usb-detect-wrap { width: 100%; max-width: 720px; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.usb-detect-wrap:empty { display: none; }
.usb-detect {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; font-size: .92rem; color: var(--ink);
  background: var(--brand-soft); border: 1px solid var(--brand);
}
.usb-detect small { color: var(--slate); font-family: monospace; margin-left: 4px; }
.usb-detect.done { background: var(--success-soft); border-color: var(--success-line); color: #0f7a3d; }
.usb-detect.warn { background: var(--danger-soft); border-color: var(--danger-line); color: #a02f2f; }

/* ---- admin da loja (admin-loja.html) ---- */
.shop-status { margin: 12px 0; }
.shop-checklist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.shop-checklist li.ok { color: #0f7a3d; }
.shop-checklist li.bad { color: #a02f2f; }
.shop-checklist code { font-size: .8rem; }
.shop-open-state { margin: 0; font-weight: 700; }
.shop-open-state.is-open { color: var(--success); }
.shop-open-state.is-closed { color: var(--slate); }
.shop-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.shop-open { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; }
.shop-open input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; }
.shop-grid label { margin: 0; font-size: .82rem; color: var(--slate); display: flex; flex-direction: column; gap: 4px; }
.shop-grid input { margin: 0; }
.shop-orders { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.shop-order { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); padding: 12px 14px; }
.shop-order > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.shop-order-body { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.shop-order-body p { margin: 2px 0; font-size: .88rem; }
.shop-order-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 170px; }
.shop-order-actions button { width: auto; margin: 0; }
.shop-error { color: #a02f2f; font-size: .82rem; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--slate); }
.chip.ok { background: var(--success-soft); color: #0f7a3d; border-color: var(--success-line); }
.chip.warn { background: #fff7e6; color: #8a5a00; border-color: #f2d9a6; }
.chip.mute { color: var(--slate-400); }
.shop-code { font-family: monospace; letter-spacing: .04em; color: var(--brand); }
.shop-provider { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-provider label { margin: 0; }
.shop-provider select { width: auto; min-width: 180px; margin: 0; }

/* ---- admin: menu de cima (Painel · Loja · Pedidos da loja · Vendas de ciclos · Brindes) ---- */
.admin-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; width: 100%; max-width: 980px; margin: 0 auto 14px; padding: 8px 10px; box-sizing: border-box; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.admin-nav a { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; color: var(--slate); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.admin-nav a.active { background: var(--brand); color: #fff; }
/* barra de filtros e paginação das listas do admin */
.list-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; margin-top: 12px; }
.list-filters label { margin: 0; font-size: .78rem; color: var(--slate); display: flex; flex-direction: column; gap: 4px; }
.list-filters input, .list-filters select { margin: 0; }
.list-filters .wide { grid-column: span 2; }
.list-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.list-actions button { margin-top: 0; width: auto; }
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.status-tabs button { margin: 0; width: auto; padding: 7px 14px; font-size: .84rem; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; }
.status-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.list-summary { margin: 12px 0 0; font-size: .88rem; color: var(--slate); }
.list-summary strong { color: var(--ink); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pager button { margin: 0; width: auto; padding: 8px 16px; }
.pager span { font-size: .88rem; color: var(--slate); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.table-wrap table { min-width: 860px; }
.table-wrap td.num, .table-wrap th.num { text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .list-filters .wide { grid-column: span 1; } }

/* ---- admin: aproveita a largura da tela (a conta do cliente continua estreita) ---- */
body.admin .card.wide, body.admin .admin-nav { max-width: min(1480px, 96vw); }
body.admin .list-filters { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
body.admin .list-filters .wide { grid-column: span 2; }
body.admin .table-wrap table { min-width: 0; width: 100%; }
@media (min-width: 1100px) {
  body.admin .shop-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 520px) { body.admin .list-filters .wide { grid-column: span 1; } }
button.danger { background: var(--danger-soft); color: #a02f2f; border: 1px solid var(--danger-line); }
button.danger:hover { background: var(--danger); color: #fff; box-shadow: none; }

/* botão em andamento (ex.: "Processando…" no modal de compra) */
button.processing:disabled { opacity: 1; cursor: progress; }
button.processing::before { content: ''; display: inline-block; width: 1em; height: 1em; margin-right: .55em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btnSpin .7s linear infinite; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
