/* ============================================================
   d1or Panel — tema "Obsidian Violet"
   preto profundo + roxo dark. Layout: topbar + dock mobile.
   ============================================================ */

:root {
  --bg: #07060b;
  --bg-deep: #050409;
  --surface: #100c1a;
  --surface-2: #17111f;
  --surface-3: #1d1529;
  --line: rgba(151, 108, 255, 0.13);
  --line-strong: rgba(151, 108, 255, 0.26);
  --txt: #ece8f7;
  --txt-dim: #b6aecb;
  --muted: #877f9d;
  --violet: #7c3aed;
  --violet-hi: #a855f7;
  --violet-low: rgba(124, 58, 237, 0.16);
  --violet-glow: rgba(139, 92, 246, 0.35);
  --ok: #4ade80;
  --bad: #fb7185;
  --warn: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  overflow-x: hidden;
  color: var(--txt);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* brilho roxo de fundo, fixo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 58, 237, 0.20), transparent 62%),
    radial-gradient(760px 460px at 105% 8%, rgba(168, 85, 247, 0.13), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(88, 28, 135, 0.18), transparent 65%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(151, 108, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 108, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
}

#app { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--violet-hi); text-decoration: none; }
a:hover { color: #c4a6ff; }
code, pre, .code, .key-value { font-family: var(--mono); }

::selection { background: rgba(124, 58, 237, 0.42); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0810; }
::-webkit-scrollbar-thumb { background: #241a38; border-radius: 99px; border: 2px solid #0a0810; }
::-webkit-scrollbar-thumb:hover { background: #33255019; background: #3a2a5c; }

/* ===================== componentes base ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--txt);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(124, 58, 237, 0.14); border-color: rgba(168, 85, 247, 0.45); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, #6d28d9 55%, #4c1d95 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px -12px var(--violet-glow);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--violet-hi) 0%, var(--violet) 60%, #5b21b6 100%); box-shadow: 0 16px 34px -12px var(--violet-glow); }

.btn-danger { border-color: rgba(251, 113, 133, 0.35); color: #ffb3bf; background: rgba(251, 113, 133, 0.08); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.55); }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  color: var(--txt-dim); cursor: pointer; transition: 0.18s;
}
.icon-btn:hover { color: #fff; border-color: var(--line-strong); background: var(--violet-low); }

.input, input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]), select, textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 6, 14, 0.75);
  color: var(--txt);
  font: 500 15px/1 var(--font);
  transition: 0.18s;
  outline: none;
}
textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input::placeholder, input::placeholder, textarea::placeholder { color: #6b6382; }
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
  background: rgba(13, 9, 21, 0.9);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
select option { background: #100c1a; color: var(--txt); }
input:disabled, .input:disabled { opacity: 0.5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--txt-dim); letter-spacing: 0.02em; }

.card {
  position: relative;
  background: linear-gradient(170deg, rgba(23, 17, 31, 0.92), rgba(12, 9, 18, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.07), transparent 38%);
}
.card > * { position: relative; z-index: 1; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet-hi);
  display: inline-flex; align-items: center; gap: 7px;
}
.eyebrow::before { content: ''; width: 16px; height: 1px; background: linear-gradient(90deg, transparent, var(--violet-hi)); }

.section-title { font-size: 16px; margin-bottom: 14px; }
.muted, .helper { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.hidden { display: none !important; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.22);
  color: var(--ok); font-size: 12px; font-weight: 600;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.notice {
  display: flex; flex-direction: column; gap: 5px;
  padding: 15px 18px; border-radius: 14px; margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  background: var(--violet-low);
  font-size: 13.5px;
}
.notice strong { font-size: 14px; }
.notice span { color: var(--txt-dim); }
.notice.warning { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.07); }
.notice.warning strong { color: var(--warn); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }

.loader {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== toasts ===================== */

.toast-root {
  position: fixed; top: 18px; right: 18px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast-root > div {
  min-width: 250px; max-width: 360px;
  padding: 13px 17px; border-radius: 13px;
  background: rgba(16, 12, 26, 0.97);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--violet-hi);
  color: var(--txt); font-size: 14px; font-weight: 500;
  box-shadow: 0 20px 50px -20px #000;
  backdrop-filter: blur(14px);
  animation: toastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast-root > div.error { border-left-color: var(--bad); }
.toast-root > div.success { border-left-color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px); } }

/* ===================== login / cadastro ===================== */

.d-auth {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 34px 20px;
}
.d-auth-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
  animation: floaty 13s ease-in-out infinite;
}
.d-auth-orb.a { width: 340px; height: 340px; background: rgba(124, 58, 237, 0.30); top: 6%; left: 8%; }
.d-auth-orb.b { width: 300px; height: 300px; background: rgba(168, 85, 247, 0.18); bottom: 8%; right: 10%; animation-delay: -5s; }
@keyframes floaty { 50% { transform: translate3d(0, -26px, 0) scale(1.06); } }

.d-auth-box { width: 100%; max-width: 432px; position: relative; }

.d-auth-brand {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 26px; text-align: center;
}
.d-logo {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -0.045em;
  color: #fff;
}
.d-star { width: 42px; height: 42px; flex: none; color: #fff; filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.55)); }
.d-logo .d-star { margin-right: -2px; }
.d-logo b { font-weight: 800; }
.d-logo small { font-weight: 500; color: var(--muted); font-size: 15px; margin-left: 2px; }
.d-auth-brand p { color: var(--muted); font-size: 14px; max-width: 330px; }

.d-auth-card {
  background: linear-gradient(170deg, rgba(24, 17, 35, 0.95), rgba(10, 8, 16, 0.97));
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}
.d-auth-card h2 { font-size: 22px; margin-bottom: 6px; }
.d-auth-card > p { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.d-auth-card form { display: flex; flex-direction: column; gap: 13px; }
.d-auth-card label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--txt-dim); }
.d-auth-card button[type=submit] { margin-top: 8px; height: 47px; }
.d-auth-switch { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--muted); }
.d-auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 13px; margin-bottom: 22px;
  background: rgba(8, 6, 14, 0.8); border: 1px solid var(--line);
}
.d-auth-tabs a {
  text-align: center; padding: 9px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); transition: 0.18s;
}
.d-auth-tabs a.active { background: var(--violet-low); color: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.d-auth-foot { margin-top: 22px; display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--muted); }

/* ===================== shell (menu lateral) ===================== */

.d-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }

.d-side {
  position: sticky; top: 0; z-index: 60;
  height: 100vh; display: flex; flex-direction: column; gap: 20px;
  padding: 22px 16px;
  background: linear-gradient(180deg, rgba(16, 12, 26, 0.94), rgba(8, 6, 13, 0.96));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.d-side .d-logo {
  background: none; border: 0; cursor: pointer; padding: 6px 8px 0;
  font-size: 22px; text-align: left;
}
.d-side .d-star { width: 34px; height: 34px; }

.d-menu { display: flex; flex-direction: column; gap: 4px; }
.d-menu button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 44px; padding: 0 13px;
  border-radius: 13px; border: 1px solid transparent; background: none;
  color: var(--muted); font: 600 14px/1 var(--font); cursor: pointer;
  text-align: left; transition: 0.18s; position: relative;
}
.d-menu button svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.d-menu button:hover { color: var(--txt); background: rgba(255, 255, 255, 0.035); }
.d-menu button.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(124, 58, 237, 0.26), rgba(124, 58, 237, 0.06));
  border-color: var(--line-strong);
}
.d-menu button.active::before {
  content: ''; position: absolute; left: -16px; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--violet-hi), var(--violet));
  box-shadow: 0 0 14px var(--violet-glow);
}

.d-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.d-user {
  display: flex; align-items: center; gap: 11px; padding: 11px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
}
.d-user i {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px;
  background: linear-gradient(140deg, var(--violet-hi), #4c1d95);
  font-style: normal; font-size: 12.5px; font-weight: 700; color: #fff;
}
.d-user span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.d-user b { font-size: 13px; font-weight: 600; }
.d-user small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.d-menu-out {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 13px; border-radius: 13px; cursor: pointer;
  border: 1px solid rgba(251, 113, 133, 0.2); background: rgba(251, 113, 133, 0.06);
  color: #ffb3bf; font: 600 13.5px/1 var(--font); transition: 0.18s;
}
.d-menu-out svg { width: 17px; height: 17px; }
.d-menu-out:hover { background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.42); }

.d-backdrop { display: none; }

.d-dock { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }

.d-bar {
  position: sticky; top: 0; z-index: 40;
  padding: 12px clamp(16px, 2.4vw, 40px);
  background: rgba(7, 6, 11, 0.8); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.d-bar-inner {
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 1460px; margin: 0 auto;
}
.d-bar-title { flex: 1; min-width: 0; }
.d-bar-title small { display: block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.d-bar-title h2 { font-size: 17px; }
.d-bar-right { display: flex; align-items: center; gap: 10px; }
.d-burger { display: none; }

.content {
  width: 100%; max-width: 1460px; margin: 0 auto;
  padding: clamp(20px, 2.4vw, 34px) clamp(16px, 2.4vw, 40px) 72px;
  animation: rise 0.34s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(23px, 2.4vw, 32px); margin: 8px 0 6px; }
.page-head > div > p:last-child { color: var(--muted); font-size: 14px; max-width: 640px; }

/* ===================== dashboard ===================== */

.stat { display: flex; flex-direction: column; gap: 6px; padding: 20px; overflow: hidden; }
.stat-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: clamp(27px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat-plan { background: linear-gradient(120deg, #fff, var(--violet-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-caption { font-size: 12.5px; color: var(--muted); }

.kicker-card, .upgrade-card, .plan-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.kicker-card h3, .upgrade-card h3, .plan-card h3 { font-size: 18px; margin-bottom: 5px; }
.kicker-card p, .upgrade-card p, .plan-card p { color: var(--muted); font-size: 13.5px; }
.upgrade-card { border-color: var(--line-strong); background: linear-gradient(120deg, rgba(124, 58, 237, 0.18), rgba(16, 12, 26, 0.94) 62%); }

.plan-badge {
  display: inline-flex; padding: 6px 13px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: var(--violet-low); color: #d6c4ff;
}
.plan-badge.paid { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.1); color: var(--ok); }
.plan-badge.admin { border-color: rgba(251, 191, 36, 0.32); background: rgba(251, 191, 36, 0.1); color: var(--warn); }
.profile-plan { margin-bottom: 18px; }

/* ===================== módulos ===================== */

.mod-search { position: relative; display: block; width: min(320px, 100%); }
.mod-search > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--violet-hi); font-size: 17px; }
.mod-search .input { padding-left: 38px; }

.mod-group { margin-bottom: 30px; }
.mod-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mod-group-head h2 { font-size: 15px; letter-spacing: 0.02em; }
.mod-group-head span {
  padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line); background: var(--violet-low); color: #cbb4ff;
}
.mod-group-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }

.mod-card {
  display: flex; flex-direction: column; gap: 12px; text-align: left;
  padding: 18px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(23, 17, 31, 0.9), rgba(11, 8, 17, 0.92));
  color: var(--txt); font-family: var(--font); transition: 0.18s ease;
}
.mod-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(165deg, rgba(40, 26, 62, 0.92), rgba(13, 9, 20, 0.94));
  box-shadow: 0 22px 44px -26px var(--violet-glow);
}
.mod-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  border: 1px solid var(--line-strong); background: var(--violet-low); color: #c9b1ff;
}
.mod-icon svg { width: 19px; height: 19px; }
.mod-icon.big { width: 52px; height: 52px; margin: 0 auto 14px; }
.mod-icon.big svg { width: 24px; height: 24px; }
.mod-body { display: flex; flex-direction: column; gap: 5px; }
.mod-body strong { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.mod-body small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mod-params { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.mod-params span {
  padding: 4px 9px; border-radius: 8px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); color: var(--txt-dim);
}

/* ===================== consulta ===================== */

.d-query {
  position: relative;
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px 220px at 50% -20%, rgba(124, 58, 237, 0.26), transparent 70%),
    linear-gradient(170deg, rgba(24, 17, 35, 0.94), rgba(9, 7, 15, 0.96));
  box-shadow: 0 40px 90px -46px #000;
}
.d-query h2 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.d-query > p { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }

.consult-row, .consult-row-advanced {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 5, 10, 0.86);
}
.consult-row .input, .consult-row select { height: 50px; border-color: transparent; background: rgba(255, 255, 255, 0.025); }
.consult-form { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }
.consult-form .btn-primary { height: 48px; }
.consult-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.consult-params .field { margin: 0; }
.consult-row #valor-consulta { font-family: var(--mono); font-size: 16px; letter-spacing: 0.02em; }
.consult-row button { height: 50px; padding: 0 26px; border-radius: 12px; }

.d-hint { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.d-hint span {
  padding: 6px 12px; border-radius: 99px; font-size: 12px; color: var(--txt-dim);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
}
.consult-box { padding: 0; border: 0; background: none; box-shadow: none; }
.consult-box::after { display: none; }

/* ===================== resultado ===================== */

.result, .result-viewer { display: flex; flex-direction: column; gap: 16px; }
.result-page-head { margin-bottom: 22px; }

.result-toolbar {
  position: sticky; top: 64px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px;
  background: linear-gradient(170deg, rgba(26, 19, 38, 0.96), rgba(12, 9, 18, 0.97));
  backdrop-filter: blur(14px);
}
.result-toolbar-title { min-width: 200px; }
.result-toolbar-title h2 { font-size: 18px; margin: 7px 0 4px; }
.result-toolbar-title span { display: block; font-size: 12.5px; color: var(--muted); }
.result-toolbar-actions { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }

.result-search-wrap { position: relative; display: block; flex: 1; min-width: 220px; max-width: 420px; }
.result-search-wrap > span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--violet-hi); font-size: 17px; pointer-events: none;
}
.result-search-wrap .input { padding-left: 38px; }

/* uma seção do resultado = card sem padding, com cabeçalho e grade */
.card.result-section { padding: 0; overflow: hidden; }
.card.result-section::after { display: none; }

.result-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.02));
}
.result-section-head .section-title { margin: 0; font-size: 14.5px; letter-spacing: -0.01em; }
.result-section-head .result-count {
  padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--line-strong); background: var(--violet-low); color: #d6c4ff;
}

.data-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px; background: var(--line);
}
.data-field {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 14px 18px; background: #0c0913; transition: background 0.18s;
}
.data-field:hover { background: #140f1f; }

/* cabeçalho do campo: rótulo + botão copiar */
.data-field-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.data-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.data-value {
  font-size: 14.5px; font-weight: 500; line-height: 1.45;
  overflow-wrap: anywhere; word-break: break-word;
}
.copy-field {
  width: auto; height: 24px; padding: 0 10px; flex: none;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--violet-low); color: #cbb4ff;
  font: 600 10.5px/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  opacity: 0; transition: 0.18s;
}
.data-field:hover .copy-field, .copy-field:focus-visible { opacity: 1; }
.copy-field:hover { background: var(--violet); color: #fff; border-color: transparent; }
@media (hover: none) { .copy-field { opacity: 1; } }

.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; padding: 18px; }
.record-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(8, 6, 13, 0.6); }
.record-title {
  padding: 12px 16px; margin: 0;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #d9cbff;
  border-bottom: 1px solid var(--line); background: rgba(124, 58, 237, 0.07);
}
.record-card .data-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.record-card .data-field { background: #0a0811; }
.record-card .data-field:hover { background: #120d1c; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.info { display: flex; flex-direction: column; gap: 4px; }
.info span { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.info strong { font-size: 14.5px; font-weight: 500; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8, 6, 13, 0.65); font-size: 13.5px; }

.photo-section .photo-grid { padding: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #0b0812; display: flex; flex-direction: column; }
.photo-preview { display: block; width: 100%; padding: 0; border: 0; background: #0b0812; cursor: zoom-in; }
.photo-preview img { display: block; width: 100%; height: 215px; object-fit: cover; }
.photo-info { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 8px; }
.photo-info strong { font-size: 13px; }
.photo-info span { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.photo-actions { display: flex; gap: 8px; padding: 0 14px 14px; margin-top: auto; }
.photo-actions .table-btn { flex: 1; text-align: center; text-decoration: none; }

.photo-modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 28px; background: rgba(4, 3, 8, 0.93); backdrop-filter: blur(10px);
}
.photo-modal img { max-width: min(880px, 92vw); max-height: 72vh; border-radius: 18px; border: 1px solid var(--line-strong); }
.photo-modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 42px; height: 42px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(16, 12, 26, 0.9); color: #fff; font-size: 24px; line-height: 1;
}

.empty {
  padding: 42px 20px; text-align: center; color: var(--muted); font-size: 14px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, 0.015);
}

/* ===================== histórico / tabelas ===================== */

.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: auto;
  background: linear-gradient(170deg, rgba(22, 16, 30, 0.9), rgba(11, 8, 17, 0.92));
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
thead th {
  text-align: left; padding: 13px 18px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  background: rgba(124, 58, 237, 0.07); border-bottom: 1px solid var(--line);
}
tbody td { padding: 14px 18px; border-bottom: 1px solid rgba(151, 108, 255, 0.07); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(124, 58, 237, 0.05); }
td.code, .code { font-family: var(--mono); font-size: 13px; color: #cdb8ff; }

.table-btn {
  padding: 7px 13px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--violet-low); color: #d6c4ff;
  font: 600 12.5px/1 var(--font); transition: 0.18s;
}
.table-btn:hover { background: var(--violet); color: #fff; }

/* ===================== API ===================== */

.api-key-card { display: flex; flex-direction: column; gap: 16px; }
.api-key-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.key-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 15px 18px; border-radius: 14px;
  border: 1px dashed var(--line-strong); background: rgba(6, 5, 10, 0.85);
}
.key-value { font-size: 14px; color: #cdb8ff; word-break: break-all; flex: 1; }
.key-meta { font-size: 12.5px; color: var(--muted); }
.danger-zone {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 17px; border-radius: 14px;
  border: 1px solid rgba(251, 113, 133, 0.22); background: rgba(251, 113, 133, 0.05);
}
.danger-zone p { color: var(--muted); font-size: 13px; margin-top: 3px; }

.endpoint-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(6, 5, 10, 0.8); margin-bottom: 12px;
}
.endpoint-row code { font-size: 13.5px; color: #cdb8ff; word-break: break-all; }
.method {
  padding: 5px 11px; border-radius: 8px; font: 700 11px/1 var(--mono); letter-spacing: 0.06em;
  background: var(--violet-low); border: 1px solid var(--line-strong); color: #c4a6ff;
}
.method-get { color: var(--ok) !important; background: rgba(74, 222, 128, 0.08) !important; border-color: rgba(74, 222, 128, 0.22) !important; }
.method-post { color: #a5b4fc !important; background: rgba(129, 140, 248, 0.09) !important; border-color: rgba(129, 140, 248, 0.22) !important; }
.http-code { font-family: var(--mono); font-size: 12px; color: var(--violet-hi); }

.code-block {
  padding: 16px 18px; border-radius: 14px; overflow: auto; margin-bottom: 14px;
  border: 1px solid var(--line); background: #06050a;
  font-size: 13px; line-height: 1.65; color: #cbbde6; max-height: 340px;
}
.code-block code { color: inherit; white-space: pre; }
p code, li code, td code, .helper code {
  padding: 2px 6px; border-radius: 6px; font-size: 12.5px;
  background: var(--violet-low); border: 1px solid var(--line); color: #cdb8ff;
}
.copy-section, .copy-field { display: flex; gap: 8px; align-items: center; }
.security-note p { color: var(--muted); font-size: 13.5px; }

/* ===================== docs ===================== */

.docs-shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.docs-sidebar {
  position: sticky; top: 0; height: 100vh; padding: 26px 20px;
  display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid var(--line); background: rgba(8, 6, 13, 0.8); backdrop-filter: blur(14px);
}
.docs-brand { display: flex; align-items: center; gap: 10px; }
.docs-version { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.docs-nav { display: flex; flex-direction: column; gap: 4px; }
.docs-nav a {
  padding: 10px 13px; border-radius: 11px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: 0.18s;
}
.docs-nav a:hover, .docs-nav a.active { background: var(--violet-low); color: #fff; }
.docs-side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.docs-main { display: flex; flex-direction: column; min-width: 0; }
.docs-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 30px; border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 11, 0.82); backdrop-filter: blur(16px);
}
.docs-top-actions { display: flex; gap: 8px; }
.docs-content { padding: 34px 30px 80px; max-width: 980px; width: 100%; }
.docs-hero { padding: 30px; border-radius: 22px; margin-bottom: 30px; border: 1px solid var(--line-strong);
  background: radial-gradient(500px 200px at 20% 0%, rgba(124, 58, 237, 0.22), transparent 70%), rgba(14, 10, 22, 0.9); }
.docs-hero h1 { font-size: 32px; margin: 10px 0 10px; }
.docs-hero p { color: var(--muted); max-width: 640px; }
.docs-base-url { margin-top: 18px; display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(6, 5, 10, 0.8); font-family: var(--mono); font-size: 13px; color: #cdb8ff; }
.docs-section { margin-bottom: 40px; }
.docs-heading { display: flex; gap: 14px; margin-bottom: 16px; }
.docs-heading > span { font-family: var(--mono); font-size: 12px; color: var(--violet-hi); padding-top: 6px; }
.docs-heading h2 { font-size: 21px; margin-bottom: 5px; }
.docs-heading p { color: var(--muted); font-size: 13.5px; }
.docs-callout { display: flex; flex-direction: column; gap: 7px; padding: 15px 18px; border-radius: 14px; margin: 14px 0;
  border: 1px solid var(--line-strong); border-left: 3px solid var(--violet-hi); background: var(--violet-low); }
.docs-callout code { font-family: var(--mono); font-size: 13px; color: #d9c8ff; }
.docs-endpoint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 16px; border-radius: 12px; margin: 12px 0;
  border: 1px solid var(--line); background: rgba(6, 5, 10, 0.8); font-family: var(--mono); font-size: 13px; }
.docs-code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.docs-code-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(13, 10, 20, 0.85); }
.docs-code-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 13.5px; }
.docs-copy { padding: 6px 11px; border-radius: 9px; cursor: pointer; border: 1px solid var(--line-strong); background: var(--violet-low); color: #d6c4ff; font: 600 12px/1 var(--font); }
.docs-copy:hover { background: var(--violet); color: #fff; }
.docs-table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: auto; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.docs-table th { text-align: left; padding: 12px 15px; background: rgba(124, 58, 237, 0.08); color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.docs-table td { padding: 12px 15px; border-top: 1px solid var(--line); }
.docs-response { margin-top: 12px; }

/* ===================== responsivo ===================== */

@media (max-width: 1240px) {
  .d-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .d-shell { grid-template-columns: 1fr; }
  /* Menu lateral e hambúrguer saem de cena no mobile — a navegação
     principal passa a viver no dock fixo embaixo (.d-dock), sempre visível,
     sem precisar abrir nada pra trocar de tela. */
  .d-side { display: none; }
  .d-backdrop { display: none !important; }
  .d-burger { display: none; }
  .d-bar { padding: 10px 14px; }
  .d-bar-right .plan-badge { display: none; }
  .content { padding: 20px 14px calc(88px + env(safe-area-inset-bottom, 0px)); }

  .d-dock {
    display: flex; align-items: stretch; gap: 2px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 8, 15, 0.92); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .d-dock button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    flex: 1 1 auto; min-width: 60px; padding: 7px 4px 6px;
    border: 0; background: none; border-radius: 12px; cursor: pointer;
    color: var(--muted); font: 600 10.5px/1.1 var(--font); white-space: nowrap;
    transition: color 0.18s, background 0.18s;
  }
  .d-dock button svg { width: 20px; height: 20px; }
  .d-dock button.active { color: #fff; background: var(--violet-low); }
  .d-dock button:active { background: rgba(255, 255, 255, 0.06); }

  .mod-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
  .mod-card { padding: 14px; gap: 10px; border-radius: 14px; }
  .mod-icon { width: 34px; height: 34px; border-radius: 11px; }
  .mod-body small { font-size: 11.5px; }
  .mod-params { display: none; }
  .mod-search { width: 100%; }
  .page-head { gap: 12px; }
  .result-toolbar { position: static; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .consult-row, .consult-row-advanced { grid-template-columns: 1fr; }
  .consult-params { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 25px; }
  .data-grid, .record-card .data-grid { grid-template-columns: 1fr; }
  .records-grid { grid-template-columns: 1fr; padding: 14px; }

  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; height: auto; }
  .docs-content, .docs-topbar { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 520px) {
  .d-auth-card { padding: 24px 20px; }
  .page-head { align-items: flex-start; }
  .result-toolbar-actions { flex-direction: column; align-items: stretch; }
  .result-search-wrap { max-width: none; }
  .kicker-card, .upgrade-card, .plan-card, .danger-zone { flex-direction: column; align-items: flex-start; }
  .kicker-card .btn, .upgrade-card .btn, .plan-card .btn { width: 100%; }
  .photo-preview img { height: 190px; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .d-bar-title small { display: none; }
  .consult-params { grid-template-columns: 1fr; }
}

/* ===================== marca (docs / fallback) ===================== */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -0.03em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  color: #fff; filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
}
.brand-mark svg { width: 100%; height: 100%; }


/* ===================== planos (pricing) ===================== */

.link-btn {
  background: none; border: none; padding: 0; color: var(--violet-hi);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: #c4a6ff; }

.plano-status { margin-bottom: 22px; padding: 20px 22px; }
.plano-status-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plano-status-inner h3 { font-size: 19px; margin: 4px 0 2px; }
.plano-status-inner p { color: var(--muted); font-size: 13.5px; }
.plano-status-bar {
  width: 220px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.06);
  overflow: hidden; flex: none;
}
.plano-status-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--violet-hi));
}

.plano-grid {
  display: grid; gap: 18px; margin-bottom: 36px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.plano-card {
  position: relative;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.plano-card::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(220px 140px at 100% 0%, rgba(124, 58, 237, 0.16), transparent 70%);
}
.plano-card > * { position: relative; z-index: 1; }

.plano-card--highlight {
  border-color: rgba(168, 85, 247, 0.55);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.14) 0%, var(--surface-2) 55%);
  box-shadow: 0 26px 70px -24px var(--violet-glow), var(--shadow);
  transform: translateY(-6px);
}
.plano-card--current { border-color: rgba(74, 222, 128, 0.4); }

.plano-badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 99px; color: #fff;
  background: linear-gradient(135deg, var(--violet-hi), var(--violet));
  box-shadow: 0 8px 18px -8px var(--violet-glow);
}

.plano-card h3 { font-size: 21px; margin-bottom: 4px; }
.plano-tagline { color: var(--muted); font-size: 13.5px; min-height: 36px; }

.plano-price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.plano-price-amount { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.plano-price-suffix { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.plano-price-note { color: var(--ok); font-size: 12.5px; font-weight: 600; margin-top: 4px; min-height: 16px; }

.plano-features { list-style: none; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.plano-features li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--txt-dim); }
.plano-check {
  flex: none; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(74, 222, 128, 0.12); color: var(--ok); font-size: 11px; font-weight: 800; margin-top: 1px;
}

.plano-cta { margin-top: auto; }
.plano-current {
  display: block; text-align: center; padding: 11px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--ok);
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3);
}

.plano-faq { margin-top: 12px; }
.plano-faq h2 { font-size: 20px; margin-bottom: 14px; }
.plano-faq-list { display: flex; flex-direction: column; gap: 10px; }
.plano-faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px;
}
.plano-faq-item summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.plano-faq-item summary::-webkit-details-marker { display: none; }
.plano-faq-item summary::after { content: '+'; color: var(--violet-hi); font-size: 18px; font-weight: 400; }
.plano-faq-item[open] summary::after { content: '−'; }
.plano-faq-item p { color: var(--muted); font-size: 13.5px; padding-bottom: 16px; }

@media (max-width: 760px) {
  .plano-card--highlight { transform: none; }
  .plano-status-inner { flex-direction: column; align-items: flex-start; }
  .plano-status-bar { width: 100%; }
}
