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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #0a0a0a;
  --surface: #101010;
  --surface-2: #151515;
  --surface-3: #1b1b1b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f2f2;
  --text-2: #b5b5b5;
  --muted: #828282;
  --faint: #5e5e5e;
  --accent: #3b82f6;
  --accent-hover: #2f75e8;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-border: rgba(59, 130, 246, 0.42);
  --accent-text: #9dc3ff;
  --warn: #eab308;
  --warn-soft: rgba(234, 179, 8, 0.1);
  --warn-border: rgba(234, 179, 8, 0.35);
  --danger: #ef4444;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --blue: var(--accent);
  --blue-hover: var(--accent-hover);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
::selection { background: rgba(59, 130, 246, 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #262626;
  border: 2px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #343434; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font-size: 13.5px;
  outline: none;
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.field::placeholder { color: var(--faint); }
.field:hover { border-color: rgba(255, 255, 255, 0.2); }
.field:focus { border-color: var(--accent); box-shadow: none; }

.field:-webkit-autofill,
.field:-webkit-autofill:hover,
.field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0c0c0c inset;
  box-shadow: 0 0 0 1000px #0c0c0c inset;
  caret-color: var(--text);
  transition: background-color 99999s ease-in-out 0s;
}

.btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-blue:hover:not(:disabled) { background: var(--accent-hover); }
.btn-blue:active:not(:disabled) { transform: scale(0.98); }
.btn-blue:disabled { cursor: not-allowed; opacity: 0.45; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.1s ease;
}
.btn-ghost:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:active { transform: scale(0.98); }

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 30px;
  padding: 0.3rem 0.6rem;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-item + .nav-item { margin-top: 1px; }

.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.16s var(--ease), color 0.16s var(--ease); }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-item:hover svg { opacity: 0.9; }
/* Active state stays a flat tint — no inset bar, no border, so the rail reads thin. */
.nav-item.is-active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
}
.nav-item.is-active svg { color: var(--accent); opacity: 1; }

.section-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0.9rem 0 0.25rem;
  padding: 0 0.6rem;
}
.section-label:first-child { margin-top: 0.15rem; }

.link-blue {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.link-blue:hover { color: #60a5fa; }

.alert {
  border: 1px solid;
  padding: 0.7rem 0.85rem;
  font-size: 13px;
  border-radius: var(--radius);
}

.alert-ok {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: #93c5fd;
}

.alert-err {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--radius);
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  background: var(--bg);
}

.login-card { padding: 1.75rem 1.75rem; }

/* ── Two-column login (centered card style) ── */
.login-split {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
}

.login-split-card {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  width: 880px;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  position: relative;
}

.login-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.75rem;
  background: var(--surface);
  position: relative;
  z-index: 2;
}

.login-form-inner {
  width: 100%;
}

.login-form-inner .field {
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  background: var(--bg);
}

.login-form-inner .btn-blue {
  border-radius: var(--radius);
}

.lf-group {
  margin-top: 1rem;
}

.lf-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.lf-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.lf-input-wrap {
  position: relative;
}

.lf-input-wrap .field {
  padding-right: 2.6rem;
}

.lf-eye-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  color: #7a7a7a;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}

.lf-eye-toggle:hover { color: #cfcfcf; background: rgba(255,255,255,0.05); }
.lf-eye-toggle svg { width: 17px; height: 17px; }

.lf-submit {
  margin-top: 1.35rem;
  padding: 0.7rem 1rem;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.lf-switch {
  margin-top: 1.15rem;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
}

.login-top-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.35rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 12px;
}

.login-top-links .link-blue {
  font-size: 12px;
  font-weight: 600;
  color: #8b8b8b;
}
.login-top-links .link-blue:hover { color: var(--accent); }

/* Deco / right panel */
.login-deco-col {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background: var(--bg);
  min-height: 520px;
}

.login-deco-col .login-deco-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* Soft blend from form panel into the image */
.login-deco-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, #101010 0%, rgba(16, 16, 16, 0.72) 8%, rgba(16, 16, 16, 0.18) 22%, transparent 38%),
    linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.35) 28%, transparent 55%);
}

.login-deco-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1.75rem 1.85rem;
}

.login-deco-glow,
.login-deco-logo { display: none; }

.login-deco-name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,0.75);
}

.login-deco-tagline {
  margin: 0.2rem 0 0;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 900px) {
  .login-split-card { grid-template-columns: 1fr; }
  .login-deco-col { display: none; }
}

@media (max-width: 500px) {
  .login-form-col { padding: 2rem 1.5rem; }
}

.form-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.03em;
}

.form-sub {
  margin: 0.3rem 0 0;
  font-size: 13px;
  color: var(--muted);
}

.field-group { margin-top: 1rem; }
.field-group label {
  display: block;
  font-size: 12.5px;
  color: #b0b0b0;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
  padding: 0 1.5rem;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.topbar-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.topbar-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.topbar-link {
  padding: 0.3rem 0.7rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}

.topbar-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.topbar-link.is-active { color: var(--text); background: rgba(59, 130, 246, 0.1); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.topbar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}
.topbar-avatar-img {
  object-fit: cover;
  padding: 0;
  background: transparent;
  border: none;
}
.topbar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.topbar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.topbar-user-discord {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.topbar-btn-logout {
  padding: 0.32rem 0.75rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.topbar-btn-logout:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--surface-3);
}

/* ── Shell / Sidebar ── */
.shell {
  display: flex;
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg-elevated);
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  align-self: flex-start;
}

.sidebar-nav { flex: 1; padding: 0.7rem 0.55rem; overflow: auto; }
.sidebar-bottom {
  margin-top: auto;
  padding: 0.5rem 0.55rem 0.75rem;
  border-top: none;
}
.sidebar-bottom .nav-item + .nav-item { margin-top: 1px; }
.nav-discord:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav-discord svg { opacity: 1; }

.main {
  flex: 1;
  overflow: auto;
  padding: 2rem 2rem 3rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content {
  width: 100%;
  max-width: 880px;
  animation: contentIn 0.32s var(--ease) both;
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.grid-2 {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1.15fr 0.85fr;
}

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
    position: static;
    height: auto;
    align-self: stretch;
  }
  .topbar-nav { display: none; }
}

/* ── Dashboard components ── */
.db-alert { margin-bottom: 1rem; }

.db-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.75rem;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.db-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.db-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-banner-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.db-banner-sub {
  margin: 0.15rem 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.db-banner-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.9rem;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
  cursor: pointer;
}

.db-banner-discord {
  background: var(--surface);
  border-color: var(--line);
}
.db-banner-discord:hover { background: var(--surface-2); border-color: var(--line-strong); }
.db-banner-discord .db-banner-icon { color: #9aa7ff; background: rgba(88, 101, 242, 0.15); }
.db-banner-discord .db-banner-icon-avatar {
  background: transparent;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}
.db-banner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: none;
}
.db-banner-btn-discord { color: #dfe2ff; background: rgba(88, 101, 242, 0.16); border-color: rgba(88, 101, 242, 0.4); }

.db-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.5rem;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.db-help-row:hover { border-color: var(--line-strong); background: var(--surface-2); }

.db-help-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.db-help-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #e8e8e8;
}

.db-help-sub {
  margin: 0.1rem 0 0;
  font-size: 12px;
  color: var(--muted);
}

.db-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.db-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.db-subs-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.25rem;
}

.db-add-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.db-add-license:hover { background: var(--surface-2); }

.db-add-license-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.db-add-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.db-add-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #e8e8e8;
}

.db-add-sub {
  margin: 0.1rem 0 0;
  font-size: 12px;
  color: var(--muted);
}

.db-add-btn {
  padding: 0.38rem 0.85rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.db-add-btn:hover { background: rgba(59,130,246,0.22); }

.db-sub-card {
  padding: 0.85rem 1.15rem;
  border-top: none;
  border-radius: 0;
  transition: background-color 0.15s ease;
}
.db-sub-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.db-sub-card:hover { background: var(--surface-2); }

.db-sub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.db-sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.db-sub-dot-active {
  background: #22c55e;
}

.db-sub-dot-warn { background: #f59e0b; }
.db-sub-dot-expired { background: #ef4444; }
.db-sub-dot-lifetime { background: var(--accent); }
.db-sub-dot-muted { background: #666; }

.db-sub-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #e8e8e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-sub-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.db-sub-badge-active { color: #4ade80; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); }
.db-sub-badge-warn { color: #fbbf24; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }
.db-sub-badge-expired { color: #f87171; background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); }
.db-sub-badge-lifetime { color: #93c5fd; background: var(--accent-soft); border-color: var(--accent-border); }
.db-sub-badge-muted { color: var(--muted); background: rgba(255,255,255,0.04); border-color: var(--line); }

.db-sub-expiry {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.db-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.db-info-grid .card { transition: border-color 0.15s; }
.db-info-grid .card:hover { border-color: var(--line-strong); }

.db-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.db-copy-btn svg { width: 12px; height: 12px; }
.db-copy-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }
.db-copy-btn.is-ok { color: #4ade80; border-color: rgba(74,222,128,0.4); }

.db-welcome {
  margin-bottom: 1.1rem;
}
.db-welcome-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}
.db-welcome-sub {
  margin: 0.25rem 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .db-info-grid { grid-template-columns: 1fr; }
  .db-banner { flex-direction: column; align-items: stretch; }
  .db-banner-btn { text-align: center; }
}

.welcome {
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}

.welcome h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Ambani-style banners */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.banner-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}
.banner-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.banner-icon svg { width: 17px; height: 17px; }
.banner-text { min-width: 0; }
.banner-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.banner-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 12.5px;
  line-height: 1.45;
  color: #a3a3a3;
}
.banner-action {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
}
.banner-setup {
  background: rgba(59, 130, 246, 0.06);
  border-color: var(--accent-border);
}
.banner-setup .banner-icon {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
}
.banner-setup .banner-action {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}
.banner-setup:hover { background: rgba(59, 130, 246, 0.11); }
.banner-discord {
  background: var(--surface);
  border-color: var(--line);
}
.banner-discord .banner-icon {
  color: #9aa7ff;
  background: rgba(88, 101, 242, 0.15);
}
.banner-discord .banner-action {
  color: #dfe2ff;
  background: rgba(88, 101, 242, 0.16);
  border-color: rgba(88, 101, 242, 0.4);
}
.banner-discord:hover { background: var(--surface-2); border-color: var(--line-strong); }
@media (max-width: 640px) {
  .banner { flex-direction: column; align-items: stretch; }
  .banner-action { text-align: center; }
}

.discord-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.discord-card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.discord-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.discord-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #9aa7ff;
  background: rgba(88, 101, 242, 0.15);
  flex: 0 0 auto;
}
.discord-card-icon svg {
  width: 18px;
  height: 18px;
}
.discord-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.discord-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.discord-card-sub {
  font-size: 12.5px;
  color: #8a8a8a;
}
.discord-card-btn {
  flex: 0 0 auto;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  background: #5865f2;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
}
.discord-card:hover .discord-card-btn {
  background: #6b76f5;
}
@media (max-width: 560px) {
  .discord-card {
    flex-direction: column;
    align-items: stretch;
  }
  .discord-card-btn {
    text-align: center;
  }
}

.text-blue { color: var(--accent); }
.text-muted { color: var(--muted); font-size: 13px; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-15 { margin-bottom: 0.35rem; }
.mt-5 { margin-top: 1.25rem; }
.space-y > * + * { margin-top: 0.75rem; }
.p-5 { padding: 1.15rem 1.2rem; }
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
}
.card-heading {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.account-row:last-child { border-bottom: none; }


.cfg-page { max-width: 900px; }
.cfg-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.cfg-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.cfg-cloud {
  width: 24px;
  height: 24px;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.cfg-cloud svg {
  width: 22px;
  height: 22px;
}
.cfg-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}
.cfg-subtitle {
  margin: 0.35rem 0 0 1.9rem;
  font-size: 13px;
  color: #8a8a8a;
}
.cfg-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #8a8a8a;
  font-size: 13px;
  margin-top: 0.25rem;
  text-decoration: none;
}
.cfg-back svg {
  width: 15px;
  height: 15px;
}
.cfg-back:hover { color: #fff; }
.cfg-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 0.85rem;
}
.cfg-panel {
  width: 100%;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 0.25rem;
  overflow: hidden;
}
.cfg-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 0.85rem;
  min-height: 40px;
}
.cfg-search svg {
  width: 15px;
  height: 15px;
  color: #6b6b6b;
  flex: 0 0 auto;
}
.cfg-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  padding: 0.6rem 0;
}
.cfg-search input::placeholder { color: #666; }
.cfg-sort-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 168px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  min-height: 40px;
  padding-left: 0.75rem;
  z-index: 5;
}
.cfg-sort-wrap.is-open {
  border-color: rgba(255, 255, 255, 0.22);
  z-index: 20;
}
.cfg-sort-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex: 0 0 auto;
  pointer-events: none;
}
.cfg-sort-btn {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: #e8e8e8;
  border-radius: var(--radius);
  padding: 0 0.7rem 0 0.45rem;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}
.cfg-sort-chevron {
  width: 12px;
  height: 12px;
  color: #9a9a9a;
  flex: 0 0 auto;
}
.cfg-sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.3rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
.cfg-sort-option {
  width: 100%;
  border: none;
  background: transparent;
  color: #d8d8d8;
  text-align: left;
  font-size: 12.5px;
  font-weight: 500;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.cfg-sort-option:hover {
  background: var(--surface-3);
  color: #fff;
}
.cfg-sort-option.is-active {
  background: #2563eb;
  color: #fff;
}
.cfg-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 110px 110px 120px;
  gap: 1rem;
  align-items: center;
  min-height: 42px;
  padding: 0 1.15rem;
  margin: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #888;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.cfg-table-head span {
  text-align: left;
}
.cfg-table { margin-top: 0; }
.cfg-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 110px 110px 120px;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.cfg-row:last-child {
  border-bottom: none;
}
.cfg-row:hover {
  background: var(--surface-2);
}
.cfg-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.cfg-icon {
  width: 18px;
  height: 18px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
}
.cfg-icon svg {
  width: 17px;
  height: 17px;
}
.cfg-meta { min-width: 0; }
.cfg-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cfg-by {
  font-size: 12px;
  color: #8a8a8a;
  margin-top: 0.12rem;
}
.cfg-date {
  font-size: 12.5px;
  color: #9a9a9a;
  text-align: left;
}
.cfg-action {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.copy-token,
.cfg-delete {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}
.copy-token {
  color: var(--accent);
}
.copy-token svg,
.cfg-delete svg {
  width: 13px;
  height: 13px;
}
.copy-token:hover { color: var(--accent-text); }
.cfg-delete { color: #f87171; }
.cfg-delete:hover { color: #fca5a5; }
.cfg-row-admin .cfg-action { min-width: 0; }
.cfg-empty {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.cfg-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding: 0;
}
.cfg-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 260px;
  max-width: 340px;
  padding: 0.9rem 1rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  overflow: visible;
}
.cfg-toast.hidden { display: none; }
.cfg-toast-close {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #22c55e;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.cfg-toast-icon {
  width: 22px;
  height: 22px;
  color: #fff;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}
.cfg-toast-icon svg {
  width: 22px;
  height: 22px;
}
.cfg-toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.cfg-toast-desc {
  margin-top: 0.15rem;
  font-size: 12px;
  color: #cfcfcf;
}
.cfg-page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.cfg-page-btn:hover { background: var(--surface-3); color: var(--text); }
.cfg-page-label {
  min-width: 60px;
  text-align: center;
  font-size: 12.5px;
  color: #cfcfcf;
  font-weight: 600;
}
@media (max-width: 820px) {
  .cfg-toolbar { flex-direction: column; }
  .cfg-subtitle { margin-left: 0; }
  .cfg-table-head,
  .cfg-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .cfg-table-head span:nth-child(2),
  .cfg-table-head span:nth-child(3),
  .cfg-table-head span:nth-child(4) { display: none; }
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  word-break: break-all;
}

.hidden { display: none !important; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 13px;
  padding: 0.35rem 0;
}

.updates-section {
  margin-top: 1.35rem;
}
.updates-head {
  margin-bottom: 0.75rem;
}
.updates-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.updates-sub {
  margin: 0.25rem 0 0;
  font-size: 13px;
}
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.update-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.95rem 1.1rem;
}
.update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.update-product {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.update-date {
  font-size: 12px;
  color: #8a8a8a;
  flex: 0 0 auto;
}
.update-heading {
  margin: 0 0 0.45rem;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.update-items {
  margin: 0;
  padding: 0 0 0 1.05rem;
  color: #b5b5b5;
  font-size: 13px;
  line-height: 1.5;
}
.update-items li + li {
  margin-top: 0.28rem;
}

.config-table-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 100px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.6rem 1rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.config-empty {
  padding: 3rem 1rem;
  text-align: center;
}

/* Setup Instructions */
.setup-page { max-width: 960px; }
.setup-destruct { margin-top: 1.25rem; }
.setup-destruct .setup-alert { margin-bottom: 1rem; }
.setup-tutorial { margin: 0; }
.setup-tutorial-title {
  margin: 0 0 0.85rem;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}
.setup-tutorial-frame {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.setup-tutorial-video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}
.setup-hero { margin-bottom: 1.25rem; }
.setup-kicker {
  margin: 0 0 0.35rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.setup-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}
.setup-hero .text-muted { font-size: 14px; }
.setup-alert {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 0.85rem;
}
.setup-alert-ok {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}
.setup-alert-warn {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.08);
}
.setup-alert-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.setup-alert-icon svg { width: 15px; height: 15px; }
.setup-alert-ok .setup-alert-icon { color: #60a5fa; background: rgba(59, 130, 246, 0.15); }
.setup-alert-warn .setup-alert-icon { color: #eab308; background: rgba(234, 179, 8, 0.12); }
.setup-alert-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.setup-alert-text {
  margin-top: 0.25rem;
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.5;
}
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}
.setup-step {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.setup-step summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  min-height: 0;
  cursor: pointer;
  user-select: none;
}
.setup-step summary::-webkit-details-marker { display: none; }
.setup-step summary:hover { background: var(--surface-2); }
.setup-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  flex: 0 0 auto;
}
.setup-step-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.35;
}
.setup-step-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.setup-step-desc {
  font-size: 13px;
  color: #8a8a8a;
}
.setup-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #777;
  border-bottom: 1.5px solid #777;
  transform: rotate(45deg);
  margin-right: 0.25rem;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.setup-step[open] .setup-chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}
.setup-step[open] summary {
  border-bottom: 1px solid var(--line);
}
.setup-step-body {
  padding: 1.1rem 1.1rem 1.15rem 3.85rem;
  color: #b5b5b5;
  font-size: 13.5px;
  line-height: 1.55;
}
.setup-step-body p { margin: 0 0 0.65rem; }
.setup-step-body p:last-child { margin-bottom: 0; }
.setup-note {
  color: #f0c674 !important;
  font-weight: 600;
  font-size: 13px !important;
}
.setup-dl {
  width: auto;
  min-width: 160px;
  margin-top: 0.55rem;
  display: inline-flex;
  padding: 0.65rem 1rem;
  font-size: 13px;
}

/* —— Download page —— */
.dl-page { max-width: 1040px; }
.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.dl-main-card {
  padding: 1.35rem 1.4rem 1.3rem;
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}
.dl-main-card:hover { border-color: var(--line-strong); }
.dl-main-top {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}
.dl-main-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}
.dl-main-icon svg { width: 22px; height: 22px; }
.dl-main-eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 600;
}
.dl-main-title {
  margin: 0.2rem 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dl-main-sub {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.dl-meta {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}
.dl-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dl-meta li:last-child { border-bottom: 0; }
.dl-meta span { color: var(--muted); }
.dl-meta strong { font-weight: 600; }
.dl-meta-ok { color: #4ade80; }
.dl-cta {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  margin-top: 0;
  font-size: 14px;
  font-weight: 700;
}
.dl-footnote {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.dl-side {
  display: grid;
  gap: 1rem;
}
.dl-side-card { padding: 1.1rem 1.15rem 1.15rem; transition: border-color 0.15s ease; }
.dl-side-card:hover { border-color: var(--line-strong); }
.dl-side-title {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 700;
}
.dl-checklist,
.dl-tips {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: grid;
  gap: 0.45rem;
}
.dl-checklist li::marker { color: #60a5fa; }
.dl-tips { list-style: disc; }
.dl-tips li::marker { color: #666; }
.dl-side-link {
  display: inline-flex;
  margin-top: 0.95rem;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .dl-grid { grid-template-columns: 1fr; }
}

/* —— License modal —— */
body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.72);
}

.modal-overlay.hidden { display: none; }

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { color: var(--text); background: var(--surface-3); }

.modal-title {
  margin: 0 1.75rem 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.modal-sub {
  margin: 0.35rem 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #8f8f8f;
  font-weight: 400;
}

.modal-form { margin-top: 1.15rem; }

.modal-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #d4d4d4;
}

.modal-field {
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  font-family: 'IBM Plex Mono', monospace;
}

.modal-hint {
  margin: 0.7rem 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #8a8a8a;
}

.modal-hint a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.modal-hint a:hover { color: #bfdbfe; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.15rem;
}

.btn-modal {
  width: auto;
  min-width: 0;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
}

.btn-modal svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Public site / shop ── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,8,0.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  object-fit: contain;
}
.site-nav-links { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.site-nav-links a {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 600;
}
.site-nav-links a:hover,
.site-nav-links a.is-active { color: #fff; background: var(--accent-soft); }
.site-footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  color: #666;
  font-size: 12.5px;
}
.site-footer a { color: #8b8b8b; }
.site-footer a:hover { color: var(--accent); }

.landing { max-width: 980px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.landing-hero { text-align: center; padding: 4rem 0 3rem; }
.landing-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.landing-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.landing-hero h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.035em;
  font-weight: 700;
}
.landing-sub {
  margin: 0.9rem auto 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}
.landing-cta {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.landing-section { margin-top: 2.5rem; }
.landing-section h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.landing-features h3 { margin: 0 0 0.4rem; font-size: 15px; }
@media (max-width: 800px) {
  .landing-features { grid-template-columns: 1fr; }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.shop-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.shop-card h3 { margin: 0; font-size: 16px; }
.shop-price {
  margin: 0.5rem 0 0.85rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.shop-card .btn-blue { margin-top: auto; }

.order-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13.5px;
}

/* ── Admin ── */
.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.admin-side {
  border-right: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 0.85rem 0.55rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.6rem 0.7rem;
  margin-bottom: 0.2rem;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.admin-brand img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.admin-side .section-label { margin-top: 0.85rem; }
.admin-side .nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.admin-side-foot {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.admin-main { padding: 1.5rem 1.5rem 3rem; }
.admin-title {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-users-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.admin-users-search .field {
  width: 240px;
  max-width: 100%;
  padding: 0.45rem 0.7rem;
}
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.admin-user-name { font-weight: 600; }
.admin-dc-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-dc-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.admin-user-actions form { margin: 0; }
.admin-act-btn {
  padding: 0.28rem 0.55rem !important;
  font-size: 11.5px !important;
  white-space: nowrap;
}
.admin-act-danger {
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
.admin-act-danger:hover {
  color: #fecaca !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
}
.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.admin-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 12.5px;
  font-weight: 600;
  color: #a8a8a8;
}
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.check-row { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th {
  color: #777;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.link-danger {
  background: none;
  border: none;
  padding: 0;
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.link-danger:hover { color: #fecaca; }
.admin-filters { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-filters .btn-ghost {
  padding: 0.32rem 0.7rem;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}
.admin-filters .btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}
.admin-filters .is-active-filter,
.btn-ghost.is-active-filter {
  border-color: var(--accent-border);
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
}
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: #ccc;
}
.badge-awaiting_payment {
  color: #fde68a;
  border-color: var(--warn-border);
  background: var(--warn-soft);
}
.badge-delivered {
  color: #86efac;
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.1);
}
.badge-cancelled {
  color: #fca5a5;
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.1);
}
.badge-paid {
  color: #93c5fd;
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
  }
  .admin-side-foot {
    width: 100%;
    border-top: none;
    padding-top: 0.35rem;
  }
  .admin-stats, .admin-grid-2, .admin-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .admin-stats, .admin-grid-2, .admin-detail-grid, .admin-form-row { grid-template-columns: 1fr; }
}

/* Settings */
.settings-page { max-width: 860px; }
.settings-hero { margin-bottom: 1.15rem; }
.settings-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.settings-discord-linked {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.settings-discord-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  background: transparent;
  flex-shrink: 0;
  display: block;
}
.settings-discord-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.settings-unlink-btn {
  width: auto;
  min-width: 140px;
  padding: 0.5rem 1rem;
}
@media (max-width: 720px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* Referrals */
.rf-page { max-width: 1040px; }

.rf-heading {
  margin: 1.5rem 0 0.8rem;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
}

.rf-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.rf-invite { padding: 1.2rem 1.25rem 1.25rem; }
.rf-invite-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.rf-invite-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}
.rf-invite-icon svg { width: 19px; height: 19px; }
.rf-invite-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.rf-invite-sub {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.rf-field + .rf-field { margin-top: 0.65rem; }
.rf-field-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}

.rf-score {
  padding: 1.2rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.rf-score-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.rf-score-num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.rf-score-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.rf-score-next {
  margin: 0.7rem 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.rf-score-next strong { color: var(--text); font-weight: 600; }
.rf-score-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.rf-score-foot strong { color: var(--text); font-weight: 600; }

.rf-copy-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.45rem 0.45rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s var(--ease);
}
.rf-copy-row:hover { border-color: var(--line-strong); }
.rf-copy-value {
  flex: 1;
  min-width: 0;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-copy-value.rf-code {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #fff;
}
.rf-copy-btn {
  flex: none;
  width: auto;
  padding: 0.34rem 0.8rem;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.rf-copy-btn.is-ok {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.4);
}

.rf-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.rf-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

/* Reward track: one horizontal path with a node per milestone. */
.rf-track-card { padding: 1.5rem 1.1rem 1.35rem; }
.rf-track { position: relative; }
.rf-track-rail {
  position: absolute;
  top: 21px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.rf-track-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}
.rf-track-nodes {
  position: relative;
  display: grid;
  gap: 0.5rem;
}
.rf-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 0 0.4rem;
}
.rf-node-dot {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 0.35rem;
  color: var(--faint);
  /* Opaque so the rail cannot show through the node. */
  background: linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)), var(--surface);
  border: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.rf-node-dot svg { width: 18px; height: 18px; }
.rf-node.is-ready .rf-node-dot {
  color: #93c5fd;
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface);
  border-color: var(--accent);
}
.rf-node.is-claimed .rf-node-dot {
  color: #4ade80;
  background: linear-gradient(rgba(74, 222, 128, 0.12), rgba(74, 222, 128, 0.12)), var(--surface);
  border-color: rgba(74, 222, 128, 0.5);
}
.rf-node-req {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}
.rf-node-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.3;
}
.rf-node.is-ready .rf-node-name,
.rf-node.is-claimed .rf-node-name { color: var(--text); }
.rf-node-state {
  margin-top: 0.2rem;
  font-size: 11.5px;
  color: var(--faint);
}
.rf-node-state.is-done { color: #4ade80; font-weight: 600; }
.rf-node-claim {
  width: auto;
  margin-top: 0.35rem;
  padding: 0.3rem 0.9rem;
  font-size: 12px;
  min-height: 28px;
}

.rf-keys-card { padding: 1.1rem 1.15rem 1.15rem; }
.rf-key-group + .rf-key-group {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.rf-key-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.rf-key-group-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.rf-key-group-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}
.rf-key-row + .rf-key-row { margin-top: 0.4rem; }
.rf-key-note {
  margin: 0.85rem 0 0;
  font-size: 11.5px;
  color: var(--faint);
}

.rf-bottom { margin-top: 1.5rem; }
.rf-list-card { padding: 1.1rem 1.15rem 1.15rem; }

.rf-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.rf-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  font-size: 13px;
}
.rf-list-row + .rf-list-row { border-top: 1px solid var(--line); }
.rf-list-user { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-list-order {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rf-list-date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.rf-empty {
  margin: 0;
  padding: 1.15rem 0.9rem;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .rf-top { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* The horizontal track has no room left — fall back to stacked rows. */
  .rf-track-rail { display: none; }
  .rf-track-nodes { grid-template-columns: 1fr !important; gap: 0; }
  .rf-node {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.15rem 0.85rem;
    text-align: left;
    padding: 0.8rem 0;
  }
  .rf-node + .rf-node { border-top: 1px solid var(--line); }
  .rf-node-dot {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    margin-bottom: 0;
  }
  .rf-node-req { grid-column: 2; }
  .rf-node-name { grid-column: 2; }
  .rf-node-state,
  .rf-node form {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
  .rf-node-claim { margin-top: 0; }
}
@media (max-width: 560px) {
  .rf-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rf-list-order { display: none; }
}

