/* ═══════════════════════════════════════════════════
   INSANE SMM — PAINEL v2
═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0: #070c1a;
  --bg1: #0e1529;
  --bg2: #141d38;
  --bg3: #1b2649;
  --bg4: #24325c;

  --border: rgba(59,130,246,.18);
  --border-hi: rgba(59,130,246,.38);

  --blue: #2f6ff5;
  --blue-light: #4d86ff;
  --blue-pale: #7cb0ff;

  --text: #f2f6ff;
  --text-2: #a8bcd8;
  --text-3: #6a86ad;

  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;

  --font-d: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-b: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --r: 12px;
  --r-sm: 8px;
  --tr: .16s ease;
}

html { background: var(--bg0); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg0); color: var(--text);
  font-family: var(--font-b); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,.3); border-radius: 6px; }

.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.5px; color: var(--text); }

/* ═══ TOAST ═══ */
.toast {
  position: fixed; top: 74px; right: 20px; z-index: 9500;
  padding: 13px 20px; border-radius: var(--r);
  background: var(--bg3); border: 1px solid var(--border-hi);
  color: var(--text); font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  min-width: 220px; max-width: calc(100vw - 40px);
  animation: toastIn .22s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .toast { top: auto; bottom: 20px; left: 16px; right: 16px; min-width: 0; } }

/* ═══ BOTÕES ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700; letter-spacing: -.1px;
  transition: var(--tr); white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-light); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: none; }
.btn-secondary { background: var(--bg2); color: var(--text-2); border: 1px solid var(--border-hi); }
.btn-secondary:hover:not(:disabled) { background: var(--bg3); color: var(--text); }
.btn.mini { padding: 8px 14px; font-size: 13px; }

/* ═══ INPUTS ═══ */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="date"],
select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-b); font-size: 16px;
  outline: none; transition: border-color var(--tr), background var(--tr);
}
input:focus, select:focus, textarea:focus { border-color: var(--border-hi); background: var(--bg3); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
label { display: flex; flex-direction: column; gap: 7px; }
label > span { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .4px; text-transform: uppercase; }

/* ═══ LOGIN ═══ */
.auth-screen {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden;
}
.auth-screen::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(59,130,246,.3) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, black 25%, transparent 78%);
  pointer-events: none;
}
.auth-screen::after {
  content: ''; position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%);
  width: 520px; height: 360px;
  background: radial-gradient(ellipse, rgba(59,130,246,.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: 16px; padding: 34px 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  animation: authIn .3s ease;
}
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 30px; }
.brand-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
  background: var(--bg3); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.5px;
}
.auth-brand h1 { font-size: 18px; margin-bottom: 2px; }
.auth-brand p { font-size: 12px; color: var(--text-3); }
.auth-copy { margin-bottom: 22px; }
.auth-copy h2 { font-size: 24px; letter-spacing: -1px; margin-bottom: 5px; }
.auth-copy p { font-size: 13px; color: var(--text-3); }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-form .btn-secondary { margin-top: 0; }

/* ═══ LAYOUT ═══ */
.app-screen { display: flex; min-height: 100vh; }

.side-menu {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 232px; z-index: 200;
  background: var(--bg1); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px;
  transition: transform .24s ease;
}
.side-profile { display: flex; align-items: center; gap: 11px; padding: 0 4px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.side-avatar {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--text);
}
.side-profile-text { flex: 1; min-width: 0; }
.side-profile-text strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-profile-text span { font-size: 11px; color: var(--text-3); letter-spacing: .5px; font-weight: 600; }
.side-close { display: none; width: 30px; height: 30px; border-radius: 7px; color: var(--text-3); font-size: 20px; flex-shrink: 0; }
.side-close:hover { color: var(--text); background: var(--bg3); }

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }

.side-back {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; color: var(--text-3);
  transition: var(--tr); margin-bottom: 8px;
}
.side-back:hover { color: var(--text-2); background: var(--bg2); }

/* Normaliza TODOS os itens do menu, inclusive os criados pelo app.js (ex: Suporte) */
.side-nav > button,
.side-nav > a:not(.side-back),
.side-link {
  display: flex !important; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: var(--r-sm);
  font-family: var(--font-b) !important;
  font-size: 13.5px !important; font-weight: 600 !important;
  color: var(--text-3) !important;
  text-align: left; width: 100%;
  transition: var(--tr);
}
.side-nav > button > span,
.side-nav > a:not(.side-back) > span,
.side-link span {
  font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; opacity: .8;
  font-family: var(--font-b);
}
.side-nav > button:hover,
.side-nav > a:not(.side-back):hover,
.side-link:hover { color: var(--text-2) !important; background: var(--bg2); }
.side-nav > button.active,
.side-link.active { color: var(--text) !important; background: var(--bg3); }
.side-link.active span { opacity: 1; }

.side-logout {
  margin-top: 12px; padding: 11px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; color: var(--text-3);
  border: 1px solid var(--border); transition: var(--tr);
}
.side-logout:hover { color: var(--red); border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.06); }

.menu-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(7,12,26,.8); backdrop-filter: blur(3px); }

/* ═══ TOPBAR ═══ */
.main-area { flex: 1; margin-left: 232px; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px; flex-shrink: 0;
  background: rgba(7,12,26,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.top-icon {
  display: none; width: 36px; height: 36px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 18px; flex-shrink: 0;
  align-items: center; justify-content: center;
}
.top-icon:hover { color: var(--text); background: var(--bg2); }

.top-brand { flex: 1; min-width: 0; overflow: hidden; }
.top-brand strong {
  display: block; font-family: var(--font-d); font-size: 15px; font-weight: 700;
  letter-spacing: -.3px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Subtítulo removido — quebrava a topbar em 3 linhas no mobile */
.top-brand span { display: none; }

.top-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; }
.top-balance {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 6px 14px; border-radius: var(--r-sm);
  background: var(--bg2); border: 1px solid var(--border); transition: var(--tr);
}
.top-balance:hover { border-color: var(--border-hi); background: var(--bg3); }
.top-balance span { font-size: 10px; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; }
.top-balance strong { font-family: var(--font-d); font-size: 14px; font-weight: 700; color: var(--blue-pale); }

.top-avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 13px; font-weight: 700; color: var(--text);
  transition: var(--tr);
}
.top-avatar:hover { border-color: var(--blue); }

.profile-dropdown {
  position: absolute; top: 46px; right: 0; z-index: 150;
  min-width: 178px; padding: 6px;
  background: var(--bg2); border: 1px solid var(--border-hi);
  border-radius: var(--r); box-shadow: 0 16px 44px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 1px;
  animation: ddIn .16s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.profile-dropdown button {
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  text-align: left; transition: var(--tr);
}
.profile-dropdown button:hover { background: var(--bg3); color: var(--text); }
.profile-dropdown button.danger { color: var(--red); }
.profile-dropdown button.danger:hover { background: rgba(248,113,113,.1); }

/* ═══ CONTEÚDO ═══ */
.content { flex: 1; padding: 26px 22px 60px; max-width: 1180px; width: 100%; }
.page { display: none; animation: pageIn .22s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ═══ STATS ═══ */
.stats-grid { display: grid; gap: 10px; margin-bottom: 20px; }
.compact-stats { grid-template-columns: repeat(4, 1fr); }
.admin-stats { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.stat-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  transition: border-color var(--tr);
}
.stat-card:hover { border-color: var(--border-hi); }
.stat-card span {
  display: block; font-size: 11px; color: var(--text-3);
  letter-spacing: .5px; text-transform: uppercase; font-weight: 600; margin-bottom: 6px;
}
.stat-card strong {
  font-family: var(--font-d); font-size: 21px; font-weight: 700;
  color: var(--text); letter-spacing: -.7px; line-height: 1.1;
}
@media (max-width: 760px) { .compact-stats { grid-template-columns: repeat(2, 1fr); } }

/* ═══ CHIPS ═══ */
.platform-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.platform-row::-webkit-scrollbar { display: none; }
.platform-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--text-3);
  background: var(--bg1); border: 1px solid var(--border);
  transition: var(--tr); white-space: nowrap;
}
.platform-chip:hover { color: var(--text-2); border-color: var(--border-hi); }
.platform-chip.active { color: #fff; background: var(--blue); border-color: var(--blue); }

/* ═══ PANEL CARD ═══ */
.panel-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head.compact { margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; letter-spacing: -.5px; margin-bottom: 4px; }
.panel-head p { font-size: 13px; color: var(--text-3); line-height: 1.5; }

/* ═══ FORMS ═══ */
.order-form, .funds-form { display: flex; flex-direction: column; gap: 16px; }
.order-form .btn, .funds-form .btn { width: 100%; margin-top: 4px; }
.filters-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters-row > * { flex: 1; min-width: 150px; }
.filters-row label { flex: 1; min-width: 150px; }
.filters-row .btn { flex: 0 0 auto; min-width: 0; }

/* ═══ TOTAL ═══ */
.total-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 16px 18px;
  background: var(--bg2); border: 1px solid var(--border-hi); border-radius: var(--r);
}
.total-box > div:first-child span {
  display: block; font-size: 11px; color: var(--text-3);
  letter-spacing: .5px; text-transform: uppercase; font-weight: 600; margin-bottom: 3px;
}
.total-box > div:first-child strong {
  font-family: var(--font-d); font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -1px;
}
.rate-pill {
  padding: 6px 13px; border-radius: 999px;
  background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.3);
  font-size: 12px; font-weight: 700; color: var(--blue-pale); white-space: nowrap;
}

/* ═══ DETALHES DO SERVIÇO ═══ */
.details-card { padding: 22px 24px; }
.details-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.details-title h2 { font-size: 16px; }
.details-title button { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 5px 11px; border-radius: 6px; transition: var(--tr); }
.details-title button:hover { color: var(--text-2); background: var(--bg2); }
.details-content { display: flex; flex-direction: column; gap: 15px; }

.selected-service-box { padding: 13px 16px; background: var(--bg2); border: 1px solid var(--border-hi); border-radius: var(--r-sm); }
.selected-service-box strong { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }

.details-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.details-grid > div { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.details-grid span { display: block; font-size: 10px; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.details-grid strong { font-size: 13px; font-weight: 700; color: var(--text); }
@media (max-width: 640px) { .details-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Descrição do serviço: seções limpas, sem caixas ── */
.description-box {
  padding: 2px 0; background: none; border: 0; border-radius: 0;
  display: flex; flex-direction: column; gap: 19px;
  font-size: 13px; color: var(--text-2); line-height: 1.65;
}
.description-box.plain {
  padding: 14px 16px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); white-space: pre-line; display: block;
}
.desc-sec { }
.desc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.desc-ico { flex-shrink: 0; width: 18px; text-align: center; font-size: 14px; line-height: 1; }
.desc-ttl {
  font-family: var(--font-d); font-size: 12px; font-weight: 700;
  color: var(--text); letter-spacing: .6px; text-transform: uppercase;
}
.desc-body {
  margin-left: 8px; padding-left: 19px;
  border-left: 1px solid var(--border);
}
.desc-body p { font-size: 13px; color: var(--text-2); line-height: 1.68; }
.desc-body ul, .desc-body ol { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.desc-body li {
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  padding-left: 14px; position: relative;
}
.desc-body ul li::before {
  content: ''; position: absolute; left: 1px; top: 8px;
  width: 3px; height: 3px; border-radius: 50%; background: var(--text-3);
}
.desc-body ol { counter-reset: descstep; }
.desc-body ol li { counter-increment: descstep; padding-left: 21px; }
.desc-body ol li::before {
  content: counter(descstep);
  position: absolute; left: 0; top: 1px;
  font-family: var(--font-d); font-size: 10px; font-weight: 700;
  color: var(--blue-pale); opacity: .85;
}

.attention-box { padding: 16px 18px; background: rgba(251,191,36,.05); border: 1px solid rgba(251,191,36,.2); border-radius: var(--r-sm); }
.attention-box strong { display: block; font-size: 12px; font-weight: 700; color: var(--yellow); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 9px; }
.attention-box ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.attention-box li { font-size: 12.5px; color: var(--text-2); line-height: 1.55; padding-left: 15px; position: relative; }
.attention-box li::before { content: ''; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: rgba(251,191,36,.55); }

/* ═══ FILTROS HISTÓRICO ═══ */
.history-filter-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.history-filter-row::-webkit-scrollbar { display: none; }
.history-filter-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--text-3);
  background: var(--bg1); border: 1px solid var(--border);
  transition: var(--tr); white-space: nowrap;
}
.history-filter-btn:hover { color: var(--text-2); border-color: var(--border-hi); }
.history-filter-btn.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.history-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: rgba(255,255,255,.12); font-size: 10px; font-weight: 800;
}
.history-filter-btn.active .history-filter-count { background: rgba(0,0,0,.25); }

/* ═══ LISTAS ═══ */
.orders-list, .services-list, .admin-list { display: flex; flex-direction: column; gap: 9px; }
.empty-state {
  padding: 46px 20px; text-align: center; font-size: 13.5px; color: var(--text-3);
  background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--r);
}
.orders-list > *:not(.empty-state),
.services-list > *:not(.empty-state),
.admin-list > *:not(.empty-state) {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 15px 17px;
  transition: border-color var(--tr);
}
.orders-list > *:not(.empty-state):hover,
.services-list > *:not(.empty-state):hover,
.admin-list > *:not(.empty-state):hover { border-color: var(--border-hi); }

/* ═══ PIX ═══ */
.pix-card { display: flex; flex-direction: column; gap: 15px; }
.pix-qr {
  align-self: center; width: 210px; height: 210px;
  padding: 9px; border-radius: var(--r); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.pix-qr img { width: 100%; height: 100%; object-fit: contain; }
.pix-card textarea {
  font-family: ui-monospace, monospace; font-size: 11px;
  min-height: 78px; color: var(--text-3); word-break: break-all; resize: none;
}
.pix-card .btn { width: 100%; }

/* ═══ PERFIL ═══ */
.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.profile-box { padding: 17px 19px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); }
.profile-box span { display: block; font-size: 11px; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.profile-box strong { font-family: var(--font-d); font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.4px; word-break: break-word; }
@media (max-width: 560px) { .profile-grid { grid-template-columns: 1fr; } }

/* ═══ ADMIN ═══ */
.admin-tab { animation: pageIn .2s ease; }

/* ═══ RESPONSIVO ═══ */
@media (max-width: 900px) {
  .side-menu { transform: translateX(-100%); box-shadow: 0 0 60px rgba(0,0,0,.55); }
  .side-menu.open { transform: translateX(0); }
  .side-close { display: flex; }
  .main-area { margin-left: 0; }
  .top-icon { display: flex; }
  .content { padding: 20px 16px 60px; }
  .panel-card { padding: 20px 18px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .top-balance { padding: 5px 11px; }
  .top-balance strong { font-size: 13px; }
  .panel-head h2 { font-size: 16px; }
  .total-box > div:first-child strong { font-size: 21px; }
  .auth-card { padding: 28px 22px; }
  .auth-copy h2 { font-size: 21px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 18px; }
  .filters-row > *, .filters-row label { min-width: 100%; }
}

/* ═══════════════════════════════════════════════════
   CORREÇÕES E GRÁFICOS
═══════════════════════════════════════════════════ */

/* ── Textos colados: "Qtd50", "R$ 3,08por 1000" ── */
.orders-list > * strong,
.services-list > * strong,
.admin-list > * strong { margin: 0 4px; }
.orders-list > * strong:first-child,
.services-list > * strong:first-child,
.admin-list > * strong:first-child { margin-left: 0; }
.orders-list > * span + strong,
.admin-list > * span + strong { margin-left: 5px; }

/* Respiro entre as linhas dos cards de pedido/serviço */
.orders-list > *:not(.empty-state) > div,
.admin-list > *:not(.empty-state) > div { margin-bottom: 3px; }
.orders-list > *:not(.empty-state) > div:last-child,
.admin-list > *:not(.empty-state) > div:last-child { margin-bottom: 0; }

/* ── Links clicáveis ── */
a[href^="http"]:not(.btn):not(.side-back):not(.nav-logo),
.desc-link {
  color: var(--blue-pale); text-decoration: none;
  border-bottom: 1px solid rgba(124,176,255,.28);
  word-break: break-all; transition: var(--tr);
}
a[href^="http"]:not(.btn):not(.side-back):not(.nav-logo):hover,
.desc-link:hover { color: #a5cbff; border-bottom-color: rgba(165,203,255,.6); }

/* ── GRÁFICOS ── */
.chart-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; margin-bottom: 14px;
}
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.chart-title { font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.chart-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.chart-badge {
  padding: 4px 11px; border-radius: 999px;
  background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.3);
  font-family: var(--font-d); font-size: 12px; font-weight: 700; color: var(--blue-pale);
}
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* Barras horizontais */
.bar-row { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { width: 88px; flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 22px; background: var(--bg2); border-radius: 6px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--blue-light)); transition: width .7s cubic-bezier(.4,0,.2,1); min-width: 3px; }
.bar-val { width: 76px; flex-shrink: 0; text-align: right; font-family: var(--font-d); font-size: 12.5px; font-weight: 700; color: var(--text); }
.bar-val small { display: block; font-size: 10px; color: var(--text-3); font-weight: 600; }

/* Grid financeiro */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fin-box { padding: 15px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); }
.fin-box span { display: block; font-size: 10.5px; color: var(--text-3); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.fin-box strong { font-family: var(--font-d); font-size: 18px; font-weight: 700; letter-spacing: -.5px; color: var(--text); }
.fin-box.pos strong { color: #4ade80; }
.fin-box.neg strong { color: #fca5a5; }
.fin-box.blue strong { color: var(--blue-pale); }

/* Top clientes */
.top-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.top-item:last-child { border-bottom: 0; }
.top-pos { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-family: var(--font-d); font-size: 11px; font-weight: 700; color: var(--blue-pale); }
.top-info { flex: 1; min-width: 0; }
.top-name { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-mail { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-val { flex-shrink: 0; text-align: right; }
.top-val strong { display: block; font-family: var(--font-d); font-size: 14px; font-weight: 700; color: #4ade80; }
.top-val small { font-size: 10.5px; color: var(--text-3); }

/* Legenda */
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

@media (max-width: 560px) {
  .bar-label { width: 68px; font-size: 11px; }
  .bar-val { width: 64px; font-size: 11.5px; }
  .chart-card { padding: 18px 16px; }
}

/* ── Ajustes finais dos gráficos ── */
.bar-val small { font-weight: 600; opacity: .85; }
.chart-card .chart-head + div { min-height: 20px; }
.fin-box strong small { font-weight: 600; }

/* ── Serviços que mais falham ── */
.pior-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.pior-item:last-child { border-bottom: 0; }
.pior-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.pior-nome { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; flex: 1; min-width: 0; }
.pior-pct { font-family: var(--font-d); font-size: 15px; font-weight: 700; flex-shrink: 0; }
.pior-bar { height: 4px; background: var(--bg2); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.pior-fill { height: 100%; border-radius: 2px; transition: width .6s ease; }
.pior-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); }
.pior-btn {
  margin-left: auto; padding: 4px 11px; border-radius: 6px;
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3);
  color: #fca5a5; font-size: 11px; font-weight: 700; transition: var(--tr);
}
.pior-btn:hover { background: rgba(248,113,113,.2); color: #fff; }
.pior-off { margin-left: auto; padding: 4px 9px; border-radius: 6px; background: var(--bg3); font-size: 10.5px; font-weight: 700; color: var(--text-3); }

/* ── MINHA API ── */
.api-key-box { background: var(--bg2); border: 1px solid var(--border-hi); border-radius: var(--r); padding: 20px; }
.api-key-label { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; margin-bottom: 10px; }
.api-key-row { display: flex; gap: 10px; align-items: center; }
.api-key-input {
  flex: 1; min-width: 0; background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px;
  color: var(--blue-pale); font-family: ui-monospace, monospace; font-size: 13px !important;
  outline: none; user-select: all; -webkit-user-select: all;
}
.api-copy-btn { flex: 0 0 auto !important; padding: 12px 20px !important; font-size: 13px !important; }
.api-key-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.api-key-hint strong { color: #fbbf24; }

.api-url-box { padding: 14px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 16px; }
.api-url-label { display: block; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; margin-bottom: 6px; }
.api-url-box code { font-family: ui-monospace, monospace; font-size: 13px; color: var(--blue-pale); word-break: break-all; }

.api-actions { display: flex; flex-direction: column; gap: 8px; }
.api-action { padding: 13px 15px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); transition: border-color var(--tr); }
.api-action:hover { border-color: var(--border-hi); }
.api-action-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.api-action-head code {
  font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 5px;
  background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.3); color: var(--blue-pale);
}
.api-action-head span { font-size: 12.5px; font-weight: 700; color: var(--text); }
.api-action-body { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.api-action-body b { color: var(--text-2); font-weight: 700; }

.api-example { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.api-example-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; background: var(--bg3); border-bottom: 1px solid var(--border);
}
.api-example-head span { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.api-mini-copy { font-size: 11px; font-weight: 700; color: var(--blue-pale); padding: 3px 8px; border-radius: 5px; transition: var(--tr); }
.api-mini-copy:hover { background: rgba(59,130,246,.14); }
.api-example pre {
  padding: 14px; margin: 0; overflow-x: auto;
  font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.7;
  color: var(--text-2); white-space: pre;
}

/* ═══════════════════════════════════════════════════
   SUPORTE
═══════════════════════════════════════════════════ */
.sup-hero { text-align: center; padding: 34px 24px; }
.sup-hero-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 16px; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.28);
  display: flex; align-items: center; justify-content: center; color: #34d399;
}
.sup-hero-icon svg { width: 26px; height: 26px; }
.sup-hero h2 { font-size: 22px; letter-spacing: -.7px; margin-bottom: 8px; }
.sup-hero p { font-size: 13.5px; color: var(--text-3); line-height: 1.65; max-width: 380px; margin: 0 auto 18px; }
.sup-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.sup-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: supPulse 2s ease-in-out infinite; }
@keyframes supPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.sup-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 18px 16px; text-align: left;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
  transition: var(--tr);
}
.sup-card:hover { border-color: var(--border-hi); background: var(--bg3); transform: translateY(-2px); }
.sup-card-ico { font-size: 24px; margin-bottom: 6px; }
.sup-card-ttl { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sup-card-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.sup-faq { display: flex; flex-direction: column; gap: 7px; }
.sup-faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.sup-faq-q {
  width: 100%; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--text); text-align: left;
  transition: var(--tr);
}
.sup-faq-q:hover { background: var(--bg3); }
.sup-faq-arrow { flex-shrink: 0; font-size: 11px; color: var(--blue-pale); transition: transform .2s; }
.sup-faq-item.open .sup-faq-arrow { transform: rotate(180deg); }
.sup-faq-a { display: none; padding: 0 16px 14px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.sup-faq-item.open .sup-faq-a { display: block; }

/* ═══════════════════════════════════════════════════
   HISTÓRICO PREMIUM
═══════════════════════════════════════════════════ */
.orders-premium { display: flex; flex-direction: column; gap: 10px; }

.ord-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  transition: border-color var(--tr), transform var(--tr);
}
.ord-card:hover { border-color: var(--border-hi); }
.ord-vivo { border-color: rgba(59,130,246,.3); }

.ord-head { display: flex; align-items: flex-start; gap: 12px; }
.ord-plat { font-size: 22px; line-height: 1.2; flex-shrink: 0; }
.ord-info { flex: 1; min-width: 0; }
.ord-nome { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.ord-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 500; }

.ord-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.st-ok   { background: rgba(52,211,153,.12);  color: #34d399; }
.st-proc { background: rgba(77,134,255,.14);  color: #7cb0ff; }
.st-wait { background: rgba(251,191,36,.12);  color: #fbbf24; }
.st-bad  { background: rgba(248,113,113,.12); color: #fca5a5; }
.ord-pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: supPulse 1.6s ease-in-out infinite; }

.ord-prog { margin-top: 14px; }
.ord-prog-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ord-prog-txt { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.ord-prog-pct { font-family: var(--font-d); font-size: 13px; font-weight: 700; }
.ord-prog-bar { height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.ord-prog-fill { height: 100%; border-radius: 3px; transition: width .8s cubic-bezier(.4,0,.2,1); position: relative; }
.ord-prog-fill.vivo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: ordShine 1.8s ease-in-out infinite;
}
@keyframes ordShine { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.ord-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.ord-link { flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-3); overflow: hidden; }
.ord-link a, .ord-link span { word-break: break-all; }
.ord-valor { flex-shrink: 0; text-align: right; font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--text); }
.ord-valor small { display: block; font-family: var(--font-b); font-size: 10.5px; font-weight: 600; color: #fca5a5; margin-top: 2px; }

/* Skeleton */
.ord-skel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.ord-skel div { border-radius: 5px; background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: skelShine 1.4s linear infinite; }
.skel-l1 { height: 13px; width: 58%; margin-bottom: 9px; }
.skel-l2 { height: 10px; width: 34%; margin-bottom: 16px; }
.skel-l3 { height: 5px; width: 100%; }
@keyframes skelShine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

@media (max-width: 560px) {
  .ord-card { padding: 14px; }
  .ord-nome { font-size: 13px; }
  .ord-valor { font-size: 14px; }
  .sup-grid { grid-template-columns: 1fr 1fr; }
  .sup-card { padding: 15px 13px; }
  .sup-card-ttl { font-size: 12.5px; }
  .sup-card-sub { font-size: 11px; }
}