:root {
  --bg: #fbfbff;
  --surface: #ffffff;
  --surface-soft: #eef1f7;
  --sidebar-a: #0f172a;
  --sidebar-b: #020617;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --cyan: #06b6d4;
  --green: #22c55e;
  --red: #ef4444;
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-wide: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #06b6d4 100%);
  --shadow: 0 16px 42px rgba(15, 23, 42, .08);
  --soft-purple: #f5ecff;
  --soft-purple-2: #faf5ff;
}

body.dark-theme {
  --bg: #071126;
  --surface: #0f1b33;
  --surface-soft: #16243f;
  --text: #edf4ff;
  --muted: #9fb0c8;
  --border: #263958;
  --card: #0f1b33;
  --accent: #4b8cff;
  --accent2: #64b5ff;
  --soft-purple: #132b56;
  --soft-purple-2: #0c1830;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% -8%, rgba(139, 92, 246, .11), transparent 25rem),
    radial-gradient(circle at 40% 0%, rgba(99, 102, 241, .07), transparent 29rem),
    var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.dark-theme {
  background:
    radial-gradient(circle at 90% -8%, rgba(75, 140, 255, .18), transparent 25rem),
    radial-gradient(circle at 35% 0%, rgba(100, 181, 255, .10), transparent 29rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  background: var(--surface-soft);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-layout {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  padding: 20px 8px 16px;
  color: #5b5b84;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 50;
  box-shadow: 16px 0 42px rgba(30, 41, 59, .07);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 18px;
  border-bottom: 1px solid #edf0f7;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6 0%, #c026d3 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(139, 92, 246, .26);
}

body.dark-theme .brand-mark {
  background: linear-gradient(135deg, #1e6bff 0%, #64b5ff 100%);
}

.brand-mark svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.sidebar-brand h1,
.sidebar-brand p,
.admin-topbar h2,
.top-eyebrow,
h3,
.section-label,
.stat-card p,
.stat-card small,
.notice {
  margin: 0;
}

.sidebar-brand h1 {
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: #8b5cf6;
  font-weight: 800;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-group {
  margin: 17px 12px 7px;
  color: #a1a0c1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5a5883;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: #7c3aed;
  background: #f4e8ff;
}

.sidebar-link.active {
  background: linear-gradient(135deg, #efe1ff 0%, #faedff 100%);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .07), 0 8px 22px rgba(139, 92, 246, .08);
}

.menu-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-text svg {
  width: 17px;
  height: 17px;
  color: #9996bd;
  stroke-width: 2;
  flex: 0 0 auto;
}

.sidebar-link.active .menu-text svg,
.sidebar-link:hover .menu-text svg {
  color: #8b5cf6;
}

.sidebar-link b {
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 20px;
  padding: 2px 7px 3px;
  border-radius: 999px;
  background: #e73563;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 7px 16px rgba(231, 53, 99, .22);
}

.sidebar-link.active b {
  background: #e73563;
  color: #fff;
}

.sidebar-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid #edf0f7;
  border-radius: 12px;
  background: #faf7ff;
  color: #7c739f;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.sidebar-footer svg {
  width: 16px;
  height: 16px;
  color: #8b5cf6;
}

.admin-main {
  margin-left: 220px;
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.top-eyebrow,
.section-label {
  color: #9b8dbd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.admin-topbar h2 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1;
  color: #211d3a;
  font-weight: 800;
}

.top-actions,
.panel-head,
.inline-form,
.button-row,
.panel-actions,
.batch-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--soft-purple);
  color: #8b5cf6;
  font-size: 12px;
  font-weight: 800;
}

.top-actions button svg {
  width: 15px;
  height: 15px;
}

.panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-actions button,
.export-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dfe3ee;
  border-radius: 9px;
  background: var(--surface);
  color: #5a5883;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.panel-actions svg,
.export-button svg {
  width: 15px;
  height: 15px;
}

.admin-content {
  padding: 26px;
}

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  margin: 0 24px;
  padding: 0 2px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-footer span:first-child {
  color: #4f46e5;
  font-weight: 900;
}

.admin-page {
  display: none;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.overview-grid > div {
  padding: 16px;
  border: 1px solid #eee7fb;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fbf7ff);
}

.overview-label {
  display: block;
  margin-bottom: 6px;
  color: #9b8dbd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.overview-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.domain-ratio-list {
  display: grid;
  gap: 10px;
}

.domain-ratio-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee7fb;
  border-radius: 8px;
  background: var(--surface-soft);
}

.domain-ratio-row strong,
.domain-ratio-row span {
  display: block;
  overflow-wrap: anywhere;
}

.domain-ratio-row strong {
  color: var(--text);
  font-size: 13px;
}

.domain-ratio-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.domain-ratio-row em {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.domain-ratio-row em.good {
  color: #15803d;
  background: rgba(34, 197, 94, .14);
}

.domain-ratio-row em.warm {
  color: #b45309;
  background: rgba(245, 158, 11, .16);
}

.domain-ratio-row em.bad {
  color: #b91c1c;
  background: rgba(239, 68, 68, .14);
}

.domain-ratio-row b {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.domain-ratio-row i {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--green) var(--rate), transparent 0),
    rgba(100, 116, 139, .18);
}

.account-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.account-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stat-card,
.panel {
  background: var(--card);
  border: 1px solid #ddd2ff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.stat-card {
  position: relative;
  min-height: 142px;
  padding: 18px;
  overflow: hidden;
  display: block;
}

.stat-card::before {
  display: none;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #eee7ff;
  color: #7c3aed;
  box-shadow: none;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.15;
}

.stat-card p {
  color: #9994bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  line-height: 1;
  color: #060733;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: #00935f;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 22px;
  align-items: start;
}

.single-end {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  line-height: 1.2;
  color: #211d3a;
  font-weight: 800;
}

h3 svg {
  width: 19px;
  height: 19px;
  color: #8b5cf6;
  stroke-width: 2.2;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: #f5ecff;
  color: #7c3aed;
  border: 1px solid #ead8ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.register-form {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.span-2 {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #7b7598;
  font-size: 12px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.field-hint.warning {
  color: #b45309;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  background: #eef1f7;
  color: #241d3d;
}

.check-line input {
  width: 16px;
  min-height: 16px;
  accent-color: #8b5cf6;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-line {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #241d3d;
}

.radio-line input {
  width: 16px;
  min-height: 16px;
  accent-color: #8b5cf6;
}

.payment-fields,
.otp-form {
  display: grid;
  gap: 10px;
}

.payment-fields {
  grid-template-columns: 1fr 1fr;
}

.session-checkout-panel {
  margin-top: 16px;
}

.session-token-input {
  min-height: 112px;
  font-family: "Cascadia Mono", Consolas, monospace;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .02);
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px #7c3aed;
  background: var(--surface-soft);
}

.secret-field {
  position: relative;
  display: block;
}

.secret-field input {
  padding-right: 46px;
}

.secret-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #6b6389;
  background: transparent;
  box-shadow: none;
}

.secret-toggle:hover {
  color: #241d3d;
  background: rgba(124, 58, 237, .08);
  transform: translateY(-50%);
}

.secret-toggle i {
  width: 17px;
  height: 17px;
}

.plain-result {
  min-height: 140px;
  margin-bottom: 14px;
  resize: vertical;
  color: #5f6473;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.plain-result.compact {
  min-height: 96px;
  margin-bottom: 0;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.subdomain-report-actions {
  margin-top: 10px;
}

.subdomain-list-actions {
  margin: 10px 0;
}

.batch-result-head {
  justify-content: space-between;
  margin: 14px 0 10px;
}

.batch-result {
  min-height: 116px;
}

.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  box-shadow: 0 14px 28px rgba(139, 92, 246, .22);
}

.danger {
  border-color: #ffd6df;
  background: #fff5f7;
  color: #d92d5b;
}

.logs {
  height: 360px;
  overflow: auto;
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #5f6473;
  padding: 14px;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.task-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.task-summary > div,
.task-message {
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  background: var(--surface-soft);
}

.task-summary > div {
  padding: 11px 12px;
  min-width: 0;
}

.task-summary span {
  display: block;
  margin-bottom: 4px;
  color: #9b8dbd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.task-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: #241d3d;
}

.task-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 12px;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 800;
}

.logs:empty::before {
  content: "> Waiting for task...";
  color: #6b7280;
}

.otp-form {
  grid-template-columns: 1fr auto;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #ead8ff;
  border-radius: 8px;
  background: #faf5ff;
}

.log-line {
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .28);
  overflow-wrap: anywhere;
}

.log-line.success {
  color: #15803d;
  font-weight: 800;
}

.log-line.error {
  color: #dc2626;
  font-weight: 800;
}

.log-line.info {
  color: #4f46e5;
}

.log-line::before {
  content: "";
}

.inline-form,
.button-row {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.inline-form input {
  flex: 1;
  min-width: 220px;
}

.chip-list,
.table-list,
.account-list {
  display: grid;
  gap: 9px;
}

.chip,
.row,
.account-list code {
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  background: var(--surface-soft);
}

.chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.chip span,
.row span,
.account-list code {
  overflow-wrap: anywhere;
}

.chip span {
  color: #4b456b;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}

.subdomain-chip label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.subdomain-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.chip button,
.row button {
  min-height: 32px;
  color: #d92d5b;
  border-color: #ffd6df;
  background: #fff;
}

.notice {
  min-height: 20px;
  margin-bottom: 10px;
  color: #8b5cf6;
  font-size: 13px;
  font-weight: 900;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: #7b7598;
  font-size: 13px;
}

.row strong {
  color: #241d3d;
}

.account-list code {
  display: block;
  padding: 10px 12px;
  color: #4b456b;
  font-size: 12px;
}

.member-form {
  display: grid;
  grid-template-columns: 1fr 110px auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.settings-panel {
  max-width: 820px;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dfe3ee;
  border-radius: 10px;
  background: var(--surface-soft);
}

.setting-row span {
  display: grid;
  gap: 4px;
}

.setting-row strong {
  color: #241d3d;
  font-size: 14px;
  font-weight: 900;
}

.setting-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.setting-row input {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  appearance: none;
  cursor: pointer;
  transition: background .18s ease;
}

.setting-row input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
  transition: transform .18s ease;
}

.setting-row input:checked {
  background: #1e6bff;
}

.setting-row input:checked::before {
  transform: translateX(20px);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

.toast svg {
  width: 17px;
  height: 17px;
  color: #1e6bff;
}

.toast.error svg {
  color: var(--red);
}

.toast button {
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-radius: 8px;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .46);
  backdrop-filter: blur(7px);
}

.confirm-dialog {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(2, 6, 23, .24);
}

.confirm-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff5f7;
  color: var(--red);
}

.confirm-dialog p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.account-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe3ee;
  border-radius: 10px;
  background: var(--surface);
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 13px;
}

.account-table th,
.account-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.account-table th {
  color: #9b8dbd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-table td {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-table tr:last-child td {
  border-bottom: 0;
}

.account-table .row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.account-table button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.empty-table {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

body.dark-theme .admin-sidebar,
body.dark-theme .admin-topbar,
body.dark-theme .panel,
body.dark-theme .stat-card,
body.dark-theme .overview-grid > div,
body.dark-theme .sidebar-footer,
body.dark-theme .domain-ratio-row,
body.dark-theme .payment-fields,
body.dark-theme .otp-form,
body.dark-theme .check-line {
  border-color: var(--border);
  background: var(--surface);
}

body.dark-theme .sidebar-brand h1,
body.dark-theme .admin-footer span:first-child,
body.dark-theme h3,
body.dark-theme .admin-topbar h2,
body.dark-theme .stat-card strong,
body.dark-theme .task-summary strong,
body.dark-theme .row strong,
body.dark-theme .setting-row strong,
body.dark-theme .check-line {
  color: var(--text);
}

body.dark-theme label {
  color: var(--muted);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
  color: #7f91ad;
}

body.dark-theme .field-hint.warning {
  color: #fbbf24;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 1px var(--accent2);
}

body.dark-theme .sidebar-link:hover,
body.dark-theme .sidebar-link.active {
  color: #64b5ff;
  background: #132b56;
}

body.dark-theme .admin-chip,
body.dark-theme .status-pill {
  color: #9dccff;
  border-color: #24487a;
}

body.dark-theme .primary {
  background: linear-gradient(135deg, #1e6bff, #64b5ff);
}

@media (max-width: 980px) {
  .admin-sidebar {
    position: static;
    width: auto;
    min-height: auto;
    border-radius: 0 0 22px 22px;
  }

  .sidebar-footer {
    position: static;
    margin-top: 20px;
  }

  .admin-main {
    margin-left: 0;
  }

  .stats-grid,
  .dashboard-grid,
  .overview-grid,
  .task-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-topbar,
  .top-actions {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding: 14px 16px;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    margin: 0 16px;
    padding: 14px 0;
  }

  .register-form,
  .member-form,
  .payment-fields,
  .otp-form {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

.jwt-input-wrap textarea {
  width: 100%;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  resize: vertical;
}

/* Session Checkout Card & 15-Minute Expiry Styles */
.session-checkout-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.checkout-card {
  background: var(--card, #ffffff);
  border: 1px solid #ddd2ff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.checkout-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.checkout-card.is-expired {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(254, 242, 242, 0.6);
}

body.dark-theme .checkout-card.is-expired {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}

.checkout-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.checkout-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-plan {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

body.dark-theme .tag-plan {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.tag-index {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.checkout-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-checkout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.badge-checkout.badge-countdown {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

body.dark-theme .badge-checkout.badge-countdown {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-checkout.badge-expired {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.5);
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

body.dark-theme .badge-checkout.badge-expired {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.checkout-link-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

body.dark-theme .checkout-link-container {
  background: rgba(0, 0, 0, 0.25);
  border-color: #2b334a;
}

.checkout-link-url {
  flex: 1;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.checkout-link-url:hover {
  text-decoration: underline;
}

/* Link Font Merah saat Expired */
.checkout-link-url.link-expired {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

body.dark-theme .checkout-link-url.link-expired {
  color: #f87171 !important;
}

.btn-mini-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--card, #ffffff);
  color: var(--text, #1e293b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-mini-copy:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

body.dark-theme .btn-mini-copy {
  background: #1e2638;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-theme .btn-mini-copy:hover {
  background: #28334a;
}

/* Catatan Nama (Penerima Link) Group */
.checkout-note-group {
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.dark-theme .checkout-note-group {
  border-top-color: #334155;
}

.checkout-note-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  display: flex;
  align-items: center;
  gap: 5px;
}

.checkout-note-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-note-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--card, #ffffff);
  color: var(--text, #1e293b);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-note-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.dark-theme .checkout-note-input {
  background: #151c2c;
  border-color: #2e3852;
  color: #f1f5f9;
}

body.dark-theme .checkout-note-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.btn-copy-formatted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #7c3aed;
  background: #7c3aed;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-copy-formatted:hover {
  background: #6d28d9;
}

.btn-check-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-check-go:hover {
  background: var(--accent);
  color: #fff;
}

.btn-copy-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
  transition: all 0.2s ease;
}

.btn-copy-go:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

.outlook-plan-check-panel {
  animation: fadeIn 0.2s ease-in-out;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}



