/* ================================================================
   VergentX — premium black / gold / silver design system
   ================================================================ */
:root {
  --bg: #060608;
  --bg-soft: #0b0b0f;
  --card: rgba(255, 255, 255, 0.025);
  --card-border: rgba(212, 175, 55, 0.14);
  --card-border-soft: rgba(255, 255, 255, 0.06);
  --gold: #d4af37;
  --gold-bright: #f0d27c;
  --gold-grad: linear-gradient(135deg, #f5d67b 0%, #d4af37 45%, #b08d2a 100%);
  --silver: #c0c7d1;
  --text: #e8e8ec;
  --text-dim: #9a9aa5;
  --text-faint: #5f5f6b;
  --green: #46a758;
  --red: #e5484d;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(212, 175, 55, 0.08), transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 110%, rgba(192, 199, 209, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, nav, .sidebar, .toasts { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

::selection { background: rgba(212, 175, 55, 0.3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #26262e; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #34343e; }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-dim); }
.small { font-size: 13px; }

/* ---------------------------------------------------------------- nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--card-border-soft);
  backdrop-filter: blur(14px);
  background: rgba(6, 6, 8, 0.75);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.brand img { height: 38px; width: 38px; object-fit: contain; }
.brand:hover { color: var(--text); }
.brand span em { font-style: normal; color: var(--gold); }

.navlinks { display: flex; align-items: center; gap: 26px; }
.navlinks a { color: var(--text-dim); font-weight: 500; font-size: 14px; transition: color .15s; }
.navlinks a:hover { color: var(--text); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: var(--gold-grad);
  color: #131108;
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover { box-shadow: 0 6px 32px rgba(212, 175, 55, 0.45); color: #131108; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.06); color: var(--text); }

.btn-danger { background: rgba(229, 72, 77, 0.12); color: var(--red); border: 1px solid rgba(229, 72, 77, 0.35); }
.btn-danger:hover { background: rgba(229, 72, 77, 0.2); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(8px);
}

.card-gold { border-color: var(--card-border); }

.card h3 { margin-bottom: 6px; }

/* ---------------------------------------------------------------- landing */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 32px 60px;
  text-align: center;
}

.hero img.hero-logo {
  height: 170px;
  margin-bottom: 26px;
  filter: drop-shadow(0 0 45px rgba(212, 175, 55, 0.35));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 18px; }
.hero p.lead { font-size: 18px; color: var(--text-dim); max-width: 640px; margin: 0 auto 34px; }

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stat-strip {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin: 70px auto 0;
  flex-wrap: wrap;
}
.stat-strip .stat b { display: block; font-size: 32px; color: var(--gold); font-weight: 800; }
.stat-strip .stat span { color: var(--text-faint); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 32px;
}
.section > h2 { font-size: 30px; margin-bottom: 6px; }
.section > p.sub { color: var(--text-dim); margin-bottom: 34px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature:hover {
  border-color: var(--card-border);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.feature h4 { font-size: 15px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.feature p { color: var(--text-dim); font-size: 13px; line-height: 1.5; }

.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.badge.silver { background: rgba(192, 199, 209, 0.1); color: var(--silver); border-color: rgba(192, 199, 209, 0.25); }

footer.site-footer {
  border-top: 1px solid var(--card-border-soft);
  padding: 34px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer img { height: 26px; opacity: .8; }

/* ---------------------------------------------------------------- auth */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 36px;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.auth-card img { height: 74px; margin-bottom: 16px; filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.3)); }
.auth-card h2 { margin-bottom: 4px; }
.auth-card p.muted { margin-bottom: 26px; font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-alt { margin-top: 22px; font-size: 13px; color: var(--text-dim); }

/* ---------------------------------------------------------------- forms */
label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--silver);
  margin-bottom: 6px;
}
.field-help { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

input[type="text"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
textarea { resize: vertical; min-height: 90px; }
select[multiple] { min-height: 120px; }
select option { background: #101014; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #26262e;
  border-radius: 999px;
  transition: background .2s;
}
.slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background: #6f6f7c;
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.switch input:checked + .slider { background: rgba(212, 175, 55, 0.35); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--gold); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0; }
.toggle-row .t-label { font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- dashboard shell */
.dash {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: rgba(10, 10, 14, 0.85);
  border-right: 1px solid var(--card-border-soft);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand { padding: 4px 10px 18px; }
.sidebar .sb-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-weight: 700;
  margin: 16px 10px 6px;
}
.sidebar a.sb-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.sidebar a.sb-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.sidebar a.sb-link.active { background: rgba(212, 175, 55, 0.1); color: var(--gold); }
.sidebar a.sb-link .dot { width: 7px; height: 7px; border-radius: 50%; background: #34343e; }
.sidebar a.sb-link .dot.on { background: var(--green); box-shadow: 0 0 8px rgba(70, 167, 88, 0.7); }

.dash-main { flex: 1; padding: 34px 42px 80px; max-width: 1120px; }

.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.dash-head h1 { font-size: 26px; }
.dash-head .crumb { color: var(--text-faint); font-size: 13px; margin-bottom: 4px; }
.dash-head .crumb a { color: var(--text-dim); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-card b { display: block; font-size: 26px; color: var(--gold); font-weight: 800; }
.stat-card span { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* module grid */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.module-card {
  background: var(--card);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, transform .15s;
}
.module-card:hover { border-color: var(--card-border); transform: translateY(-2px); }
.module-card .mc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-card h4 { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.module-card p { color: var(--text-dim); font-size: 13px; flex: 1; }
.module-card .mc-foot { display: flex; align-items: center; justify-content: space-between; }
.module-card .mc-foot a { font-size: 13px; font-weight: 600; }

/* guild picker */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guild-card {
  background: var(--card);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
  transition: border-color .2s, transform .15s;
}
.guild-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--text); }
.guild-card img, .guild-card .g-fallback {
  width: 52px; height: 52px; border-radius: 14px;
  object-fit: cover; flex-shrink: 0;
}
.guild-card .g-fallback {
  background: var(--gold-grad);
  color: #131108;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
}
.guild-card b { display: block; font-size: 15px; }
.guild-card span { font-size: 12.5px; color: var(--text-faint); }

/* tables */
table.vx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vx-table th {
  text-align: left; padding: 10px 12px;
  color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--card-border-soft);
}
.vx-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: top; }
.vx-table tr:hover td { background: rgba(255, 255, 255, 0.015); }

.table-scroll { overflow-x: auto; }

/* module settings sections */
.settings-block { margin-bottom: 26px; }
.settings-block > h3 {
  font-size: 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.settings-block > h3::after { content: ''; flex: 1; height: 1px; background: var(--card-border-soft); }

.enable-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 26px;
}

/* toasts */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 280px; max-width: 380px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: toast-in .25s ease, toast-out .4s ease 4.6s forwards;
  border: 1px solid;
}
.toast.success { background: rgba(70, 167, 88, 0.12); border-color: rgba(70, 167, 88, 0.4); color: #7fd490; }
.toast.error { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.4); color: #f08a8d; }

@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); visibility: hidden; } }

/* responsive */
@media (max-width: 900px) {
  .dash { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .dash-main { padding: 24px 18px 60px; }
  .topnav { padding: 14px 18px; }
}

/* ---- icon system (monochrome line icons, inherit text color) ---- */
svg.vx-ico { display: block; flex: 0 0 auto; }

.sidebar a.sb-link { justify-content: flex-start; }
.sidebar a.sb-link .sb-ico {
  width: 20px;
  margin-right: 9px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .75;
  transition: opacity .12s;
}
.sidebar a.sb-link:hover .sb-ico,
.sidebar a.sb-link.active .sb-ico { opacity: 1; }
.sidebar a.sb-link .dot { margin-left: auto; }
.sidebar a.sb-link .badge { margin-left: auto; }

.module-card h4 .mc-ico,
.feature h4 .mc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  color: var(--silver);
  opacity: .85;
}
.module-card:hover h4 .mc-ico,
.feature:hover h4 .mc-ico { color: var(--gold); opacity: 1; }

/* ================================================================
   Polish layer — hairlines, separators, refined proportions.
   Everything here is an override on the base system above.
   ================================================================ */
:root {
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-gold: rgba(212, 175, 55, 0.28);
}

/* gradient hairline across the top edge of every card */
.card { position: relative; }
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
  pointer-events: none;
}
.card-gold::before {
  background: linear-gradient(90deg, transparent, var(--hairline-gold), transparent);
}

/* page header sits on its own divider */
.dash-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 18px;
}

/* sidebar rhythm: brand divider, ruled section labels, gold rail on active */
.sidebar .brand { border-bottom: 1px solid var(--hairline); margin-bottom: 12px; }
.sidebar .sb-section {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  margin-top: 14px;
}
.sidebar a.sb-link.active { box-shadow: inset 2px 0 0 var(--gold); }

/* stat cards: tighter numerals, caps labels, gold top hairline */
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  transition: border-color .2s;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--hairline-gold), transparent 70%);
}
.stat-card:hover { border-color: var(--card-border); }
.stat-card b { font-size: 24px; letter-spacing: -0.02em; }
.stat-card span { letter-spacing: 0.1em; }

/* icon tiles: module cards + landing features */
.module-card h4 .mc-ico,
.feature h4 .mc-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.10), rgba(212, 175, 55, 0.03));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  color: var(--silver);
  opacity: 1;
  flex: 0 0 auto;
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.module-card:hover h4 .mc-ico,
.feature:hover h4 .mc-ico {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.15);
}

/* module card footer separated from body */
.module-card .mc-foot {
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  margin-top: 4px;
}

/* enable banner: gold accent rail */
.enable-banner { position: relative; overflow: hidden; }
.enable-banner::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold-grad);
}

/* toggle rows read as a ruled settings list */
.form-grid .toggle-row {
  border-bottom: 1px solid var(--hairline);
  padding: 9px 0 11px;
}

/* tables: gold-tinted rule under headers */
.vx-table th { border-bottom-color: var(--hairline-gold); }

/* buttons: glossy inner top highlight */
.btn-gold {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 4px 24px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 32px rgba(212, 175, 55, 0.45);
}
.switch .slider::before { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }

/* landing: ruled hero stat strip + section dividers */
.stat-strip { gap: 0; }
.stat-strip .stat { padding: 0 44px; }
.stat-strip .stat + .stat { border-left: 1px solid var(--hairline); }
.section + .section { border-top: 1px solid var(--hairline); }

/* auth card: divider above the footer link */
.auth-alt {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  margin-top: 24px;
}

/* guild cards get the same top hairline as cards */
.guild-card { position: relative; overflow: hidden; }
.guild-card::before {
  content: '';
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
}

@media (max-width: 720px) {
  .stat-strip .stat { padding: 10px 24px; }
  .stat-strip .stat + .stat { border-left: none; }
}

/* file inputs (bot identity page) */
input[type="file"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
}
input[type="file"]::file-selector-button {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  margin-right: 12px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
input[type="file"]::file-selector-button:hover { background: rgba(212, 175, 55, 0.2); }

/* ---- checkbox multi-select dropdown ---- */
details.msel { position: relative; }
details.msel summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  background: #0e0e14;
  border: 1px solid #26262e;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  user-select: none;
}
details.msel summary::-webkit-details-marker { display: none; }
details.msel summary:hover { border-color: #3a3a44; color: var(--text); }
details.msel[open] summary {
  border-color: var(--gold);
  color: var(--text);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
details.msel .msel-caret { transition: transform .15s ease; flex: 0 0 auto; }
details.msel[open] .msel-caret { transform: rotate(180deg); }
details.msel .msel-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #101018;
  border: 1px solid var(--gold);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 6px;
}
.msel-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
}
.msel-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.msel-opt input { position: absolute; opacity: 0; pointer-events: none; }
.msel-box {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 1.5px solid #3a3a44;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b0b0f;
  background: transparent;
  transition: all .12s ease;
}
.msel-opt input:checked + .msel-box {
  background: var(--gold);
  border-color: var(--gold);
}
.msel-opt input:checked ~ .msel-name { color: var(--text); }
.msel-box svg { opacity: 0; }
.msel-opt input:checked + .msel-box svg { opacity: 1; }
details.msel[data-locked] summary { opacity: .6; cursor: not-allowed; }

/* ---- unified premium form controls: every input/select matches .msel ---- */
input[type="text"], input[type="password"], input[type="number"],
textarea, select {
  background: #0e0e14;
  border: 1px solid #26262e;
  border-radius: 10px;
}
input[type="text"]:hover, input[type="password"]:hover,
input[type="number"]:hover, textarea:hover, select:hover {
  border-color: #3a3a44;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.10);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aa5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
select:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
select option { background: #101018; color: var(--text); }
input[type="file"] { background: #0e0e14; border-color: #26262e; border-radius: 10px; }

/* ---- PRO pill next to the brand ---- */
.pro-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #131108;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  margin-left: 2px;
  align-self: center;
  line-height: 1;
}

/* ---- bot identity previews ---- */
.hidden { display: none !important; }
.id-preview { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.id-preview-avatar {
  width: 72px; height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--card-border);
  background: #0e0e14;
}
.id-preview-banner {
  width: 100%; max-width: 340px;
  aspect-ratio: 680 / 240;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--card-border);
  background: #0e0e14;
}

/* ================================================================
   Batch: docs cards, field groups, profile, PRO-pill alignment
   ================================================================ */

/* align the badge pill perfectly on the line with the heading */
.dash-head h1, .module-card h4, .feature h4, .settings-block > h3, .doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-head h1 .badge, .module-card h4 .badge { transform: translateY(0); }
.head-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex: 0 0 auto;
}

/* how-to-use / docs card */
.doc-card { border-color: var(--card-border); }
.doc-head { font-size: 15px; margin-bottom: 12px; }
.doc-cmds { display: flex; flex-direction: column; gap: 8px; }
.doc-cmd {
  display: grid;
  grid-template-columns: minmax(190px, 320px) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
}
.doc-cmd code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 12.5px;
  color: var(--gold);
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow-x: auto;
}
.doc-cmd span { color: var(--text-dim); font-size: 13px; }
@media (max-width: 640px) { .doc-cmd { grid-template-columns: 1fr; gap: 6px; } }

/* placeholder legend */
.ph-legend {
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}
.ph-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); font-weight: 700; margin-bottom: 12px;
}
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ph-row { display: flex; align-items: baseline; gap: 10px; }
.ph-row code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 12px; color: var(--gold);
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap; flex: 0 0 auto;
}
.ph-row span { color: var(--text-dim); font-size: 12.5px; }

/* grouped settings sub-sections */
.field-group { margin-bottom: 24px; }
.field-group:last-child { margin-bottom: 0; }
.field-group-head {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.field-group-head::after { content: ''; flex: 1; height: 1px; background: var(--hairline-gold); }

/* free-limit note */
.limit-note {
  background: rgba(212,175,55,0.06);
  border: 1px dashed var(--card-border);
  border-radius: 10px; padding: 14px 16px;
  color: var(--text-dim); font-size: 13px;
}

/* profile page */
.prof-avatar {
  width: 74px; height: 74px; border-radius: 20px; flex: 0 0 auto;
  background: var(--gold-grad); color: #131108;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 30px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.prof-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.prof-fact {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border: 1px solid var(--hairline);
  border-radius: 10px; background: rgba(255,255,255,0.015);
}
.prof-fact span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.prof-fact b { font-size: 15px; color: var(--text); }
