/* ==========================================================================
   LitDigi Admin Hub, Maintenance Lock Screen, & 3D Holographic Redeem Vault
   Craft Floor: Light & Dark WCAG AA, single elevation, zero gradient text
   ========================================================================== */

:root {
  --ld-ah-bg: #f8fafc;
  --ld-ah-surface: #ffffff;
  --ld-ah-surface-2: #f1f5f9;
  --ld-ah-border: #cbd5e1;
  --ld-ah-ink: #0f172a;
  --ld-ah-muted: #475569;
  --ld-ah-accent: #0369a1;
  --ld-ah-accent-strong: #075985;
  --ld-ah-accent-soft: #e0f2fe;
  --ld-ah-accent-ink: #0c4a6e;
  --ld-ah-gold: #b45309;
  --ld-ah-gold-soft: #fef3c7;
  --ld-ah-success: #047857;
  --ld-ah-success-soft: #d1fae5;
  --ld-ah-danger: #b91c1c;
  --ld-ah-danger-soft: #fee2e2;
  --ld-ah-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

body.dark-mode,
[data-theme="dark"],
[data-theme="amoled"] {
  --ld-ah-bg: #0b1120;
  --ld-ah-surface: #111827;
  --ld-ah-surface-2: #1e293b;
  --ld-ah-border: #334155;
  --ld-ah-ink: #f8fafc;
  --ld-ah-muted: #94a3b8;
  --ld-ah-accent: #0284c7;
  --ld-ah-accent-strong: #0ea5e9;
  --ld-ah-accent-soft: #0c2b47;
  --ld-ah-accent-ink: #bae6fd;
  --ld-ah-gold: #f59e0b;
  --ld-ah-gold-soft: #2a1e07;
  --ld-ah-success: #10b981;
  --ld-ah-success-soft: #062c22;
  --ld-ah-danger: #f87171;
  --ld-ah-danger-soft: #3a1216;
  --ld-ah-shadow: 0 18px 44px rgba(2, 6, 23, 0.65);
}

/* ---------- 1. Branded Maintenance Lock Screen ---------- */
#maintenanceOverlay.ld-maint-shell {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--ld-ah-bg);
  color: var(--ld-ah-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.ld-maint-card {
  width: 100%;
  max-width: 520px;
  background: var(--ld-ah-surface);
  border-radius: 16px;
  box-shadow: var(--ld-ah-shadow);
  padding: 28px 26px;
  text-align: center;
}

.ld-maint-emblem {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--ld-ah-accent-soft);
  color: var(--ld-ah-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-maint-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ld-ah-gold-soft);
  color: var(--ld-ah-gold);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.ld-maint-title {
  margin: 0 0 10px;
  font-size: 1.48rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ld-ah-ink);
}

.ld-maint-msg {
  margin: 0 auto 16px;
  max-width: 44ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ld-ah-muted);
}

.ld-maint-eta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--ld-ah-surface-2);
  color: var(--ld-ah-ink);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.ld-maint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ld-maint-admin-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: var(--ld-ah-surface-2);
  text-align: left;
}

.ld-maint-admin-box h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ld-ah-ink);
}

.ld-maint-field {
  margin-bottom: 10px;
}

.ld-maint-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ld-ah-muted);
  margin-bottom: 4px;
}

.ld-maint-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--ld-ah-border);
  background: var(--ld-ah-surface);
  color: var(--ld-ah-ink);
  font-size: 0.9rem;
}

/* ---------- 2. Shared Buttons & Controls ---------- */
.ld-ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--ld-ah-border);
  background: var(--ld-ah-surface);
  color: var(--ld-ah-ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.ld-ah-btn:hover {
  background: var(--ld-ah-surface-2);
}

.ld-ah-btn:active {
  transform: scale(0.98);
}

.ld-ah-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ld-ah-btn.is-primary {
  background: var(--ld-ah-accent);
  border-color: var(--ld-ah-accent);
  color: #ffffff;
}

.ld-ah-btn.is-primary:hover {
  background: var(--ld-ah-accent-strong);
}

.ld-ah-btn.is-danger {
  color: var(--ld-ah-danger);
}

/* ---------- 3. Unified Admin Hub Sections ---------- */
.ld-ah-section {
  background: var(--ld-ah-surface);
  border: 1px solid var(--ld-ah-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
  color: var(--ld-ah-ink);
}

.ld-ah-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ld-ah-section-head h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ld-ah-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ld-ah-section-desc {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--ld-ah-muted);
  line-height: 1.5;
}

.ld-ah-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--ld-ah-surface-2);
  color: var(--ld-ah-ink);
}

.ld-ah-pill.is-live {
  background: var(--ld-ah-success-soft);
  color: var(--ld-ah-success);
}

.ld-ah-pill.is-warn {
  background: var(--ld-ah-gold-soft);
  color: var(--ld-ah-gold);
}

.ld-ah-pill.is-danger {
  background: var(--ld-ah-danger-soft);
  color: var(--ld-ah-danger);
}

.ld-ah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.ld-ah-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ld-ah-muted);
  margin-bottom: 5px;
}

.ld-ah-input,
.ld-ah-select,
.ld-ah-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--ld-ah-border);
  background: var(--ld-ah-bg);
  color: var(--ld-ah-ink);
  font-size: 0.85rem;
  font-family: inherit;
}

.ld-ah-textarea {
  min-height: 76px;
  resize: vertical;
}

.ld-ah-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ld-ah-surface-2);
  margin-bottom: 14px;
}

.ld-ah-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ld-ah-subtab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--ld-ah-border);
  background: var(--ld-ah-surface);
  color: var(--ld-ah-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.ld-ah-subtab.is-active {
  background: var(--ld-ah-accent);
  border-color: var(--ld-ah-accent);
  color: #ffffff;
}

.ld-ah-release-row {
  border: 1px solid var(--ld-ah-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--ld-ah-bg);
}

.ld-ah-item-row {
  display: grid;
  grid-template-columns: 120px 1fr 145px auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border-radius: 10px;
  background: var(--ld-ah-surface-2);
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .ld-ah-item-row {
    grid-template-columns: 1fr;
  }
}

.ld-ah-route-card {
  padding: 12px;
  border-radius: 12px;
  background: var(--ld-ah-surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-ah-preview-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ld-ah-surface-2);
  margin-top: 6px;
}

.ld-ah-preview-strip img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #0f172a;
}

.ld-ah-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ld-ah-surface-2);
  margin-bottom: 10px;
}

.ld-ah-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- 4. 3D Holographic Redeem Vault Modal ---------- */
#redeemModal,
#patchNoteModal {
  z-index: 10050 !important;
}

#redeemModal .modal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  max-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  width: 100%;
}

#redeemModal .redeem-card.ld-rv-card {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--ld-ah-surface);
  color: var(--ld-ah-ink);
  border-radius: 16px;
  box-shadow: var(--ld-ah-shadow);
  padding: 16px 20px 20px;
  position: relative;
  margin: auto;
  box-sizing: border-box;
}

.ld-rv-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.ld-rv-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--ld-ah-border);
  background: var(--ld-ah-surface-2);
  color: var(--ld-ah-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
}

.ld-rv-close-btn:hover {
  background: var(--ld-ah-danger-soft);
  color: var(--ld-ah-danger);
}

#redeemModal .ld-rv-card .redeem-border-anim {
  display: none;
}

.ld-rv-stage {
  perspective: 1100px;
  margin-bottom: 12px;
}

.ld-rv-holo-panel {
  position: relative;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, #1e3a8a 0%, #0f172a 78%);
  padding: 12px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 138px;
  transform-style: preserve-3d;
  transition: transform 0.22s ease-out;
  overflow: hidden;
}

.ld-rv-holo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 25%, rgba(125, 211, 252, 0.18) 48%, rgba(251, 191, 36, 0.14) 54%, transparent 72%);
  transform: translateX(var(--ld-rv-glint, -60%));
  pointer-events: none;
}

.ld-rv-vault-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  transform: translateZ(26px);
  pointer-events: none;
}

.ld-rv-ticket-badge {
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  transform: translateZ(42px);
  pointer-events: none;
}

.ld-rv-head {
  text-align: center;
  margin-bottom: 14px;
}

.ld-rv-title {
  margin: 0 0 6px;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ld-ah-ink);
}

.ld-rv-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ld-ah-muted);
}

.ld-rv-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.ld-rv-code-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--ld-ah-border);
  background: var(--ld-ah-bg);
  color: var(--ld-ah-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ld-rv-code-input:focus {
  outline: 2px solid var(--ld-ah-accent);
  border-color: var(--ld-ah-accent);
}

.ld-rv-submit {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: var(--ld-ah-accent);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.ld-rv-submit:hover {
  background: var(--ld-ah-accent-strong);
}

.ld-rv-submit.is-anticipate {
  animation: ldVaultPulse 0.45s ease infinite alternate;
}

.ld-rv-card.is-shake {
  animation: ldVaultShake 0.32s ease;
}

.ld-rv-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ld-ah-danger-soft);
  color: var(--ld-ah-danger);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
}

.ld-rv-rewards-wrap {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--ld-ah-surface-2);
}

.ld-rv-rewards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ld-ah-ink);
}

.ld-rv-reward-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ld-rv-reward-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--ld-ah-surface);
}

.ld-rv-reward-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #0f172a;
  flex-shrink: 0;
}

.ld-rv-reward-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ld-ah-accent-soft);
  color: var(--ld-ah-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ld-rv-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ld-rv-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  animation: ldSparkBurst 0.85s ease-out forwards;
}

@keyframes ldVaultPulse {
  from { transform: scale(1); }
  to { transform: scale(0.985); }
}

@keyframes ldVaultShake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-7px); }
  45% { transform: translateX(7px); }
  70% { transform: translateX(-4px); }
}

@keyframes ldSparkBurst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.7) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--tx, 40px), var(--ty, -60px)) scale(1.2) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ld-rv-holo-panel {
    transform: none !important;
    transition: none;
  }
  .ld-rv-submit.is-anticipate,
  .ld-rv-card.is-shake,
  .ld-rv-spark {
    animation: none !important;
  }
}

/* ==========================================================================
   Unified Border Admin Manager + Push Hub + User Push Preferences (v1.7.0)
   ========================================================================== */
.ld-bd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ld-bd-card {
  background: var(--ld-ah-surface-2, #f8fafc);
  border: 1px solid var(--ld-ah-border, #e2e8f0);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ld-bd-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ld-bd-preview-box {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ld-ah-surface, #ffffff);
  border: 1px solid var(--ld-ah-border, #e2e8f0);
}

.ld-bd-avatar-core {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #23a6d5;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-bd-webp-ring {
  position: absolute;
  inset: -4px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  pointer-events: none;
}

.ld-bd-meta {
  flex: 1;
  min-width: 0;
}

.ld-bd-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ld-ah-ink, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ld-bd-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--ld-ah-muted, #64748b);
  margin-top: 2px;
}

.ld-bd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ld-bd-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--ld-ah-surface, #ffffff);
  border: 1px solid var(--ld-ah-border, #e2e8f0);
  color: var(--ld-ah-ink, #0f172a);
}

.ld-bd-pill.is-shop {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.ld-bd-pill.is-hidden {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.ld-bd-pill.is-exclusive {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

body.dark-mode .ld-bd-pill.is-shop {
  background: #064e3b;
  border-color: #059669;
  color: #d1fae5;
}

body.dark-mode .ld-bd-pill.is-hidden {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .ld-bd-pill.is-exclusive {
  background: #78350f;
  border-color: #d97706;
  color: #fef3c7;
}

.ld-bd-desc {
  font-size: 0.78rem;
  color: var(--ld-ah-muted, #475569);
  line-height: 1.45;
  margin: 0;
}

.ld-bd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--ld-ah-border, #e2e8f0);
}

.ld-bd-form-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ld-ah-surface, #ffffff);
  border: 1px solid var(--ld-ah-border, #e2e8f0);
  margin-bottom: 12px;
}

.ld-push-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ld-push-stat-card {
  background: var(--ld-ah-surface-2, #f8fafc);
  border: 1px solid var(--ld-ah-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
}

.ld-push-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ld-ah-ink, #0f172a);
}

.ld-push-stat-lbl {
  font-size: 0.74rem;
  color: var(--ld-ah-muted, #64748b);
  margin-top: 2px;
}

.ld-push-prefs-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ld-ah-surface, #ffffff);
  color: var(--ld-ah-ink, #0f172a);
  border: 1px solid var(--ld-ah-border, #cbd5e1);
}

.ld-push-prefs-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ld-ah-ink, #0f172a);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ld-push-pref-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ld-push-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ld-ah-ink, #0f172a);
  padding: 6px 0;
  border-bottom: 1px solid var(--ld-ah-border, #cbd5e1);
}

.ld-push-pref-row strong {
  color: var(--ld-ah-ink, #0f172a);
}

.ld-push-pref-row:last-child {
  border-bottom: none;
}

.ld-push-pref-sub {
  font-size: 0.72rem;
  color: var(--ld-ah-muted, #475569);
  margin-top: 2px;
}

/* ==========================================================================
   Mobile-First Scrollable Admin Panel Navigator (v1.8.0)
   ========================================================================== */
.ld-adm-mobile-wrap {
  display: none;
}

.ld-adm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

.ld-adm-table-wrap table {
  min-width: 540px;
}

@media (max-width: 960px) {
  #admin.ld-adm-mobile-ready #adminNavToggle {
    display: none !important;
  }

  #admin.ld-adm-mobile-ready .ld-adm-mobile-wrap {
    display: block;
    margin-bottom: 14px;
  }

  #admin {
    overflow-x: clip;
  }

  #admin .admin-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  #admin .admin-body {
    min-width: 0;
    max-width: 100%;
    padding-bottom: 24px;
  }

  #admin .admin-stat-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .ld-adm-mob-bar {
    position: sticky;
    top: 58px;
    z-index: 40;
    background: var(--ld-ah-surface);
    border: 1px solid var(--ld-ah-border);
    border-radius: 14px;
    padding: 10px 10px 8px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }

  .ld-adm-mob-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .ld-adm-all-btn {
    min-height: 40px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--ld-ah-accent);
    background: var(--ld-ah-accent-soft);
    color: var(--ld-ah-accent-ink);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .ld-adm-all-btn.is-open {
    background: var(--ld-ah-accent);
    color: #ffffff;
  }

  .ld-adm-active-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ld-ah-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ld-adm-pill-track {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .ld-adm-pill-track::-webkit-scrollbar {
    display: none;
  }

  .ld-adm-pill-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ld-ah-border);
    background: var(--ld-ah-bg);
    color: var(--ld-ah-ink);
    font-size: 0.79rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
  }

  .ld-adm-pill-btn.is-active {
    background: var(--ld-ah-accent);
    border-color: var(--ld-ah-accent);
    color: #ffffff;
  }

  .ld-adm-feature-hub {
    display: none;
    background: var(--ld-ah-surface);
    border: 1px solid var(--ld-ah-border);
    border-radius: 14px;
    padding: 14px 12px;
    margin-bottom: 14px;
  }

  .ld-adm-feature-hub.is-open {
    display: block;
  }

  .ld-adm-hub-intro {
    font-size: 0.8rem;
    color: var(--ld-ah-muted);
    margin-bottom: 12px;
    line-height: 1.45;
  }

  .ld-adm-hub-group {
    margin-bottom: 14px;
  }

  .ld-adm-hub-group:last-child {
    margin-bottom: 0;
  }

  .ld-adm-hub-group-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ld-ah-muted);
    margin-bottom: 8px;
  }

  .ld-adm-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  @media (max-width: 520px) {
    .ld-adm-hub-grid {
      grid-template-columns: 1fr;
    }
  }

  .ld-adm-hub-card {
    width: 100%;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--ld-ah-border);
    background: var(--ld-ah-bg);
    color: var(--ld-ah-ink);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.12s ease;
  }

  .ld-adm-hub-card:active {
    transform: scale(0.985);
  }

  .ld-adm-hub-card.is-active {
    border-color: var(--ld-ah-accent);
    background: var(--ld-ah-accent-soft);
  }

  .ld-adm-hub-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ld-ah-surface-2);
    color: var(--ld-ah-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
  }

  .ld-adm-hub-card.is-active .ld-adm-hub-ico {
    background: var(--ld-ah-accent);
    color: #ffffff;
  }

  .ld-adm-hub-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .ld-adm-hub-text strong {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ld-ah-ink);
  }

  .ld-adm-hub-text span {
    font-size: 0.74rem;
    color: var(--ld-ah-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ld-adm-hub-arrow {
    font-size: 0.78rem;
    color: var(--ld-ah-muted);
    flex-shrink: 0;
  }

  .ld-ah-section {
    padding: 14px 12px;
  }

  .ld-ah-btn,
  .ld-ah-input,
  .ld-ah-select {
    min-height: 44px;
  }

  .ld-push-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Live Account & App Auto-Detector Card in Admin Panel */
.ld-adm-live-ctx {
  background: var(--ld-ah-surface);
  border: 1px solid var(--ld-ah-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ld-adm-ctx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.ld-adm-ctx-box {
  background: var(--ld-ah-surface-2);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.ld-adm-ctx-k {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ld-ah-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.ld-adm-ctx-v {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ld-ah-ink);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ld-adm-ctx-s {
  font-size: 0.76rem;
  color: var(--ld-ah-muted);
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-word;
}

.ld-adm-ctx-actions {
  display: flex;
  justify-content: flex-end;
}
