/* ===== RESET & VARIABLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-main: #04050a;
  --bg-sidebar: #080910;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --brand-glow: rgba(99, 102, 241, 0.35);
  --emerald: #10b981;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(10, 11, 18, 0.85);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
}

/* Visibility & Tab Toggling */
.hidden {
  display: none !important;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.subtab-pane {
  display: none;
}

.subtab-pane.active {
  display: block;
}

/* Background Gradients */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(99, 102, 241, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, #04050a 0%, #060810 100%);
  pointer-events: none;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -1;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: 20%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

/* Layout */
.portal-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.portal-sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 16px;
  z-index: 10;
}

.sidebar-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--brand-glow);
}

.brand-logo-circle svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.brand-texts {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.05em;
}

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

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 16px 12px 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #fff;
  font-weight: 700;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.footer-link svg {
  width: 16px;
  height: 16px;
}

/* Main Area */
.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(6, 8, 16, 0.6);
  backdrop-filter: blur(20px);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 14px;
  width: 360px;
}

.topbar-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.topbar-search input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  width: 100%;
}

.topbar-search input:focus {
  outline: none;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

/* Content Body */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
}

.tab-content {
  display: none;
  max-width: 960px;
  margin: 0 auto;
}

.tab-content.active {
  display: block;
}

.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--brand-glow);
}

.btn-action svg {
  width: 16px;
  height: 16px;
}

.btn-action:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.app-meta {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.app-id {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.app-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Inspector Drawer */
.card-inspector {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  margin-top: 24px;
}

.hidden {
  display: none !important;
}

/* Oauth & Perm Matrix */
.oauth-calculator-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calc-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  max-width: 400px;
}

.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.permissions-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
}

.perm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.output-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 20px;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.perm-number {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
}

.url-copy-box {
  display: flex;
  gap: 12px;
}

.url-copy-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
}

.btn-copy {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Documentation Cards */
.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.install-prompt {
  color: var(--emerald);
  font-weight: 800;
}

.btn-copy-code {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}

.doc-h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-top: 10px;
}

.doc-p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.inline-code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: #a5b4fc;
}

.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Gateway Flow */
.gateway-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.flow-step {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.flow-step p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tables */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.doc-table th {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.doc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge.get { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.badge.post { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge.put { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge.delete { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background: #0f111a;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}

.form-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  margin-top: 6px;
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

/* App Sub-navigation inside Inspector */
.app-subnav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.app-subnav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.app-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.app-subnav-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Warning Box */
.warning-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 16px;
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warning-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #ef4444;
  margin-top: 2px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: rgba(10, 11, 18, 0.4);
  border: 1px dashed var(--border-subtle);
  border-radius: 20px;
  gap: 16px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: #111422;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  padding: 12px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Command Row */
.command-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  transition: border-color 0.2s;
}

.command-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.command-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #818cf8;
}

.command-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================================
   GITBOOK FIVE-M DOCUMENTATION STYLES
   ======================================================== */
.gitbook-layout {
  display: flex;
  height: calc(100vh - 120px);
  background: rgba(10, 11, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
}

.gitbook-nav {
  width: 280px;
  background: rgba(6, 7, 12, 0.85);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 20px 14px;
}

.gitbook-nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.gitbook-nav-header span {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.gitbook-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 14px 10px 6px;
}

.gitbook-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s;
}

.gitbook-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.gitbook-nav-link.active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

.gitbook-content {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px;
  color: #e2e8f0;
  line-height: 1.7;
}

.gitbook-page {
  display: none;
  animation: fadeIn 0.2s ease;
}

.gitbook-page.active {
  display: block;
}

.gitbook-h1 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.gitbook-lead {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.gitbook-h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.gitbook-h3 {
  font-size: 15px;
  font-weight: 700;
  color: #cbd5e1;
  margin: 18px 0 8px;
}

.gitbook-callout {
  border-radius: 12px;
  padding: 16px 20px;
  margin: 18px 0;
  display: flex;
  gap: 14px;
  font-size: 13px;
  line-height: 1.6;
}

.gitbook-callout.info {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
}

.gitbook-callout.tip {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.gitbook-callout.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.gitbook-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

.gitbook-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.gitbook-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========================================================
   MODULAR & DYNAMIC EMBED BUILDER STYLES
   ======================================================== */
.builder-element-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 20px;
}

.btn-add-element {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-add-element:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn-add-element.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.builder-block {
  background: rgba(12, 14, 22, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
  position: relative;
  transition: border-color 0.2s;
}

.builder-block:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.builder-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.builder-block-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-remove-block {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}

.btn-remove-block:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

/* Discord Live Message Container */
.discord-msg-wrapper {
  background: #1e1f22;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-sans);
}

.discord-msg-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.discord-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.discord-bot-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.discord-bot-badge {
  background: #5865F2;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.discord-msg-time {
  font-size: 11px;
  color: #949ba4;
  margin-left: 6px;
}

.discord-embed-card {
  max-width: 520px;
  background: #2b2d31;
  border-left: 4px solid #5865F2;
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.discord-embed-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.discord-embed-main {
  flex: 1;
}

.discord-embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #f2f3f5;
  margin-bottom: 6px;
}

.discord-embed-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.discord-embed-title a {
  color: #00a8fc;
  text-decoration: none;
}

.discord-embed-title a:hover {
  text-decoration: underline;
}

.discord-embed-desc {
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.45;
  white-space: pre-line;
}

.discord-embed-thumb {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.discord-embed-field {
  grid-column: span 3;
}

.discord-embed-field.inline {
  grid-column: span 1;
}

.discord-field-name {
  font-size: 12px;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 2px;
}

.discord-field-value {
  font-size: 12px;
  color: #dbdee1;
  line-height: 1.4;
  white-space: pre-line;
}

.discord-embed-image {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 6px;
}

.discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #949ba4;
  margin-top: 4px;
}

.discord-embed-footer img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* Color Presets */
.color-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: #fff;
}


