/* =========================================================================
   REA Drama API — Member & Admin Console (Inferno + Glassmorphism Theme)
   100% Unified Visual Identity with Landing Page (/) & All System Pages
   ========================================================================= */

:root {
  color-scheme: dark;
  --inf-bg: #050203;
  --inf-bg2: #0a0405;
  --inf-ember: #e63c12;
  --inf-ember2: #ff7a35;
  --inf-ember3: #f5a623;
  --inf-gold: #e5b84d;
  --inf-crimson: #a61b1b;
  --inf-text: #ffffff;
  --inf-text-sec: rgba(255, 255, 255, 0.74);
  --inf-text-muted: #8e7663;
  --inf-glass: rgba(14, 7, 5, 0.66);
  --inf-glass-hover: rgba(24, 12, 8, 0.82);
  --inf-glass-border: rgba(255, 160, 100, 0.12);
  --inf-glass-border-hover: rgba(255, 130, 60, 0.34);
  --inf-gradient: linear-gradient(135deg, #e63c12 0%, #ff7a35 55%, #f5a623 100%);
  --inf-gradient-soft: linear-gradient(135deg, rgba(230, 60, 18, 0.15) 0%, rgba(245, 166, 35, 0.06) 100%);
  --inf-shadow-ember: 0 8px 30px -10px rgba(230, 60, 18, 0.36);
  --inf-shadow-glow: 0 0 40px rgba(230, 60, 18, 0.14);
  --inf-nav-height: 82px;

  --bg: var(--inf-bg);
  --panel: var(--inf-glass);
  --line: var(--inf-glass-border);
  --text: var(--inf-text);
  --muted: var(--inf-text-sec);
  --accent: var(--inf-ember2);
  --danger: #ff8a8a;
  font-family: 'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent Chromium cross-document white flash and ensure all view transitions stay pitch dark */
::view-transition {
  background-color: #050203 !important;
  mix-blend-mode: normal !important;
  isolation: isolate !important;
}
::view-transition-group(root),
::view-transition-image-pair(root) {
  background-color: #050203 !important;
  isolation: isolate !important;
}
::view-transition-old(root),
::view-transition-new(root) {
  background-color: #050203 !important;
  mix-blend-mode: normal !important;
  isolation: isolate !important;
}
@keyframes rea-vt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rea-vt-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes rea-panel-glide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
::view-transition-old(root) {
  animation: rea-vt-fade-out 90ms ease-out both !important;
}
::view-transition-new(root) {
  animation: rea-vt-fade-in 90ms ease-out both !important;
}
.inf-nav {
  view-transition-name: rea-top-nav;
}
::view-transition-old(rea-top-nav),
::view-transition-new(rea-top-nav) {
  animation: none !important;
  mix-blend-mode: normal !important;
  isolation: isolate !important;
}

html {
  background-color: #050203 !important;
  color: #ffffff;
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 122, 53, 0.35) rgba(5, 2, 3, 0.85);
}

body {
  margin: 0;
  background-color: #050203 !important;
  background: var(--inf-bg);
  color: var(--inf-text);
  font-family: 'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
.auth-form:not([hidden]),
#member:not([hidden]),
#admin:not([hidden]),
.admin-panel:not([hidden]) {
  animation: rea-panel-glide 180ms ease-out both;
}

a {
  color: var(--inf-ember2);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--inf-ember3);
}

button, input, select, textarea {
  font: inherit;
}

/* ============ Inferno Atmosphere / Mesh / Sparks (Same as /) ============ */
.inf-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  transform: translateZ(0);
}
.inf-atmosphere::before,
.inf-atmosphere::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.28;
  will-change: transform;
  animation: drift 22s ease-in-out infinite;
}
.inf-atmosphere::before {
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(196, 42, 10, 0.85) 0%, rgba(196, 42, 10, 0.28) 42%, transparent 70%);
  top: -250px;
  left: -180px;
}
.inf-atmosphere::after {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(122, 19, 16, 0.85) 0%, rgba(122, 19, 16, 0.28) 42%, transparent 70%);
  bottom: -200px;
  right: -130px;
  animation-delay: -11s;
  animation-direction: reverse;
}
.inf-atmosphere .orb3 {
  position: absolute;
  width: 380px;
  height: 380px;
  top: 35%;
  right: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 118, 26, 0.8) 0%, rgba(212, 118, 26, 0.24) 45%, transparent 70%);
  opacity: 0.18;
  will-change: transform;
  animation: drift 26s ease-in-out infinite -6s;
}
.inf-noise {
  display: none !important;
}
.source-item-card,
.vault-card,
.plan {
  content-visibility: auto;
  contain-intrinsic-size: auto 160px;
  transform: translateZ(0);
}
.inf-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 160, 100, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 160, 100, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, black, transparent 75%);
}
.inf-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 130% 100% at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}
.inf-sparks {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.inf-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5a623, #e63c12);
  box-shadow: 0 0 8px #ff7a35, 0 0 16px rgba(230, 60, 18, 0.25);
  bottom: -10px;
  opacity: 0;
  animation: rise linear infinite;
}
.inf-spark:nth-child(1) { left: 12%; animation-duration: 18s; animation-delay: 0s; width: 2px; height: 2px; }
.inf-spark:nth-child(2) { left: 28%; animation-duration: 22s; animation-delay: -8s; width: 4px; height: 4px; }
.inf-spark:nth-child(3) { left: 48%; animation-duration: 16s; animation-delay: -4s; }
.inf-spark:nth-child(4) { left: 68%; animation-duration: 24s; animation-delay: -12s; width: 2px; height: 2px; }
.inf-spark:nth-child(5) { left: 82%; animation-duration: 19s; animation-delay: -2s; }
.inf-spark:nth-child(6) { left: 92%; animation-duration: 21s; animation-delay: -10s; width: 3px; height: 3px; }
.inf-spark:nth-child(7) { left: 58%; animation-duration: 17s; animation-delay: -15s; width: 2px; height: 2px; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -35px) scale(1.06); }
  66% { transform: translate(-35px, 40px) scale(0.95); }
}
@keyframes rise {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  12% { opacity: 0.6; }
  90% { opacity: 0.35; }
  100% { opacity: 0; transform: translateY(-110vh) translateX(30px); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.15); }
}

/* ============ Unified Top Navigation Bar (.inf-nav) ============ */
.inf-nav {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.inf-nav::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: calc(100% + 150px);
  background: linear-gradient(180deg, rgba(5, 2, 3, 0.94) 0%, rgba(5, 2, 3, 0.92) 75%, rgba(5, 2, 3, 0.65) 88%, rgba(5, 2, 3, 0) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
.inf-nav-bar {
  display: flex;
  align-items: center;
}
.inf-nav-toggle {
  display: none;
}
.inf-nav-backdrop {
  display: none;
}
.inf-nav-space {
  height: var(--inf-nav-height, 78px);
}
.inf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--inf-text);
}
.inf-brand:hover {
  color: var(--inf-text);
}
.inf-brand .flame {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--inf-gradient-soft);
  border: 1px solid var(--inf-glass-border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(230, 60, 18, 0.38));
}
.inf-brand .brand-title,
.inf-brand h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--inf-text);
  margin: 0;
}
.inf-brand em {
  font-style: normal;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.inf-nav-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(14, 7, 5, 0.72);
  border: 1px solid rgba(255, 160, 100, 0.14);
  border-radius: 15px;
  padding: 5px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}
.nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 160, 100, 0.16);
  margin: 0 2px;
}

.inf-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  min-block-size: 38px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.inf-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.inf-btn-glass {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.82);
}
.inf-btn-glass:hover {
  background: rgba(255, 122, 53, 0.12);
  border-color: rgba(255, 130, 60, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}
.inf-btn-ember {
  background: var(--inf-gradient);
  color: #1a0606 !important;
  font-weight: 700;
  box-shadow: var(--inf-shadow-ember), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.inf-btn-ember:hover {
  color: #1a0606 !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px rgba(230, 60, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.inf-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.26);
  color: #fca5a5;
}
.inf-btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.small-link {
  padding: 6px 12px;
  min-block-size: 34px;
  font-size: 12px;
  background: rgba(255, 122, 53, 0.1);
  border: 1px solid rgba(255, 130, 60, 0.25);
}

/* ============ User Profile Dropdown (.nav-user-dropdown) ============ */
.nav-user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-user-trigger {
  gap: 8px !important;
  padding: 6px 11px 6px 7px !important;
  border: 1px solid rgba(255, 160, 100, 0.18) !important;
  background: rgba(255, 122, 53, 0.08) !important;
}
.nav-user-dropdown.is-open .nav-user-trigger,
.nav-user-trigger:hover {
  background: rgba(255, 122, 53, 0.16) !important;
  border-color: rgba(255, 130, 60, 0.38) !important;
  color: #fff !important;
}
.nav-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--inf-gradient);
  color: #1a0606;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(230, 60, 18, 0.35);
}
.nav-user-avatar.lg {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 16px;
}
#nav-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user-caret {
  width: 13px !important;
  height: 13px !important;
  opacity: 0.75;
  transition: transform 0.2s ease;
}
.nav-user-dropdown.is-open .nav-user-caret {
  transform: rotate(180deg);
}
.nav-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(296px, calc(100vw - 28px));
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border-radius: 16px;
  background: rgba(14, 7, 5, 0.96);
  border: 1px solid rgba(255, 140, 75, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.85), 0 0 32px rgba(230, 60, 18, 0.14);
  z-index: 80;
  animation: rea-page-in 140ms ease-out;
}
.nav-user-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 12px;
}
.nav-user-info {
  min-width: 0;
  flex: 1;
}
.nav-user-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.nav-user-title-row strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--inf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 145px;
}
.nav-drop-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 122, 53, 0.16);
  border: 1px solid rgba(255, 130, 60, 0.35);
  color: var(--inf-ember2);
}
.nav-drop-email {
  display: block;
  font-size: 11.5px;
  color: var(--inf-text-sec);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.nav-drop-divider {
  height: 1px;
  background: rgba(255, 160, 100, 0.12);
  margin: 4px 6px;
}
.nav-drop-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--inf-text);
  text-align: left;
  text-decoration: none;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.nav-drop-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--inf-ember2);
}
.nav-drop-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--inf-text);
  line-height: 1.3;
}
.nav-drop-item small {
  display: block;
  font-size: 11px;
  color: var(--inf-text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.nav-drop-item:hover,
.nav-drop-item.is-active {
  background: rgba(255, 122, 53, 0.14);
  border-color: rgba(255, 130, 60, 0.28);
  color: #fff;
  transform: none;
}
.nav-drop-item.danger svg,
.nav-drop-item.danger strong {
  color: #fca5a5;
}
.nav-drop-item.danger:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
}
@media (max-width: 960px) {
  .nav-user-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  #nav-user-name {
    max-width: none;
    flex: 1;
    text-align: left;
  }
  .nav-user-caret {
    margin-left: auto;
  }
  .nav-user-menu {
    position: static;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    margin-top: 6px;
    box-shadow: none;
  }
}

/* ============ General Buttons & Inputs ============ */
button {
  cursor: pointer;
  color: var(--inf-text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--inf-glass-border);
  border-radius: 11px;
  padding: 9px 16px;
  min-block-size: 40px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
button:hover {
  background: rgba(255, 122, 53, 0.14);
  border-color: var(--inf-glass-border-hover);
  color: #fff;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--inf-gradient);
  color: #1a0606;
  font-weight: 700;
  border: 0;
  box-shadow: var(--inf-shadow-ember), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
button.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #1a0606;
}
button.danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(248, 113, 113, 0.28);
}
button.danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
}
button.small {
  padding: 6px 11px;
  min-block-size: 32px;
  font-size: 12px;
  border-radius: 9px;
}

input, select, textarea {
  width: 100%;
  color: var(--inf-text);
  background: rgba(12, 5, 4, 0.78);
  border: 1px solid var(--inf-glass-border);
  border-radius: 11px;
  padding: 10px 14px;
  min-width: 0;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-color: #120806;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ff944d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 40px;
  color: #fff6f0;
  cursor: pointer;
}
select:hover {
  background-color: #1b0c08;
  border-color: var(--inf-glass-border-hover);
}
select option,
select optgroup {
  background-color: #120806;
  color: #fff6f0;
  font-size: 13.5px;
  padding: 10px 14px;
}
select option:checked {
  background: linear-gradient(135deg, #e63c12 0%, #ff7a35 100%);
  background-color: #e63c12;
  color: #ffffff;
  font-weight: 700;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--inf-ember2);
  box-shadow: 0 0 0 3px rgba(255, 122, 53, 0.18);
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--inf-ember2);
  outline-offset: 2px;
}

label {
  display: block;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--inf-text-sec);
}
label input, label textarea, label select {
  margin-top: 6px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--inf-ember2);
}

/* ============ Main Layout & Hero Intro ============ */
main {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.intro {
  padding: 20px 0 34px;
  text-align: center;
}
.inf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: var(--inf-glass);
  border: 1px solid var(--inf-glass-border);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--inf-text-sec);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 16px;
}
.inf-hero-badge .glow {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 6px #86efac, 0 0 12px rgba(134, 239, 172, 0.4);
  animation: pulseGlow 2.5s infinite;
}
.inf-hero-badge .eyebrow {
  margin: 0;
  color: var(--inf-text-sec);
  letter-spacing: 0.08em;
}

h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
h1 .blaze {
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  margin-top: 6px;
}

.intro > p:last-child {
  color: var(--inf-text-sec);
  font-size: clamp(14px, 1.4vw, 16px);
  max-width: 640px;
  margin: 0 auto;
}
.muted {
  color: var(--inf-text-sec);
  font-size: 0.86rem;
}
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--inf-ember2);
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 5px;
}

/* ============ Glassmorphic Panels & Cards ============ */
.panel {
  background: var(--inf-glass);
  border: 1px solid var(--inf-glass-border);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.65);
  transition: border-color 0.3s ease;
}
.panel:hover {
  border-color: rgba(255, 140, 75, 0.22);
}

.auth-shell {
  max-width: 520px;
  margin: 0 auto 28px;
}
.auth-card {
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 140, 75, 0.22);
  box-shadow: 0 24px 56px -20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(230, 60, 18, 0.08);
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--inf-gradient);
}

.auth-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin-bottom: 24px;
  background: rgba(6, 3, 2, 0.72);
  border: 1px solid rgba(255, 160, 100, 0.14);
  border-radius: 14px;
}
.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--inf-text-sec);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.auth-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.auth-tab:hover {
  color: var(--inf-text);
  background: rgba(255, 122, 53, 0.08);
  transform: none;
}
.auth-tab.active {
  background: var(--inf-gradient);
  color: #1a0606;
  font-weight: 700;
  box-shadow: var(--inf-shadow-ember), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

[hidden],
.auth-form[hidden],
.auth-switcher[hidden],
.auth-footer[hidden],
body.admin-mode #auth-tabs,
body.admin-mode #register-form,
body.admin-mode #login-switch-hint,
body:not([data-auth-role="member"]):not([data-auth-role="admin"]):not([data-auth-role="owner"]) .nav-auth-only,
body:not([data-auth-role="admin"]):not([data-auth-role="owner"]) .nav-admin-only,
body[data-auth-role="member"] .nav-guest-only,
body[data-auth-role="admin"] .nav-guest-only,
body[data-auth-role="owner"] .nav-guest-only {
  display: none !important;
}
.auth-submit {
  width: 100%;
  margin-top: 4px;
}
.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 160, 100, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--inf-text-sec);
}
.auth-link-btn {
  padding: 4px 8px;
  min-height: 30px;
  border: none;
  background: transparent;
  color: var(--inf-ember2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.auth-link-btn:hover {
  background: rgba(255, 122, 53, 0.12);
  color: var(--inf-ember3);
  transform: none;
}
@media (max-width: 480px) {
  .auth-card {
    padding: 20px 18px;
  }
  .auth-tab {
    font-size: 12.5px;
    padding: 10px 8px;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--inf-ember2);
  background: rgba(230, 60, 18, 0.14);
  border: 1px solid rgba(255, 122, 53, 0.28);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

/* ============ Stats Grid (Same as .inf-stats on /) ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.stat {
  background: var(--inf-glass);
  border: 1px solid var(--inf-glass-border);
  border-radius: 18px;
  padding: 22px 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--inf-gradient-soft);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stat:hover {
  border-color: var(--inf-glass-border-hover);
  transform: translateY(-2px);
}
.stat:hover::before {
  opacity: 1;
}
.stat strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat span {
  font-size: 11.5px;
  color: var(--inf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  position: relative;
}
.stat-sub {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--inf-text-sec);
  position: relative;
}
.stat-bar {
  margin-top: 10px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 160, 100, 0.12);
  overflow: hidden;
  position: relative;
}
.stat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--inf-gradient);
}

/* ============ Redesigned Member Console (#member) ============ */
.member-hero-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  margin-bottom: 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 110, 45, 0.16) 0%, transparent 55%),
    linear-gradient(145deg, rgba(22, 11, 8, 0.94) 0%, rgba(11, 5, 4, 0.94) 100%);
  border: 1px solid rgba(255, 140, 75, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 46px -18px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 190, 140, 0.14);
}
.member-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.member-hero-title-box {
  max-width: 680px;
}
.member-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 53, 0.12);
  border: 1px solid rgba(255, 130, 60, 0.3);
  color: #ffc299;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.member-main-title {
  margin: 0 0 6px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--inf-text);
}
.member-main-sub {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.6;
  color: var(--inf-text-sec);
}
.member-hero-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 150, 90, 0.22), rgba(255, 150, 90, 0.05));
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--inf-gradient);
  color: #1a0606;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--inf-shadow-ember);
}
.member-meta {
  min-width: 0;
}
.member-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.member-name-row strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.12rem;
  color: var(--inf-text);
}
.member-role-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 122, 53, 0.16);
  border: 1px solid rgba(255, 130, 60, 0.35);
  color: var(--inf-ember2);
}
.member-active-key-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--inf-text-sec);
}
.member-active-key-pill.is-bound {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
}
.member-email {
  display: block;
  font-size: 13px;
  color: var(--inf-text-sec);
  margin-top: 3px;
}
.member-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============ 3-Step Quick Guide & Primary Key Spotlight ============ */
.member-quick-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.quick-step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(24, 12, 9, 0.88), rgba(11, 5, 4, 0.92));
  border: 1px solid rgba(255, 150, 90, 0.2);
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.65);
}
.quick-step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--inf-gradient);
  color: #1a0606;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.quick-step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.quick-step-body strong {
  font-size: 14px;
  color: var(--inf-text);
}
.quick-step-body span {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--inf-text-sec);
}

.primary-key-spotlight {
  padding: 20px 22px;
  margin-bottom: 18px;
  border-radius: 18px;
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(34, 197, 94, 0.14) 0%, transparent 55%),
    linear-gradient(145deg, rgba(24, 13, 9, 0.94), rgba(10, 5, 4, 0.95));
  border: 1px solid rgba(255, 140, 75, 0.36);
  box-shadow: 0 16px 38px -16px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 190, 140, 0.16);
}
.pk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.pk-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.38);
  color: #86efac;
  font-size: 12.5px;
  font-weight: 700;
}
.pk-expiry {
  font-size: 12.5px;
  color: var(--inf-text-sec);
}
.pk-expiry strong {
  color: var(--inf-text);
}
.pk-secret-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 150, 90, 0.22);
}
.pk-code-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.pk-code-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--inf-text-sec);
}
.pk-code-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #ffd69a;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 122, 53, 0.3);
  padding: 6px 12px;
  border-radius: 9px;
  word-break: break-all;
  user-select: all;
}
.pk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pk-btn {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
}

.member-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px;
  margin-bottom: 22px;
  background: rgba(12, 6, 4, 0.78);
  border: 1px solid rgba(255, 160, 100, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.member-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--inf-text-sec);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.member-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.member-tab:hover {
  color: var(--inf-text);
  background: rgba(255, 122, 53, 0.1);
  transform: none;
}
.member-tab.active {
  background: var(--inf-gradient);
  color: #1a0606;
  font-weight: 700;
  box-shadow: var(--inf-shadow-ember);
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}
.member-tab:not(.active) .tab-count {
  background: rgba(255, 122, 53, 0.18);
  color: var(--inf-ember2);
}
.tab-count.warn {
  background: #f59e0b !important;
  color: #1a0606 !important;
}

.section-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.member-tip-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(230, 60, 18, 0.08);
  border: 1px solid rgba(255, 140, 75, 0.18);
  font-size: 13px;
  color: var(--inf-text-sec);
}
.member-tip-banner .tip-icon {
  font-size: 18px;
  line-height: 1.2;
}

/* ============ Rich API Key Cards ============ */
.key-card-list {
  display: grid;
  gap: 18px;
}
.key-card {
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(18, 9, 7, 0.88), rgba(9, 4, 3, 0.92));
  border: 1px solid rgba(255, 160, 100, 0.18);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.key-card:hover {
  border-color: rgba(255, 140, 75, 0.36);
}
.key-card.is-selected {
  border-color: rgba(255, 122, 53, 0.55);
  box-shadow: 0 0 28px rgba(230, 60, 18, 0.14), inset 0 1px 0 rgba(255, 160, 100, 0.2);
}
.key-card.is-inactive {
  opacity: 0.68;
}
.key-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 160, 100, 0.12);
}
.key-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.key-secret-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 150, 90, 0.18);
}
.key-secret-code-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.key-secret-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--inf-text-sec);
}
.key-secret-btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.key-prefix {
  font-size: 13.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 122, 53, 0.28);
  color: #ffd69a;
  word-break: break-all;
}
.key-plan-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--inf-text);
}
.key-remain-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
}
.key-remain-pill.is-off {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}
.key-bound-pill {
  background: rgba(230, 60, 18, 0.2);
  border-color: rgba(255, 122, 53, 0.45);
  color: #ffb88c;
}
.key-expiry {
  font-size: 12.5px;
  color: var(--inf-text-sec);
}
.key-expiry strong {
  color: var(--inf-text);
}

.key-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
.usage-box {
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 160, 100, 0.12);
}
.usage-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--inf-text-sec);
  margin-bottom: 8px;
}
.usage-label-row strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--inf-text);
  font-size: 13px;
}
.usage-label-row small {
  color: var(--inf-ember2);
}
.usage-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--inf-gradient);
}
.usage-bar.heavy i {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.key-meta-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.key-meta-item {
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 160, 100, 0.1);
}
.key-meta-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.meta-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--inf-text-sec);
  margin: 0;
}
.ip-badge {
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
}
.key-guard-strip {
  margin: 10px 0 4px;
  padding: 11px 14px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.key-guard-strip.is-safe {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.key-guard-strip.is-warn {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
}
.key-guard-strip.is-locked {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.app-chip-wrap,
.ip-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.app-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 122, 53, 0.12);
  border: 1px solid rgba(255, 130, 60, 0.24);
  color: #ffd0b0;
}
.app-chip.all-apps {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.28);
  color: #86efac;
}
.key-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 160, 100, 0.1);
}
button.active-bound {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.4);
  color: #86efac;
}

.key-empty-state {
  text-align: center;
  padding: 38px 20px;
  border-radius: 16px;
  background: rgba(8, 4, 3, 0.55);
  border: 1px dashed rgba(255, 140, 75, 0.28);
}
.key-empty-state .empty-orb {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--inf-gradient-soft);
  border: 1px solid var(--inf-glass-border-hover);
  display: grid;
  place-items: center;
  font-size: 26px;
}
.key-empty-state .empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ============ Code Integration & Billing / Security Grids ============ */
.code-lang-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.code-lang-btn,
.code-copy-btn {
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}
.code-lang-btn.active {
  background: var(--inf-gradient);
  color: #1a0606;
  border-color: transparent;
}
.integration-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.plan-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--inf-gradient);
  color: #1a0606;
}
.plan-ribbon.trial-ribbon {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac;
}
.plan-duration {
  font-size: 12px;
  color: var(--inf-text-muted);
  margin: 4px 0 0;
}
.plan-features {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 16px 0 20px !important;
  border-top: 1px solid rgba(255, 160, 100, 0.1);
}
.plan-features li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  margin: 0 !important;
  border-bottom: 1px solid rgba(255, 160, 100, 0.06);
  font-size: 12.5px;
}
.plan-features li b {
  color: var(--inf-text-muted);
  font-weight: 500;
}
.plan-features li span {
  color: var(--inf-text);
  font-weight: 600;
  text-align: right;
}

.billing-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 20px;
  align-items: start;
}
.billing-steps {
  padding-left: 18px;
  margin: 16px 0 0;
  color: var(--inf-text-sec);
  font-size: 13px;
}
.billing-steps li {
  margin: 8px 0;
}
.billing-steps strong {
  color: var(--inf-text);
}

.profile-summary-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 160, 100, 0.12);
}
.profile-summary-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.profile-summary-list span {
  color: var(--inf-text-muted);
}
.profile-summary-list strong {
  color: var(--inf-text);
}

@media (max-width: 960px) {
  .member-tabs {
    grid-template-columns: 1fr 1fr;
  }
  .member-quick-steps,
  .key-usage-grid,
  .key-meta-grid,
  .billing-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .member-tabs {
    grid-template-columns: 1fr;
  }
  .member-hero-bar,
  .primary-key-spotlight,
  .key-card {
    padding: 16px;
  }
  .member-hero-actions,
  .pk-actions,
  .key-secret-btns {
    width: 100%;
  }
  .member-hero-actions > *,
  .pk-actions > * {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 {
  margin-bottom: 0;
}

/* ============ Membership Plans Grid ============ */
.plans-section {
  margin-bottom: 28px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.plan {
  background: var(--inf-glass);
  border: 1px solid var(--inf-glass-border);
  border-radius: 18px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.plan:hover {
  border-color: var(--inf-glass-border-hover);
  transform: translateY(-3px);
  background: var(--inf-glass-hover);
}
.plan h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.plan .price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.plan .price small {
  font-size: 12.5px;
  color: var(--inf-text-sec);
  -webkit-text-fill-color: var(--inf-text-sec);
  font-weight: 500;
}
.plan ul {
  padding-left: 18px;
  font-size: 0.83rem;
  color: var(--inf-text-sec);
  flex: 1;
  margin: 18px 0 22px;
}
.plan li {
  margin: 7px 0;
}
.plan li::marker {
  color: var(--inf-ember2);
}
.plan button {
  width: 100%;
  justify-content: center;
}
.plan.highlight {
  border-color: rgba(255, 122, 53, 0.5);
  box-shadow: inset 0 3px 0 var(--inf-ember2), var(--inf-shadow-glow);
  background: linear-gradient(180deg, rgba(230, 60, 18, 0.14) 0%, rgba(14, 7, 5, 0.78) 45%);
}
.plan.highlight button {
  background: var(--inf-gradient);
  color: #1a0606;
  font-weight: 700;
  border: 0;
}

/* ============ Tables & Status Pills ============ */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}
th {
  color: var(--inf-text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--inf-glass-border);
  padding: 12px 10px;
}
td {
  padding: 15px 10px;
  border-bottom: 1px solid rgba(255, 160, 100, 0.07);
  vertical-align: top;
}
tbody tr:hover td {
  background: rgba(255, 122, 53, 0.035);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td .muted {
  font-size: 11.5px;
}
td .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 140px;
}

.pill {
  display: inline-flex;
  align-items: center;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #86efac;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.warn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fcd34d;
}
.pill.off {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

pre {
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 160, 100, 0.12);
  padding: 18px;
  border-radius: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #ffd69a;
}
code {
  font-family: 'JetBrains Mono', monospace;
  color: #ffb88c;
  background: rgba(255, 122, 53, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
pre code {
  background: transparent;
  padding: 0;
}

#message {
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(20, 48, 32, 0.78);
  color: #bbf7d0;
  border-radius: 14px;
  padding: 13px 18px;
  margin: 0 0 22px;
  backdrop-filter: blur(12px);
  overflow-wrap: anywhere;
}
#message.error,
#modal-error {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(58, 18, 22, 0.82);
}
#modal-error {
  padding: 10px 14px;
  border-radius: 10px;
}

dialog {
  color: var(--inf-text);
  background: rgba(16, 8, 6, 0.96);
  border: 1px solid var(--inf-glass-border-hover);
  border-radius: 20px;
  padding: 26px;
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), var(--inf-shadow-glow);
}
dialog::backdrop {
  background: rgba(3, 1, 2, 0.76);
  backdrop-filter: blur(6px);
}
dialog .section-head button {
  padding: 4px 12px;
  font-size: 20px;
}
dialog img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--inf-glass-border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  margin: 12px 0 22px;
  border: 1px solid var(--inf-glass-border);
  background: rgba(0, 0, 0, 0.35);
  padding: 14px;
  border-radius: 12px;
}
.platforms label {
  font-size: 0.85rem;
  margin: 0;
}
.secret {
  user-select: all;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 122, 53, 0.45);
  color: #86efac;
  overflow-wrap: anywhere;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
.preserve {
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--inf-glass-border);
  border-radius: 12px;
  padding: 16px;
  color: #ffd69a;
  font-size: 0.9rem;
}

.inf-footer {
  text-align: center;
  padding: 36px 20px 24px;
  color: var(--inf-text-muted);
  font-size: 12.5px;
  border-top: 1px solid rgba(255, 180, 120, 0.08);
  margin-top: 40px;
}
.inf-footer a {
  color: var(--inf-text-sec);
}
.inf-footer a:hover {
  color: var(--inf-ember2);
}
.inf-footer .fbrand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--inf-text);
}
.inf-footer .fbrand em {
  font-style: normal;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[hidden] {
  display: none !important;
}

/* =========================================================================
   Admin Console Mode (.admin-mode & .admin-ready) — Inferno + Glassmorphism
   ========================================================================= */
.admin-mode #auth {
  max-width: 520px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
.admin-mode:not(.admin-ready) .intro {
  max-width: 560px;
  margin: 12px auto 16px;
}
.admin-ready > main {
  max-width: 1420px;
  margin-left: 276px;
  margin-right: auto;
  padding: 28px 32px 48px;
  min-width: 0;
}
.admin-ready .intro {
  padding: 0 0 12px;
  text-align: left;
  margin-bottom: 18px;
}
.admin-ready .intro > .inf-hero-badge {
  display: none;
}
.admin-ready h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 4px;
}
.admin-ready #page-subtitle {
  font-size: 13.5px;
  margin: 0 0 0 58px;
  color: var(--inf-text-sec);
  max-width: none;
}
.page-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  color: #1a0606;
  background: var(--inf-gradient);
  box-shadow: var(--inf-shadow-ember);
}
.page-icon svg {
  width: 21px;
  height: 21px;
}

.admin-sidebar {
  position: fixed;
  inset: var(--inf-nav-height) auto 0 0;
  width: 276px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(16, 8, 6, 0.95), rgba(8, 3, 3, 0.98));
  border-right: 1px solid var(--inf-glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 60;
}
.sidebar-brand {
  padding: 22px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 160, 100, 0.08);
}
.sidebar-brand > a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--inf-text);
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--inf-glass-border-hover);
  background: var(--inf-gradient-soft);
  border-radius: 12px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px rgba(230, 60, 18, 0.35));
}
.sidebar-brand strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.sidebar-brand strong em {
  font-style: normal;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-brand small {
  display: inline-block;
  margin-top: 4px;
  background: rgba(230, 60, 18, 0.16);
  border: 1px solid rgba(255, 122, 53, 0.28);
  color: var(--inf-ember2);
  letter-spacing: 0.08em;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 800;
}
#admin-close {
  display: none;
  font-size: 22px;
  padding: 2px 10px;
  border: 0;
}

#admin-nav {
  padding: 10px 12px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 140, 75, 0.16) transparent;
}
#admin-nav::-webkit-scrollbar {
  width: 4px;
}
#admin-nav::-webkit-scrollbar-track {
  background: transparent;
}
#admin-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 140, 75, 0.18);
  border-radius: 999px;
}
#admin-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 140, 75, 0.38);
}
#admin-nav details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 160, 100, 0.07);
}
#admin-nav summary {
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  color: rgba(255, 195, 160, 0.56);
  font-family: 'Space Grotesk', 'Noto Sans Thai', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  font-weight: 700;
  padding: 4px 10px 6px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.18s ease, background 0.18s ease;
}
#admin-nav summary:hover {
  color: rgba(255, 225, 200, 0.9);
  background: rgba(255, 140, 75, 0.05);
}
#admin-nav summary::-webkit-details-marker {
  display: none;
}
#admin-nav summary span {
  font-size: 13px;
  opacity: 0.75;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
#admin-nav details:not([open]) summary span {
  transform: rotate(-90deg);
}
#admin-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(246, 232, 222, 0.78);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 7px 11px 7px 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  margin: 3px 0;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
#admin-nav a svg {
  width: 31px;
  height: 31px;
  padding: 6.5px;
  box-sizing: border-box;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 165, 110, 0.11);
  color: rgba(255, 195, 155, 0.72);
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
#admin-nav a:hover {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(255, 122, 53, 0.11), rgba(255, 122, 53, 0.03));
  border-color: rgba(255, 140, 75, 0.22);
  transform: translateX(2px);
}
#admin-nav a:hover svg {
  background: rgba(255, 122, 53, 0.16);
  border-color: rgba(255, 140, 75, 0.34);
  color: #ff9d66;
}
#admin-nav a.active {
  color: #fff8f3;
  font-weight: 700;
  background: linear-gradient(100deg, rgba(230, 60, 18, 0.24) 0%, rgba(245, 166, 35, 0.10) 55%, rgba(22, 10, 7, 0.65) 100%);
  border-color: rgba(255, 138, 72, 0.42);
  box-shadow:
    0 8px 20px -8px rgba(230, 60, 18, 0.42),
    inset 0 1px 0 rgba(255, 210, 175, 0.16);
}
#admin-nav a.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5px;
  height: 18px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #ffb347 0%, #ff6b2b 55%, #e63c12 100%);
  box-shadow: 0 0 10px rgba(255, 122, 53, 0.85);
}
#admin-nav a.active svg {
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.34), rgba(245, 166, 35, 0.20));
  border-color: rgba(255, 155, 90, 0.52);
  color: #ffb078;
  box-shadow: 0 4px 12px -2px rgba(230, 60, 18, 0.36), inset 0 1px 0 rgba(255, 220, 190, 0.24);
}
#admin-nav a b {
  margin-left: auto;
  background: var(--inf-gradient);
  padding: 2px 7.5px;
  border-radius: 999px;
  color: #1a0606;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
}

.sidebar-account {
  border: 1px solid rgba(255, 160, 100, 0.14);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  margin: 6px 12px 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-account > div {
  min-width: 0;
  flex: 1;
}
.sidebar-account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.sidebar-account small {
  display: block;
  font-size: 10.5px;
  color: var(--inf-text-muted);
}
.sidebar-account button {
  padding: 5px 10px;
  min-block-size: 34px;
  font-size: 16px;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--inf-gradient);
  color: #1a0606;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 800;
  border-radius: 50%;
}
.sidebar-account .admin-avatar {
  border-radius: 11px;
}

.admin-topbar {
  position: sticky;
  top: var(--inf-nav-height);
  height: 66px;
  margin-left: 276px;
  z-index: 30;
  background: rgba(8, 3, 3, 0.88);
  border-bottom: 1px solid var(--inf-glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 12px;
}
.admin-breadcrumb {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
}
.admin-breadcrumb small {
  color: var(--inf-text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-breadcrumb strong {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  white-space: nowrap;
}
.admin-status i,
.source-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  border-radius: 50%;
  display: inline-block;
}
.admin-top-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-header-link {
  color: var(--inf-text-sec);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 11px;
  border: 1px solid var(--inf-glass-border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.admin-header-link:hover {
  color: #ffffff;
  border-color: var(--inf-glass-border-hover);
  background: rgba(255, 122, 53, 0.12);
}
.admin-header-link.highlight-link {
  background: rgba(230, 60, 18, 0.18);
  border-color: rgba(255, 122, 53, 0.35);
  color: #ffd3b6;
}
#admin-menu-toggle {
  display: none;
  font-size: 20px;
  padding: 4px 10px;
}
.admin-backdrop {
  position: fixed;
  inset: 0;
  border: 0 !important;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.68) !important;
  backdrop-filter: blur(4px);
  z-index: 50;
  cursor: default;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}
.admin-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-shortcuts > a {
  padding: 15px 14px;
  border: 1px solid var(--inf-glass-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--inf-text-sec);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}
.admin-shortcuts > a:hover {
  border-color: var(--inf-glass-border-hover);
  background: rgba(230, 60, 18, 0.12);
  transform: translateY(-2px);
}
.shortcut-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--inf-gradient-soft);
  border: 1px solid rgba(255, 122, 53, 0.26);
  color: var(--inf-ember2);
  flex-shrink: 0;
}
.shortcut-icon svg {
  width: 18px;
  height: 18px;
}
.admin-shortcuts strong {
  display: block;
  color: var(--inf-text);
  font-size: 13px;
}
.admin-shortcuts small {
  display: block;
  color: var(--inf-text-muted);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 2px;
}
.admin-shortcuts > a > span:last-child {
  margin-left: auto;
  font-size: 14px;
  color: var(--inf-ember2);
}

.recent-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 160, 100, 0.08);
}
.recent-item:last-child {
  border: 0;
}
.recent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--inf-ember2);
  flex-shrink: 0;
  margin-top: 8px;
  box-shadow: 0 0 0 4px rgba(230, 60, 18, 0.16);
}
.recent-item strong {
  font-size: 12.5px;
  display: block;
  font-weight: 600;
}
.recent-item small {
  font-size: 11px;
  display: block;
  color: var(--inf-text-muted);
  margin-top: 2px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.source-grid > div {
  display: flex;
  gap: 9px;
  align-items: center;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--inf-glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  transition: border-color 0.2s ease;
}
.source-grid > div:hover {
  border-color: var(--inf-glass-border-hover);
}
.source-grid a {
  margin-left: auto;
  font-size: 11px;
  color: var(--inf-ember2);
}

.admin-drawer-open {
  overflow: hidden;
}

/* =========================================================================
   Responsive Breakpoints (Desktop / Tablet / Mobile)
   ========================================================================= */
@media (min-width: 1680px) {
  .admin-ready > main {
    margin-left: calc(276px + (100vw - 1680px) / 2);
  }
}

@media (max-width: 1120px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .admin-status {
    display: none;
  }
}

@media (max-width: 1023px) {
  .admin-ready > main {
    margin-left: auto;
    padding: 24px 20px;
    max-width: 100%;
  }
  .admin-topbar {
    margin-left: 0;
    padding: 0 20px;
    gap: 10px;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: 290px;
    max-width: 86vw;
  }
  .admin-drawer-open .admin-sidebar {
    transform: translateX(0);
  }
  #admin-close,
  #admin-menu-toggle {
    display: block;
  }
}

@media (max-width: 960px) {
  .inf-nav {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .inf-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 44px;
  }
  .inf-nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    background: rgba(22, 11, 8, 0.8);
    border: 1px solid rgba(255, 160, 100, 0.24);
    color: var(--inf-text);
    cursor: pointer;
    z-index: 62;
  }
  .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.28s ease, opacity 0.2s ease, background-color 0.2s ease;
  }
  .inf-nav-toggle.is-active .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
    background: #ff7a35;
  }
  .inf-nav-toggle.is-active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .inf-nav-toggle.is-active .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
    background: #ff7a35;
  }
  .inf-nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    padding: 0 12px;
    margin-top: 0;
    border-color: transparent;
    transition: max-height 0.32s ease, opacity 0.22s ease, padding 0.25s ease, margin-top 0.25s ease;
  }
  .inf-nav-actions.is-open {
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 1;
    pointer-events: auto;
    padding: 12px;
    margin-top: 10px;
    border-color: rgba(255, 160, 100, 0.22);
    background: rgba(14, 7, 5, 0.96);
  }
  .inf-nav-actions .inf-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 14px;
    font-size: 13.5px;
  }
  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }
  .inf-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .inf-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  main {
    padding: 16px 16px 40px;
  }
  .auth-grid,
  .form-grid,
  .admin-shortcuts {
    grid-template-columns: 1fr;
  }
  .plans {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 18px;
  }
  .admin-topbar {
    padding: 0 12px;
    height: 60px;
  }
  .admin-top-links .admin-header-link:not(.highlight-link) {
    display: none;
  }
  input, select, textarea {
    font-size: 16px;
  }
}

@media (max-width: 460px) {
  .plans,
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ============ SweetAlert2 (Inferno Glass Edition) ============ */
.swal2-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 3, 2, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: swal2FadeIn 0.18s ease-out;
}
.swal2-container.swal2-closing {
  animation: swal2FadeOut 0.15s ease-in forwards;
}
.swal2-toast-stack {
  position: fixed;
  top: calc(var(--inf-nav-height, 84px) + 12px);
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
  width: calc(100vw - 40px);
  pointer-events: none;
}
.swal2-popup {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(28, 14, 10, 0.98), rgba(14, 7, 5, 0.99));
  border: 1px solid rgba(255, 130, 60, 0.34);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.85),
    0 0 36px rgba(255, 85, 25, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #fff6f0;
  text-align: center;
  overflow: hidden;
  animation: swal2PopIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.swal2-container.swal2-closing .swal2-popup {
  animation: swal2PopOut 0.15s ease-in forwards;
}
.swal2-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(26, 13, 9, 0.97), rgba(14, 7, 5, 0.98));
  border: 1px solid rgba(255, 135, 65, 0.32);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(255, 85, 25, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff6f0;
  text-align: left;
  overflow: hidden;
  animation: swal2ToastIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.swal2-toast.swal2-closing {
  animation: swal2ToastOut 0.18s ease-in forwards;
}
.swal2-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.swal2-toast .swal2-icon {
  width: 38px;
  height: 38px;
  margin: 0;
}
.swal2-icon svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.swal2-toast .swal2-icon svg {
  width: 22px;
  height: 22px;
}
.swal2-icon.swal2-success {
  background: rgba(16, 185, 129, 0.14);
  border: 2px solid rgba(52, 211, 153, 0.48);
  color: #34d399;
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.25);
}
.swal2-icon.swal2-error {
  background: rgba(239, 68, 68, 0.14);
  border: 2px solid rgba(248, 113, 113, 0.5);
  color: #f87171;
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.25);
}
.swal2-icon.swal2-warning {
  background: rgba(245, 158, 11, 0.14);
  border: 2px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.22);
}
.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  background: rgba(255, 106, 36, 0.15);
  border: 2px solid rgba(255, 145, 75, 0.5);
  color: #ff944d;
  box-shadow: 0 0 26px rgba(255, 106, 36, 0.25);
}
.swal2-icon.swal2-loading {
  border: 3px solid rgba(255, 145, 75, 0.22);
  border-top-color: #ff7a35;
  animation: swal2Spin 0.8s linear infinite;
}
.swal2-icon path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: swal2Stroke 0.38s ease-out 0.08s forwards;
}
.swal2-title {
  margin: 0 0 8px;
  font-size: 1.24rem;
  font-weight: 800;
  color: #fff6f0;
  letter-spacing: -0.01em;
}
.swal2-toast .swal2-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}
.swal2-text {
  margin: 0;
  font-size: 0.94rem;
  color: #d6b4a4;
  line-height: 1.55;
  word-break: break-word;
}
.swal2-toast .swal2-text {
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.swal2-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.swal2-btn {
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.swal2-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.swal2-confirm {
  background: linear-gradient(135deg, #e63c12, #ff6a24 55%, #ff9d3b);
  border: 1px solid rgba(255, 200, 150, 0.45);
  color: #160703;
  box-shadow: 0 8px 24px rgba(255, 80, 20, 0.35);
}
.swal2-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 160, 110, 0.24);
  color: #ebd0c4;
}
.swal2-timer-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3.5px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.swal2-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff511a, #ffae42);
  transform-origin: left center;
  animation: swal2Progress linear forwards;
}
@keyframes swal2FadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes swal2FadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes swal2PopIn {
  0% { opacity: 0; transform: scale(0.86) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes swal2PopOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.92); }
}
@keyframes swal2ToastIn {
  0% { opacity: 0; transform: translateX(36px) scale(0.95); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes swal2ToastOut {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(36px); }
}
@keyframes swal2Stroke {
  to { stroke-dashoffset: 0; }
}
@keyframes swal2Spin {
  to { transform: rotate(360deg); }
}
@keyframes swal2Progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ============ Key Purchase & Order History Enhancements ============ */
.billing-summary-grid {
  margin-bottom: 18px;
}
.order-filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(10, 5, 4, 0.72);
  border: 1px solid rgba(255, 140, 75, 0.18);
  flex-wrap: wrap;
}
.order-filter-btn {
  padding: 6px 12px;
  min-block-size: 32px !important;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.16s ease;
}
.order-filter-btn:hover {
  color: var(--ink);
}
.order-filter-btn.active {
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.28), rgba(255, 138, 61, 0.18));
  border-color: rgba(255, 138, 61, 0.42);
  color: #fff6f0;
  box-shadow: 0 4px 12px rgba(230, 60, 18, 0.22);
}
.order-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  margin-right: 4px;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 140, 75, 0.3);
  color: #ffb07c;
}
.order-type-badge.renewal {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
}
.order-type-badge.trial {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.order-key-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.order-key-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  background: rgba(255, 122, 53, 0.12);
  border: 1px solid rgba(255, 140, 75, 0.25);
  color: #ffd3b6;
  font-size: 0.8rem;
}

/* ============ Admin Settings Center & Member Announcement / Bank Card ============ */
.settings-stack {
  display: grid;
  gap: 20px;
}
.system-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  align-items: stretch;
}
.system-top-grid.single-col {
  grid-template-columns: 1fr;
}
.system-top-grid > .panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.settings-toggle-grid label.check,
.bot-channel-box label.check,
#settings-form > label.check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(18, 9, 6, 0.85), rgba(10, 5, 4, 0.9));
  border: 1px solid rgba(255, 140, 75, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-toggle-grid label.check:hover,
.bot-channel-box label.check:hover,
#settings-form > label.check:hover {
  border-color: rgba(255, 140, 75, 0.44);
  background: linear-gradient(160deg, rgba(28, 13, 8, 0.9), rgba(14, 7, 5, 0.94));
  transform: translateY(-1px);
}
.settings-toggle-grid label.check:has(input:checked),
.bot-channel-box label.check:has(input:checked),
#settings-form > label.check:has(input:checked) {
  border-color: rgba(74, 222, 128, 0.38);
  background: linear-gradient(160deg, rgba(14, 28, 18, 0.55), rgba(10, 8, 6, 0.9));
  box-shadow: 0 10px 24px -16px rgba(34, 197, 94, 0.35);
}
.settings-toggle-grid label.check input[type="checkbox"],
.bot-channel-box label.check input[type="checkbox"],
#settings-form > label.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 140, 75, 0.28);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  margin: 0;
}
.settings-toggle-grid label.check input[type="checkbox"]::after,
.bot-channel-box label.check input[type="checkbox"]::after,
#settings-form > label.check input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d6c5bc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease;
}
.settings-toggle-grid label.check input[type="checkbox"]:checked,
.bot-channel-box label.check input[type="checkbox"]:checked,
#settings-form > label.check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(134, 239, 172, 0.6);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}
.settings-toggle-grid label.check input[type="checkbox"]:checked::after,
.bot-channel-box label.check input[type="checkbox"]:checked::after,
#settings-form > label.check input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background: #ffffff;
}
.settings-toggle-grid label.check span,
.bot-channel-box label.check span,
#settings-form > label.check span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-toggle-grid label.check strong,
.bot-channel-box label.check strong,
#settings-form > label.check strong {
  color: #fff6f0;
  font-size: 0.9rem;
}
.settings-toggle-grid label.check small,
.bot-channel-box label.check small,
#settings-form > label.check small {
  font-size: 0.78rem;
  line-height: 1.45;
}
.settings-toggle-grid label.check.warn-check {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(160deg, rgba(35, 22, 6, 0.65), rgba(12, 6, 4, 0.9));
}
.settings-toggle-grid label.check.warn-check:has(input:checked) {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(160deg, rgba(60, 32, 6, 0.72), rgba(18, 9, 5, 0.92));
}
.settings-toggle-grid label.check.warn-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: rgba(253, 224, 71, 0.6);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.maintenance-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-top: 16px;
}
.maint-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(22, 11, 7, 0.88), rgba(10, 5, 4, 0.94));
  border: 1px solid rgba(255, 140, 75, 0.22);
  box-shadow: 0 10px 26px -18px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.maint-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 122, 53, 0.85), rgba(245, 166, 35, 0.45), transparent);
}
.maint-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 75, 0.42);
  box-shadow: 0 16px 30px -16px rgba(230, 60, 18, 0.32);
}
.maint-card strong {
  display: block;
  color: #fff6f0;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.maint-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}
.maint-card button {
  align-self: stretch;
  width: 100%;
  justify-content: center;
}
.maint-card .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.maint-card .actions button {
  width: 100%;
  margin: 0;
}

.source-item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(14, 7, 5, 0.78) !important;
  border: 1px solid rgba(255, 140, 75, 0.2) !important;
  transition: all 0.2s ease;
}
.source-item-card.is-disabled {
  opacity: 0.68;
  border-color: rgba(248, 113, 113, 0.3) !important;
  background: rgba(30, 10, 10, 0.55) !important;
}
.source-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.source-item-top strong {
  flex: 1;
  font-size: 0.92rem;
  color: #fff6f0;
}
.source-dot.off {
  background: #f87171 !important;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.5) !important;
}
.source-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.source-item-actions .small-link {
  font-size: 0.78rem;
  color: #ffb07c;
  text-decoration: none;
  font-weight: 600;
}

.member-announcement-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.18), rgba(255, 138, 61, 0.09));
  border: 1px solid rgba(255, 140, 75, 0.38);
  color: #fff6f0;
}
.ann-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(230, 60, 18, 0.35);
  border: 1px solid rgba(255, 140, 75, 0.45);
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffd3b6;
}
.ann-text {
  flex: 1;
  font-size: 0.9rem;
  min-width: 200px;
}
.ann-contact {
  font-size: 0.82rem;
  color: #ffb07c;
}

.bank-info-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(12, 6, 4, 0.76);
  border: 1px solid rgba(255, 140, 75, 0.28);
}
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  flex-wrap: wrap;
}
.bank-row span {
  color: var(--muted);
}
.bank-row strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff6f0;
}
.support-contact-box {
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 12px;
  background: rgba(255, 122, 53, 0.1);
  border: 1px solid rgba(255, 140, 75, 0.25);
  font-size: 0.84rem;
  color: #ffd3b6;
}

/* ============ Admin Filter Toolbar & Platform Health Ping Badge ============ */
.admin-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}
.admin-filter-toolbar input[type="search"] {
  flex: 1;
  min-width: 240px;
  margin: 0;
}
.ping-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.ping-badge.ok {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}
.ping-badge.err {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

/* ============ LINE & Telegram Bot Center & Reports Grid ============ */
.bot-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 12px;
}
.bot-channel-box {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(12, 6, 4, 0.72);
  border: 1px solid rgba(255, 140, 75, 0.24);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bot-channel-box h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  color: #fff6f0;
}
.bot-channel-box label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(230, 60, 18, 0.08);
  border: 1px solid rgba(255, 140, 75, 0.2);
  cursor: pointer;
}
.bot-channel-box label.check span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.bot-report-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.bot-commands-help {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(12, 6, 4, 0.65);
  border: 1px dashed rgba(255, 140, 75, 0.3);
  font-size: 0.86rem;
}
.bot-cmd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.bot-cmd-chips code {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 140, 75, 0.28);
  color: #ffd3b6;
  font-size: 0.8rem;
}

/* =========================================================================
   Admin Console v3.2 Redesign — Inferno Glass + Zero-Overflow Responsive
   ========================================================================= */
.admin-ready > main {
  width: calc(100% - 276px);
  max-width: 1520px;
  margin-left: 276px;
  margin-right: auto;
  padding: clamp(18px, 2.2vw, 28px) clamp(16px, 2.6vw, 32px) 52px;
  min-width: 0;
  overflow-x: clip;
}
.admin-panel,
.panel,
.dashboard-grid > *,
.settings-stack > *,
.stats > * {
  min-width: 0;
  max-width: 100%;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  scrollbar-width: thin;
}
.table-wrap table {
  width: 100%;
  min-width: 560px;
}

/* Admin Hero Command Header */
.admin-ready .intro {
  padding: 18px 22px;
  margin-bottom: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.14) 0%, rgba(14, 7, 5, 0.82) 60%);
  border: 1px solid rgba(255, 140, 75, 0.24);
  box-shadow: 0 16px 38px -18px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.intro-head-row {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-ready .intro-head-row {
  justify-content: space-between;
  text-align: left;
}
.admin-ready .intro-head-row > div:first-child {
  min-width: 0;
  flex: 1 1 260px;
}
.admin-intro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Admin Topbar Live Telemetry Pills */
.admin-topbar {
  padding: 0 clamp(14px, 2.4vw, 32px);
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.admin-live-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.admin-telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  min-block-size: 30px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffd3b6;
  background: rgba(255, 122, 53, 0.12);
  border: 1px solid rgba(255, 140, 75, 0.28);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-telemetry-pill:hover {
  background: rgba(255, 122, 53, 0.22);
  border-color: rgba(255, 140, 75, 0.48);
  color: #fff;
  transform: translateY(-1px);
}
.admin-telemetry-pill.is-on {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(74, 222, 128, 0.36);
}
.admin-status.is-maint {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
}
.admin-status.is-maint i {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

/* Sidebar Subtle Badges */
#admin-nav a b.subtle-badge {
  background: rgba(255, 122, 53, 0.15);
  border: 1px solid rgba(255, 140, 75, 0.28);
  color: #ffccab;
  font-weight: 700;
}

/* Fluid KPI Stats Grid (Supports 4 or 6 cards on any screen width) */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
#admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.stat {
  padding: 18px 18px;
}
.stat strong {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

/* System Settings Sub-Navigation Bar */
.admin-subnav-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: rgba(12, 6, 4, 0.78);
  border: 1px solid rgba(255, 140, 75, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Upgraded Platform Cards with App Logos (Redesigned Executive Control Modules) */
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.source-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: space-between;
  gap: 14px;
  padding: 16px !important;
  border-radius: 18px !important;
  background: linear-gradient(165deg, rgba(24, 12, 8, 0.9), rgba(10, 5, 4, 0.94)) !important;
  border: 1px solid rgba(255, 140, 75, 0.22) !important;
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  opacity: 1 !important;
}
.source-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.85), rgba(255, 122, 53, 0.65), transparent);
  opacity: 0.9;
}
.source-item-card.is-disabled {
  background: linear-gradient(165deg, rgba(18, 10, 10, 0.86), rgba(9, 5, 5, 0.92)) !important;
  border-color: rgba(248, 113, 113, 0.2) !important;
}
.source-item-card.is-disabled::before {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.65), rgba(148, 163, 184, 0.25), transparent);
  opacity: 0.7;
}
.source-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 75, 0.45) !important;
  box-shadow: 0 16px 32px -16px rgba(230, 60, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.source-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.source-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 140, 75, 0.3);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #ffb88c;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.65);
}
.source-logo-wrap[data-fallback]::after {
  content: attr(data-fallback);
}
.source-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}
.source-item-card.is-disabled .source-logo-wrap img {
  filter: grayscale(0.35) brightness(0.88);
}
.source-logo-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #0d0604;
}
.source-logo-dot.on {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}
.source-logo-dot.off {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6);
}
.source-title-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.source-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.source-name-row strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff6f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-code-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 140, 75, 0.18);
  color: #d6b4a1;
  flex-shrink: 0;
}
.source-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.source-live-state {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
}
.source-live-state.on {
  color: #86efac;
}
.source-live-state.off {
  color: #fca5a5;
}
.source-status-pill {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.source-status-pill.on {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.source-status-pill.off {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.32);
}
.source-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 140, 75, 0.12);
}
.source-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.source-tool-btn {
  margin: 0 !important;
  padding: 7px 6px !important;
  border-radius: 10px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #f3d7c8 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 140, 75, 0.18) !important;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.source-tool-btn:hover {
  background: rgba(255, 122, 53, 0.16) !important;
  border-color: rgba(255, 140, 75, 0.42) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}
.source-power-btn {
  width: 100%;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.source-power-btn.is-on {
  color: #fecaca !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(248, 113, 113, 0.28) !important;
}
.source-power-btn.is-on:hover {
  color: #ffffff !important;
  background: rgba(239, 68, 68, 0.24) !important;
  border-color: rgba(248, 113, 113, 0.55) !important;
}
.source-power-btn.is-off {
  color: #140804 !important;
  background: linear-gradient(135deg, #ff7a35, #f5a623) !important;
  border: 1px solid rgba(255, 190, 120, 0.55) !important;
  box-shadow: 0 8px 18px -8px rgba(230, 60, 18, 0.6);
}
.source-power-btn.is-off:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Multi-Screen Responsive Safeguards (No Horizontal Overflow on Any Viewport) */
@media (max-width: 1280px) {
  .admin-live-pills .admin-telemetry-pill:nth-child(3) {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .admin-ready > main {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 18px 16px 42px;
  }
  .admin-topbar {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .admin-live-pills {
    display: none;
  }
  .admin-ready .intro {
    padding: 14px 16px;
  }
  .admin-ready #page-subtitle {
    margin-left: 0;
    margin-top: 6px;
  }
  .admin-intro-actions {
    width: 100%;
  }
  .admin-intro-actions > * {
    flex: 1 1 auto;
    justify-content: center;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head-actions {
    width: 100%;
  }
  .admin-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-filter-toolbar input[type="search"] {
    width: 100%;
    min-width: 0;
  }
  .order-filter-bar {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .order-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .admin-subnav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-subnav-bar .order-filter-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .admin-ready > main {
    padding: 12px 10px 36px;
  }
  .panel {
    padding: 15px 14px;
    border-radius: 16px;
  }
  .stats,
  #admin-stats {
    grid-template-columns: 1fr;
  }
  .source-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Bilingual Switcher (TH / EN)
   ========================================================================= */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: rgba(14, 7, 5, 0.85);
  border: 1px solid rgba(255, 140, 75, 0.28);
  gap: 2px;
  flex-shrink: 0;
}
.lang-btn {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: #bfa596 !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  padding: 4px 9px !important;
  min-height: 26px !important;
  border-radius: 999px !important;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: none !important;
}
.lang-btn:hover {
  color: #ffffff !important;
}
.lang-btn.active {
  background: linear-gradient(135deg, #e63c12, #ff7a35) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(230, 60, 18, 0.45) !important;
}

/* =========================================================================
   Unified SQLite Drama Vault (Poster Grid, Table Posters & Pagination)
   ========================================================================= */
.vault-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.vault-view-switch {
  display: inline-flex;
  background: rgba(14, 7, 5, 0.78);
  border: 1px solid rgba(255, 140, 75, 0.25);
  border-radius: 11px;
  padding: 3px;
  gap: 3px;
}
.vault-view-btn {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: #cbb2a3 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  cursor: pointer;
  box-shadow: none !important;
}
.vault-view-btn.active {
  background: linear-gradient(135deg, #e63c12, #ff7a35) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(230, 60, 18, 0.35) !important;
}

.vault-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 14px;
  background: rgba(16, 8, 5, 0.72);
  border: 1px solid rgba(255, 150, 90, 0.18);
}
.vault-page-info {
  font-size: 13px;
  color: #dbc5b8;
}
.vault-page-info strong {
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.vault-page-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.vault-page-btn {
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 160, 100, 0.18) !important;
  color: #f3e6de !important;
  cursor: pointer;
  transition: all 0.16s ease;
}
.vault-page-btn:hover:not(:disabled) {
  border-color: rgba(255, 122, 53, 0.55) !important;
  background: rgba(255, 122, 53, 0.14) !important;
  color: #fff !important;
}
.vault-page-btn.active {
  background: linear-gradient(135deg, #e63c12, #ff7a35) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(230, 60, 18, 0.4) !important;
}
.vault-page-btn:disabled {
  opacity: 0.38 !important;
  cursor: not-allowed !important;
}
.vault-page-dots {
  color: #9e8476;
  padding: 0 4px;
  font-weight: 700;
}

.vault-poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr));
  gap: 16px;
  margin-top: 12px;
}
.vault-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(12, 6, 4, 0.82);
  border: 1px solid rgba(255, 150, 90, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.vault-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 53, 0.52);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48), 0 0 22px rgba(230, 60, 18, 0.14);
}
.vault-card-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 2.8;
  background: linear-gradient(145deg, #1d0d08, #0d0604);
  overflow: hidden;
  cursor: pointer;
}
.vault-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease;
}
.vault-card:hover .vault-card-poster {
  transform: scale(1.04);
}
.vault-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(255, 122, 53, 0.22), rgba(12, 6, 4, 0.95));
  color: #ffb38a;
}
.vault-card-fallback strong {
  font-size: 24px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.06em;
}
.vault-card-fallback small {
  font-size: 12px;
  color: #cbaea0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vault-card-badges-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.vault-badge-app {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(10, 5, 3, 0.86);
  border: 1px solid rgba(255, 150, 90, 0.35);
  color: #ffd3b6;
  backdrop-filter: blur(6px);
}
.vault-badge-app img {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  object-fit: cover;
}
.vault-badge-speed {
  padding: 3px 8px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.9);
  color: #042f1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.vault-badge-speed.catalog-only {
  background: rgba(245, 158, 11, 0.9);
  color: #2c1602;
}
.vault-card-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 10px 8px;
  background: linear-gradient(to top, rgba(6, 3, 2, 0.96) 15%, rgba(6, 3, 2, 0.55) 65%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.vault-ep-pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 122, 53, 0.25);
  border: 1px solid rgba(255, 140, 75, 0.45);
  padding: 2px 8px;
  border-radius: 7px;
}
.vault-card-body {
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.vault-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
  color: #fff5ee;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.vault-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: #b79c8e;
}
.vault-id-chip {
  appearance: none;
  border: 1px solid rgba(255, 160, 100, 0.2) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e6cbbd !important;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px !important;
  padding: 2px 7px !important;
  min-height: 22px !important;
  border-radius: 6px !important;
  cursor: pointer;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vault-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}
.vault-card-actions button {
  font-size: 11.5px !important;
  padding: 6px 8px !important;
  min-height: 31px !important;
  justify-content: center;
}
.vault-card-actions .vault-btn-full {
  grid-column: 1 / -1;
}

.vault-table-media {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}
.vault-table-poster-box {
  position: relative;
  width: 52px;
  height: 74px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #22100a, #0e0604);
  border: 1px solid rgba(255, 160, 100, 0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #ff9b6a;
}
.vault-table-poster-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ============ Redesigned SQLite Drama Vault Enhancements ============ */
dialog.modal-wide {
  width: 980px;
  max-width: calc(100vw - 24px);
}

.vault-job-banner {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.16), rgba(16, 8, 5, 0.92));
  border: 1px solid rgba(255, 130, 65, 0.42);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.vault-job-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.vault-job-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vault-job-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e63c12, #ff9a44, #22c55e);
  transition: width 0.35s ease;
}

.vault-bulk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(255, 122, 53, 0.06);
  border: 1px solid rgba(255, 150, 90, 0.18);
}
.vault-bulk-left,
.vault-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vault-card.is-selected {
  border-color: #ff7a35;
  box-shadow: 0 0 0 2px rgba(255, 122, 53, 0.45), 0 12px 28px rgba(0, 0, 0, 0.5);
}
.vault-card-select-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(10, 5, 3, 0.85);
  border: 1px solid rgba(255, 160, 100, 0.45);
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
}
.vault-card-select-label input {
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  cursor: pointer;
  accent-color: #ff6a2b;
}

.vault-plat-progress {
  margin: 8px 0 4px;
}
.vault-plat-progress-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vault-plat-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff6a2b, #22c55e);
}

/* =========================================================================
   120 FPS Ultra-Smooth Compositor & Scroll Optimization
   ========================================================================= */
.inf-atmosphere {
  background:
    radial-gradient(600px circle at 10% 10%, rgba(196, 42, 10, 0.22), transparent 65%),
    radial-gradient(500px circle at 88% 85%, rgba(122, 19, 16, 0.2), transparent 60%),
    radial-gradient(400px circle at 75% 35%, rgba(212, 118, 26, 0.12), transparent 65%);
  transform: translateZ(0);
}
.inf-atmosphere::before,
.inf-atmosphere::after,
.inf-atmosphere .orb3,
.inf-noise,
.inf-sparks {
  display: none !important;
  animation: none !important;
}
.panel,
.stat,
.member-hero-bar,
.key-card,
.plan,
.source-card,
.vault-card,
.maint-card,
#message {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: rgba(14, 7, 5, 0.92);
}
.vault-card,
.source-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

/* =========================================================================
   EXECUTIVE ADMIN COMMAND CENTER — REDESIGNED HOME DASHBOARD (v4.1)
   ========================================================================= */
.exec-hero-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 26px;
  margin-bottom: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 130, 60, 0.28);
  background:
    radial-gradient(640px circle at 0% 0%, rgba(230, 60, 18, 0.22), transparent 65%),
    radial-gradient(520px circle at 100% 100%, rgba(245, 166, 35, 0.13), transparent 60%),
    linear-gradient(145deg, rgba(20, 10, 7, 0.96), rgba(11, 6, 4, 0.96));
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.exec-banner-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 160, 100, 0.14);
}
.exec-banner-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.exec-banner-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.exec-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.exec-live-pill,
.exec-role-pill,
.exec-engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.exec-live-pill.is-live,
.exec-live-pill.ok {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.42);
  color: #4ade80;
}
.exec-live-pill.is-live i,
.exec-live-pill.ok i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}
.exec-live-pill.is-maint,
.exec-live-pill.warn {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
}
.exec-live-pill.is-maint i,
.exec-live-pill.warn i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}
.exec-role-pill {
  background: rgba(255, 122, 53, 0.16);
  border: 1px solid rgba(255, 122, 53, 0.38);
  color: #ffd3b6;
}
.exec-engine-pill {
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #bae6fd;
}
.exec-banner-title {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(20px, 1.85vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff7f2;
  line-height: 1.28;
}
.exec-banner-title span {
  color: #ff9c66;
}
.exec-banner-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--inf-text-sec);
}
.exec-banner-sub strong {
  color: #ffffff;
}
.exec-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.exec-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f8ede6;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 160, 100, 0.22);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.exec-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 140, 66, 0.55);
  background: rgba(255, 122, 53, 0.16);
  color: #ffffff;
}
.exec-action-btn.ghost {
  padding: 6px 12px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.03);
}
.exec-action-btn.primary {
  background: linear-gradient(135deg, #e63c12, #ff7a35);
  border-color: rgba(255, 160, 100, 0.55);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(230, 60, 18, 0.34);
}
.exec-action-btn.primary:hover {
  background: linear-gradient(135deg, #f2481d, #ff8b4d);
}
.exec-action-btn.accent-cyan {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.42);
  color: #bae6fd;
}
.exec-action-btn.accent-cyan:hover {
  background: rgba(14, 165, 233, 0.26);
  border-color: rgba(56, 189, 248, 0.72);
  color: #ffffff;
}

/* 6 Interactive Bento KPI Cards — Forced 3x2 Spacious Grid on Desktop */
#admin-stats.admin-bento-stats,
.admin-bento-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 18px !important;
}
.bento-stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(22, 11, 8, 0.96), rgba(12, 6, 5, 0.96));
  border: 1px solid rgba(255, 160, 100, 0.18);
  text-decoration: none;
  color: var(--inf-text);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.bento-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63c12, #f5a623);
  opacity: 0.9;
}
.bento-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 138, 76, 0.48);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
}
.bento-stat-card.accent-gold::before { background: linear-gradient(90deg, #f59e0b, #fde047); }
.bento-stat-card.accent-amber::before { background: linear-gradient(90deg, #f97316, #facc15); }
.bento-stat-card.accent-emerald::before { background: linear-gradient(90deg, #10b981, #4ade80); }
.bento-stat-card.accent-ember::before { background: linear-gradient(90deg, #e63c12, #ff7a35); }
.bento-stat-card.accent-cyan::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.bento-stat-card.accent-purple::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.bento-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bento-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 122, 53, 0.13);
  border: 1px solid rgba(255, 122, 53, 0.28);
  font-size: 18px;
  color: #ff9c66;
  flex-shrink: 0;
}
.bento-stat-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--inf-text-sec);
}
.bento-stat-pill.is-alert,
.bento-stat-pill.warn {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde047;
}
.bento-stat-pill.is-ok,
.bento-stat-pill.ok {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.36);
  color: #4ade80;
}
.bento-stat-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bento-stat-body strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
}
.bento-stat-body span {
  font-size: 13px;
  font-weight: 600;
  color: #e4cfc2;
}
.bento-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.bento-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6a2b, #22c55e);
}
.bento-stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  color: var(--inf-text-muted);
}
.bento-stat-foot small {
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bento-cta {
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  color: #ff9c66;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}
.bento-stat-card:hover .bento-cta {
  color: #ffc299;
  transform: translateX(2px);
}

/* Command & Operations Grids */
.exec-command-grid,
.exec-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}
.exec-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px !important;
}
.exec-panel-fullwidth {
  width: 100% !important;
  margin-bottom: 20px !important;
}
.exec-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 160, 100, 0.12);
}
.exec-section-head h2 {
  font-size: 17.5px !important;
  margin: 2px 0 0 !important;
  line-height: 1.25;
}
.exec-section-head .section-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.idrama-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.idrama-interval-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 122, 53, 0.28);
  border-radius: 9px;
  padding: 2px 8px;
  transition: all 0.2s ease;
}

.idrama-interval-picker:hover {
  border-color: rgba(255, 122, 53, 0.55);
  background: rgba(255, 122, 53, 0.08);
}

.idrama-picker-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffb885;
  white-space: nowrap;
}

.idrama-interval-picker select {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 4px 6px 4px 2px !important;
  margin: 0 !important;
  cursor: pointer;
  outline: none !important;
}

.idrama-interval-picker select option {
  background: #181110;
  color: #ffffff;
}

.inf-btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

.inf-btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-1px);
}

.btn-micro-repair {
  appearance: none;
  background: rgba(230, 60, 18, 0.22);
  border: 1px solid rgba(255, 122, 53, 0.45);
  color: #ff9d66 !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
}
.btn-micro-repair:hover {
  background: var(--inf-gradient);
  color: #1a0606 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(230, 60, 18, 0.4);
}
.badge-fresh {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

/* iDrama SQLite Vault & Auto-Cron Hub */
.idrama-hub-summary {
  padding: 16px 18px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(56, 189, 248, 0.24);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}
.idrama-hub-summary.is-live-running {
  border-color: rgba(255, 100, 30, 0.45);
  box-shadow: 0 0 24px rgba(230, 60, 18, 0.16);
  background: radial-gradient(circle at 10% 20%, rgba(230, 60, 18, 0.08), rgba(255, 255, 255, 0.02) 65%);
}
.idrama-live-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.idrama-status-left,
.idrama-status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.idrama-live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: live-pulse-anim 1.2s infinite ease-in-out;
}
@keyframes live-pulse-anim {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px #f87171; }
  100% { transform: scale(0.85); opacity: 0.6; }
}
.idrama-status-idle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  font-size: 11.5px;
  font-weight: 600;
}
.idle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
.idrama-phase-pill {
  font-size: 12px;
  color: var(--inf-text-muted);
}
.idrama-phase-pill.highlight {
  color: #ffb885;
  font-weight: 600;
}
.idrama-proxy-pill {
  font-size: 11px;
  color: #86efac;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.idrama-proxy-pill strong {
  font-family: 'JetBrains Mono', monospace;
  color: #ffffff;
}
.idrama-proxy-pill.is-direct {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}
.idrama-countdown-pill {
  font-size: 11.5px;
  color: #cbd5e1;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.idrama-countdown-pill strong {
  font-family: 'JetBrains Mono', monospace;
  color: #ff9d54;
  font-size: 12.5px;
}
.idrama-pct-badge {
  padding: 4px 11px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.42);
  color: #4ade80;
}
.idrama-pct-badge.is-running {
  background: rgba(255, 122, 53, 0.18);
  border-color: rgba(255, 122, 53, 0.45);
  color: #ffab7a;
}
.idrama-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 12px;
}
.idrama-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #22c55e);
  transition: width 0.3s ease;
}
.idrama-progress-bar.is-animated-stripes i {
  background: repeating-linear-gradient(
    45deg,
    #e63c12,
    #e63c12 10px,
    #ff8038 10px,
    #ff8038 20px
  );
  background-size: 200% 100%;
  animation: progress-stripes 2s linear infinite;
}
@keyframes progress-stripes {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
.idrama-live-active-card {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 122, 53, 0.07);
  border: 1px solid rgba(255, 122, 53, 0.25);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.idrama-active-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.idrama-active-step {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.idrama-active-title {
  color: #fff;
  font-weight: 700;
}
.idrama-live-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}
.idrama-live-chips span {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.idrama-live-chips span.highlight {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-weight: 700;
}
.idrama-kpi-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.idrama-mini-box {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 160, 100, 0.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.idrama-mini-box span {
  font-size: 11px;
  color: var(--inf-text-muted);
}
.idrama-mini-box strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: #ffffff;
}
.idrama-mini-box small {
  font-size: 10.5px;
  color: var(--inf-text-sec);
  line-height: 1.3;
}
.idrama-hub-bottom-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}
.idrama-terminal-card {
  border-radius: 14px;
  background: rgba(6, 4, 6, 0.85);
  border: 1px solid rgba(255, 122, 53, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.idrama-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(20, 10, 8, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  flex-wrap: nowrap;
}
.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #475569;
}
.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }
.terminal-title {
  font-weight: 700;
  color: #e2e8f0;
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.terminal-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  white-space: nowrap;
}
.terminal-badge.is-live {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  animation: live-pulse-anim 1.5s infinite ease-in-out;
}
.idrama-terminal-console {
  padding: 12px 14px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.term-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #cbd5e1;
  word-break: break-word;
}
.term-time {
  color: #64748b;
  font-size: 10.5px;
  flex-shrink: 0;
}
.term-icon {
  flex-shrink: 0;
}
.term-text {
  flex: 1;
}
.term-line.kind-step .term-text {
  color: #38bdf8;
  font-weight: 600;
}
.term-line.kind-success .term-text {
  color: #86efac;
}
.term-line.kind-warn .term-text {
  color: #fcd34d;
}
.term-line.term-empty {
  color: #94a3b8;
  padding: 12px 6px;
  font-style: italic;
}
.idrama-recent-unlocked {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
}
.idrama-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: #f8ede6;
  margin-bottom: 10px;
}
.idrama-unlocked-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.idrama-unlocked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.idrama-unlocked-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.idrama-book-code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 122, 53, 0.28);
  color: #ffab7a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  flex-shrink: 0;
}
.idrama-unlocked-item strong {
  color: #f8ede6;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .idrama-hub-bottom-split {
    grid-template-columns: 1fr;
  }
  .idrama-kpi-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Infrastructure & Security Health Stack */
.exec-health-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
  justify-content: space-between;
}
.exec-health-card {
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 160, 100, 0.14);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.exec-health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.exec-health-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}
.health-kpi-strip {
  display: grid;
  gap: 8px;
}
.health-kpi-strip.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.health-kpi-strip.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.health-kpi-chip {
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.health-kpi-chip span {
  font-size: 11px;
  color: var(--inf-text-muted);
  white-space: nowrap;
}
.health-kpi-chip strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}
.health-kpi-chip strong.text-emerald { color: #4ade80; }
.health-kpi-chip strong.text-amber { color: #fbbf24; }
.health-kpi-chip strong.text-danger { color: #f87171; }
.health-kpi-chip strong.text-cyan { color: #38bdf8; }

.exec-health-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.health-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--inf-text-sec);
}
.health-tag b {
  color: #ffd3b6;
}

/* Live Order & Slip Verification Queue */
.exec-order-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.exec-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 160, 100, 0.13);
  transition: border-color 0.16s ease;
}
.exec-order-row.is-pending-slip {
  border-color: rgba(245, 158, 11, 0.48);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(0, 0, 0, 0.36));
}
.exec-order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.exec-order-title,
.exec-order-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.exec-order-title code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #ffd3b6;
}
.exec-order-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

/* Recent Audit Feed inside Module Hub */
.exec-recent-audit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 160, 100, 0.12);
}
.exec-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.exec-audit-head strong {
  font-size: 12.5px;
  color: #f8ede6;
}
.exec-audit-head small {
  font-size: 11px;
  color: var(--inf-text-muted);
}
.exec-audit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exec-audit-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 11.5px;
}
.exec-audit-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.exec-audit-body div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exec-audit-body small {
  color: var(--inf-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1260px) {
  #admin-stats.admin-bento-stats,
  .admin-bento-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .exec-command-grid,
  .exec-ops-grid {
    grid-template-columns: 1fr;
  }
  .exec-banner-main-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .exec-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .exec-hero-banner {
    padding: 18px;
  }
  .exec-banner-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  #admin-stats.admin-bento-stats,
  .admin-bento-stats,
  .idrama-kpi-mini-grid,
  .health-kpi-strip.cols-3,
  .health-kpi-strip.cols-4 {
    grid-template-columns: 1fr !important;
  }
  .exec-order-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   SYSTEM-WIDE LAYOUT & TYPOGRAPHY MASTER POLISH (v5.0)
   Covers: Member Portal (/account), All 11 Admin Pages (/admin/*),
   System Status (/status), Tables, KPI Grids, Forms, Plans & Modals
   ========================================================================== */

/* 1. Global Typography Rhythm & Readability */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  color: #ffffff;
}

p.muted,
.muted {
  line-height: 1.58;
  color: var(--inf-text-sec);
}

code {
  font-family: 'JetBrains Mono', monospace;
}

/* 2. Admin Sub-Page Intro Banner (/admin/payments, /members, /apikeys, etc.) */
.admin-ready .intro {
  margin: 0 0 18px !important;
  padding: 20px 24px !important;
  border-radius: 18px !important;
  background:
    radial-gradient(480px circle at 100% 0%, rgba(230, 60, 18, 0.14), transparent 65%),
    linear-gradient(165deg, rgba(24, 12, 9, 0.96), rgba(11, 5, 4, 0.98)) !important;
  border: 1px solid rgba(255, 145, 80, 0.24) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.admin-ready .intro-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-ready .intro h1 {
  font-size: clamp(1.32rem, 2vw, 1.72rem) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 4px 0 0 !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-ready #page-subtitle {
  margin: 8px 0 0 0 !important;
  max-width: 82ch;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: var(--inf-text-sec) !important;
}

/* 3. Universal KPI Stats Grid (.stats & .stat) Across All Pages */
.stats:not(.admin-bento-stats) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  margin: 14px 0 20px !important;
}

.stats:not(.admin-bento-stats) > .stat {
  position: relative;
  padding: 18px 20px !important;
  border-radius: 16px !important;
  background:
    radial-gradient(240px circle at 100% 0%, rgba(255, 122, 53, 0.09), transparent 70%),
    linear-gradient(165deg, rgba(22, 11, 8, 0.95), rgba(11, 5, 4, 0.98)) !important;
  border: 1px solid rgba(255, 150, 90, 0.2) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 112px !important;
  overflow: hidden;
}

.stats:not(.admin-bento-stats) > .stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63c12, #ff7a35, #f5a623);
  opacity: 0.85;
}

.stats:not(.admin-bento-stats) > .stat .stat-top {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 5px !important;
  min-width: 0;
}

.stats:not(.admin-bento-stats) > .stat strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  font-size: clamp(1.32rem, 1.75vw, 1.68rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
  color: #ffffff !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

.stats:not(.admin-bento-stats) > .stat span {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.38 !important;
  color: #f3e4dc !important;
}

.stats:not(.admin-bento-stats) > .stat .stat-sub,
.stats:not(.admin-bento-stats) > .stat > small {
  margin-top: auto !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  font-size: 11.5px !important;
  line-height: 1.42 !important;
  color: var(--inf-text-muted) !important;
  display: block;
}

/* 4. Panels, Cards & Section Headers (.panel, .section-head) */
.panel {
  padding: 22px 24px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 145, 80, 0.2) !important;
}

.admin-tab-panel > .panel + .panel,
.member-tab-panel > .panel + .panel {
  margin-top: 18px !important;
}

.panel > .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 160, 100, 0.12);
}

.panel > .section-head > div:first-child {
  min-width: 0;
  flex: 1 1 280px;
}

.section-head h2,
.panel > h2 {
  font-size: clamp(1.08rem, 1.35vw, 1.26rem) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.015em !important;
  margin: 2px 0 0 !important;
  color: #ffffff;
}

.section-head .eyebrow {
  margin: 0 0 3px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

.section-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

/* 5. Framed Data Tables & Action Cells (.table-wrap, table, th, td) */
.table-wrap {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 160, 100, 0.16);
  background: rgba(8, 4, 3, 0.52);
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.table-wrap thead th {
  background: rgba(255, 122, 53, 0.075);
  padding: 13px 14px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd5ba;
  border-bottom: 1px solid rgba(255, 160, 100, 0.18);
  white-space: nowrap;
  text-align: left;
}

.table-wrap tbody td {
  padding: 13px 14px;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.48;
  color: var(--inf-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

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

.table-wrap tbody tr:hover td {
  background: rgba(255, 122, 53, 0.045);
}

.table-wrap td .actions,
.table-wrap td.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-wrap td small.muted {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.38;
}

/* 6. Filter Toolbars & Sub-Navigation Bars */
.admin-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 160, 100, 0.13);
}

.admin-filter-toolbar > input[type="search"],
.admin-filter-toolbar > input[type="text"] {
  flex: 1 1 240px;
  min-width: 200px;
  margin: 0 !important;
}

.admin-filter-toolbar > select {
  flex: 0 1 auto;
  min-width: 170px;
  margin: 0 !important;
}

.order-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.admin-subnav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px !important;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(14, 7, 5, 0.85);
  border: 1px solid rgba(255, 150, 90, 0.16);
}

/* 7. Forms, Labels & Settings Toggle Grids (.form-grid, .settings-toggle-grid) */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 14px 16px !important;
  align-items: end;
  margin-bottom: 14px;
}

.form-grid > label,
form > label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #f3e4dc;
}

.form-grid > label {
  margin: 0 !important;
}

.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  background: rgba(0, 0, 0, 0.34) !important;
  border: 1px solid rgba(255, 160, 100, 0.16) !important;
  margin: 0 !important;
}

.toggle-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.toggle-card small {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: var(--inf-text-sec);
}

/* 8. Member Portal (/account) — Hero, Tabs, Plans, Key Cards & Billing */
.member-hero-bar {
  padding: 20px 24px !important;
  border-radius: 18px !important;
  margin-bottom: 16px !important;
}

.member-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px !important;
}

.plans {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
  margin-top: 16px !important;
}

.plan {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 22px 20px !important;
  border-radius: 16px !important;
}

.plan-features {
  margin: 14px 0 18px !important;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.key-card {
  padding: 18px 20px !important;
  border-radius: 16px !important;
}

.key-quotas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 12px 0;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  align-items: stretch;
}

/* 9. Admin Shortcuts Grid (#admin-shortcuts) */
.admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)) !important;
  gap: 10px !important;
}

.admin-shortcuts > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px !important;
  border-radius: 13px !important;
}

.admin-shortcuts > a > div {
  min-width: 0;
  flex: 1;
}

.admin-shortcuts > a strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.admin-shortcuts > a small {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--inf-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 10. Responsive Adjustments for Member & Admin Sub-Pages */
@media (max-width: 960px) {
  .member-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel {
    padding: 18px !important;
  }
}

@media (max-width: 640px) {
  .member-tabs {
    grid-template-columns: 1fr;
  }
  .stats:not(.admin-bento-stats) {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   API KEY MANAGEMENT & DIRECT ISSUE MODAL REDESIGN (v6.0)
   Covers: #admin-keys-panel, #admin-keys, issue-key, admin-edit-key, admin-extend
   ========================================================================== */

/* 1. Admin Keys Table Cells & Quota Bars */
.admin-key-identity {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 210px;
}

.admin-key-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-key-code {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 122, 53, 0.12);
  border: 1px solid rgba(255, 122, 53, 0.28);
  color: #ffbe98;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.8px;
  font-weight: 600;
  user-select: all;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-key-code:hover {
  background: rgba(255, 122, 53, 0.24);
  border-color: rgba(255, 122, 53, 0.5);
  color: #fff;
}

.key-copy-inline {
  padding: 3px 8px !important;
  min-height: 24px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

.admin-key-owner {
  font-size: 13px;
  color: #f8ede6;
}

.key-meta-line {
  font-size: 11.8px;
  color: var(--inf-text-sec);
  margin-top: 3px;
}

.key-meta-line code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffd3b6;
  font-size: 11px;
}

.key-meta-sub {
  font-size: 11.2px;
  color: var(--inf-text-muted);
}

.admin-key-scope {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.admin-key-plan-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.key-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(255, 122, 53, 0.14);
  border: 1px solid rgba(255, 122, 53, 0.32);
  color: #ffbe98;
}

.key-tier-badge.is-unlimited {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(230, 60, 18, 0.24));
  border-color: rgba(251, 191, 36, 0.52);
  color: #fde68a;
}

.key-tier-badge.is-pro {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.36);
  color: #bae6fd;
}

.key-tier-badge.is-trial {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.34);
  color: #a7f3d0;
}

.key-rate-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--inf-text-muted);
}

.key-scope-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11.3px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.34);
  color: #6ee7b7;
}

.key-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.key-app-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #f3e4dc;
}

.key-app-mini img {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  object-fit: cover;
}

.key-app-more {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 122, 53, 0.12);
  color: #ffab7a;
  font-size: 10.8px;
  font-weight: 700;
}

.key-ip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.key-ip-badge {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--inf-text-sec);
}

.key-ip-badge.is-full {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.key-ip-chip {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.8px;
  color: #ffd3b6;
}

.key-rem-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.key-rem-tag.is-ok,
.key-rem-tag.is-long {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.key-rem-tag.is-soon {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.key-rem-tag.is-expired,
.key-rem-tag.is-revoked {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.admin-quota-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 185px;
}

.admin-quota-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

.admin-quota-head span {
  color: var(--inf-text-muted);
}

.admin-quota-head strong {
  color: #ffffff;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 11.8px;
}

.admin-quota-head small {
  color: #ffab7a;
  font-weight: 600;
}

.admin-quota-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.admin-quota-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
}

.admin-quota-bar > i.is-heavy {
  background: linear-gradient(90deg, #e63c12, #ff7a35, #f5a623);
}

.admin-quota-bar > i.is-warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.admin-quota-bar > i.is-crit {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.key-guard-reason {
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fcd34d;
  font-size: 11px;
}

.admin-key-actions {
  min-width: 195px;
}

/* 2. Direct Issue API Key & Edit Key Modals (.issue-key-form) */
.issue-key-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.issue-step-card {
  padding: 16px 18px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 150, 90, 0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.issue-step-head > div {
  flex: 1 1 240px;
  min-width: 0;
}

.issue-step-head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.issue-step-head small.muted {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.issue-step-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e63c12, #ff7a35);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(230, 60, 18, 0.35);
}

.issue-member-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.4fr);
  gap: 10px;
}

.issue-member-row input,
.issue-member-row select {
  margin: 0 !important;
}

/* Interactive Plan Cards inside Issue Key Modal */
.issue-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 10px;
}

.issue-plan-card {
  text-align: left;
  padding: 12px 14px !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
  box-shadow: none !important;
}

.issue-plan-card:hover {
  border-color: rgba(255, 140, 75, 0.45) !important;
  transform: translateY(-1px);
}

.issue-plan-card.active {
  background: linear-gradient(145deg, rgba(230, 60, 18, 0.24), rgba(245, 158, 11, 0.14)) !important;
  border-color: #ff7a35 !important;
  box-shadow: 0 8px 22px rgba(230, 60, 18, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.issue-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.issue-plan-top strong {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.issue-plan-scope-pill {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: #ffd3b6;
  white-space: nowrap;
}

.issue-plan-scope-pill.all {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.issue-plan-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.2px;
  color: var(--inf-text-sec);
}

/* Quick Duration Preset Chips */
.issue-days-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr));
  gap: 8px;
}

.issue-day-chip {
  padding: 8px 10px !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: none !important;
}

.issue-day-chip strong {
  font-size: 12.8px;
  font-weight: 800;
  color: #ffffff;
}

.issue-day-chip small {
  font-size: 10.5px;
  color: var(--inf-text-muted);
}

.issue-day-chip.active {
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.28), rgba(255, 122, 53, 0.2)) !important;
  border-color: #ff7a35 !important;
}

.issue-day-chip.active small {
  color: #ffd3b6;
}

.issue-expiry-badge {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font-size: 11.8px;
  font-weight: 700;
  white-space: nowrap;
}

/* All Apps Switch & Emerald Banner */
.issue-all-switch {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: #6ee7b7 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.issue-all-switch input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  accent-color: #10b981;
}

.issue-all-apps-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(6, 78, 59, 0.28));
  border: 1px solid rgba(52, 211, 153, 0.42);
}

.issue-all-apps-banner[hidden] {
  display: none !important;
}

.issue-all-apps-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.issue-all-apps-text {
  flex: 1;
  min-width: 0;
}

.issue-all-apps-text strong {
  color: #a7f3d0;
  font-size: 13.5px;
}

.issue-platform-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.issue-platform-toolbar > input[type="search"] {
  flex: 1 1 220px;
  margin: 0 !important;
}

.issue-platform-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.issue-app-counter {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #ffd3b6;
}

.issue-app-counter.is-ok {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.issue-app-counter.is-over {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

/* Summary Bar at Bottom of Issue/Edit Key Modal */
.issue-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.16), rgba(14, 7, 5, 0.92));
  border: 1px solid rgba(255, 140, 75, 0.34);
}

.issue-summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.issue-summary-info span {
  font-size: 11px;
  color: var(--inf-text-muted);
}

.issue-summary-info strong {
  font-size: 13.2px;
  color: #ffffff;
}

.issue-submit-btn {
  padding: 11px 20px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  border-radius: 11px !important;
}

@media (max-width: 720px) {
  .issue-member-row {
    grid-template-columns: 1fr;
  }
  .issue-all-apps-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================================
   ADMIN API KEYS COMMAND CARDS (.ak-card-list & .ak-card) — v7.0
   ============================================================================ */

.admin-keys-container {
  margin-top: 12px;
}

.ak-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ak-card {
  position: relative;
  border-radius: 18px;
  background:
    radial-gradient(420px circle at 0% 0%, rgba(255, 122, 53, 0.09), transparent 70%),
    linear-gradient(165deg, rgba(20, 10, 8, 0.96), rgba(10, 5, 4, 0.98));
  border: 1px solid rgba(255, 140, 75, 0.24);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ak-card:hover {
  border-color: rgba(255, 140, 75, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.52), 0 0 22px rgba(230, 60, 18, 0.12);
}

.ak-card.is-unlimited {
  border-color: rgba(245, 158, 11, 0.36);
  background:
    radial-gradient(480px circle at 0% 0%, rgba(245, 158, 11, 0.12), transparent 68%),
    linear-gradient(165deg, rgba(22, 11, 8, 0.96), rgba(10, 5, 4, 0.98));
}

.ak-card.is-inactive {
  opacity: 0.78;
  border-color: rgba(255, 255, 255, 0.12);
}

.ak-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 140, 75, 0.14);
}

.ak-head-left {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  flex: 1 1 420px;
}

.ak-token-box {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(5, 2, 3, 0.75);
  border: 1px solid rgba(255, 140, 75, 0.3);
  width: fit-content;
  max-width: 100%;
}

.ak-token-icon {
  font-size: 14px;
  line-height: 1;
}

.ak-token-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ffcf9e;
  background: transparent !important;
  border: 0 !important;
  padding: 2px 4px !important;
  user-select: all;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.ak-token-code.is-revealed {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12) !important;
  border-radius: 6px;
  padding: 2px 8px !important;
}

.ak-copy-inline-btn,
.ak-copy-btn {
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #e63c12, #ff7a35) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 165, 110, 0.45) !important;
  box-shadow: 0 3px 10px rgba(230, 60, 18, 0.32) !important;
  cursor: pointer;
}

.ak-copy-inline-btn:hover,
.ak-copy-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button.is-copied {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border-color: rgba(110, 231, 183, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4) !important;
}

.ak-reveal-btn,
.ak-header-btn {
  padding: 4px 9px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 140, 75, 0.24) !important;
  color: #ffd3b6 !important;
}

.ak-reveal-btn:hover,
.ak-header-btn:hover {
  background: rgba(255, 122, 53, 0.18) !important;
  color: #ffffff !important;
}

.ak-owner-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ak-owner-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.2px;
  color: #f3e8e2;
}

.ak-owner-pill strong {
  color: #ffffff;
}

.ak-owner-pill small {
  color: var(--inf-text-muted);
  font-size: 11px;
}

.ak-head-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ak-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 16px;
}

.ak-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 140, 75, 0.13);
  min-width: 0;
}

.ak-tile-title {
  font-size: 11.2px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d8bfb2;
  margin-bottom: 2px;
}

.ak-expiry-date {
  font-size: 13.5px;
  color: #ffffff;
}

.ak-ip-copy-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px !important;
  min-height: 22px !important;
  border-radius: 6px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 140, 75, 0.22) !important;
  color: #ffd3b6 !important;
  cursor: pointer;
}

.ak-ip-copy-btn:hover {
  background: rgba(255, 122, 53, 0.2) !important;
  border-color: rgba(255, 140, 75, 0.45) !important;
  color: #ffffff !important;
}

@media (max-width: 1180px) {
  .ak-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ak-card-grid {
    grid-template-columns: 1fr;
  }
  .ak-card-head {
    padding: 13px 14px;
  }
  .ak-card-grid {
    padding: 12px 14px 14px;
  }
}

/* Duration Dropdown + Stepper (+ / -) Controls */
.issue-duration-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.15fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.issue-duration-dropdown-wrap,
.issue-duration-stepper-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 !important;
}

.issue-duration-dropdown-wrap > span,
.issue-duration-stepper-wrap > span {
  font-size: 12px;
  font-weight: 700;
  color: #e8d5ca;
}

.issue-duration-dropdown-wrap select {
  margin: 0 !important;
  height: 44px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
}

.issue-stepper-bar {
  display: flex;
  align-items: stretch;
  gap: 5px;
  background: rgba(5, 2, 3, 0.72);
  border: 1px solid rgba(255, 140, 75, 0.28);
  border-radius: 12px;
  padding: 4px;
  min-height: 44px;
}

.issue-step-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px !important;
  min-height: 34px !important;
  border-radius: 8px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 140, 75, 0.2) !important;
  color: #ffd3b6 !important;
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
}

.issue-step-btn:hover {
  background: rgba(255, 122, 53, 0.22) !important;
  border-color: rgba(255, 140, 75, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.issue-step-btn.step-main {
  font-size: 17px !important;
  padding: 0 14px !important;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.28), rgba(255, 122, 53, 0.18)) !important;
  border-color: rgba(255, 140, 75, 0.42) !important;
  color: #ffffff !important;
}

.issue-step-btn.step-main.plus {
  background: linear-gradient(135deg, #e63c12, #ff7a35) !important;
  border-color: rgba(255, 175, 120, 0.55) !important;
}

.issue-step-input-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0 8px;
  min-width: 85px;
}

.issue-step-input-box input[type="number"] {
  width: 68px !important;
  min-height: 32px !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

.issue-step-input-box small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--inf-text-muted);
}

@media (max-width: 780px) {
  .issue-duration-control-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Premium Auth Portal Redesign (2-Column Showcase + Luxury Glass Card)
   ========================================================================= */
body:not(.admin-ready) .intro {
  max-width: 760px !important;
  margin: 6px auto 24px !important;
  padding: 14px 16px 6px !important;
  text-align: center !important;
}
body:not(.admin-ready) .intro-head-row {
  justify-content: center !important;
  text-align: center !important;
}
body:not(.admin-ready) .intro-head-row > div:first-child {
  max-width: 680px;
  margin: 0 auto;
}
body:not(.admin-ready) #page-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  text-shadow: 0 10px 30px rgba(230, 60, 18, 0.22);
}
body:not(.admin-ready) #page-subtitle {
  color: #cbb5a8;
  font-size: clamp(14px, 1.35vw, 15.5px);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 580px;
}

.auth-shell {
  max-width: 1060px !important;
  margin: 0 auto 42px !important;
}

.auth-portal-grid {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 26px;
  align-items: stretch;
}

/* Left Column: Showcase Panel */
.auth-showcase.panel {
  margin-bottom: 0 !important;
  padding: 32px 30px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px circle at 0% 0%, rgba(230, 60, 18, 0.20), transparent 65%),
    radial-gradient(420px circle at 100% 100%, rgba(245, 166, 35, 0.14), transparent 65%),
    linear-gradient(160deg, rgba(20, 10, 8, 0.95) 0%, rgba(10, 5, 4, 0.97) 100%) !important;
  border: 1px solid rgba(255, 140, 75, 0.26) !important;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.auth-showcase.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63c12, #ff7a35, #f5a623);
  opacity: 0.9;
}

.auth-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #86efac;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.auth-live-pill .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulseGlow 2.2s infinite;
}

.auth-showcase-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.38rem, 2.1vw, 1.72rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 10px !important;
}

.auth-showcase-title .blaze {
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-showcase-lead {
  color: #c7b0a2;
  font-size: 13.8px;
  line-height: 1.62;
  margin: 0;
}

.auth-feat-list {
  display: grid;
  gap: 12px;
}

.auth-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 150, 90, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-feat-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 122, 53, 0.06);
  border-color: rgba(255, 150, 90, 0.32);
}

.auth-feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.24), rgba(245, 166, 35, 0.16));
  border: 1px solid rgba(255, 140, 75, 0.35);
  color: #ff944d;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(230, 60, 18, 0.35);
}

.auth-feat-icon svg {
  width: 19px;
  height: 19px;
}

.auth-feat-body strong {
  display: block;
  font-size: 13.8px;
  font-weight: 700;
  color: #fff6f0;
  margin-bottom: 3px;
}

.auth-feat-body span {
  display: block;
  font-size: 12.4px;
  line-height: 1.5;
  color: #b9a091;
}

.auth-showcase-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 160, 100, 0.12);
}

.auth-metric {
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(8, 4, 3, 0.55);
  border: 1px solid rgba(255, 150, 90, 0.14);
}

.auth-metric strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  background: var(--inf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.auth-metric span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b49a8b;
}

/* Right Column: Luxury Auth Card */
.auth-card.panel {
  margin-bottom: 0 !important;
  padding: 30px 32px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(460px circle at 100% 0%, rgba(230, 60, 18, 0.15), transparent 60%),
    linear-gradient(165deg, rgba(18, 9, 7, 0.96) 0%, rgba(9, 4, 3, 0.98) 100%) !important;
  border: 1px solid rgba(255, 145, 80, 0.28) !important;
  box-shadow: 0 26px 64px -18px rgba(0, 0, 0, 0.9), 0 0 42px rgba(230, 60, 18, 0.1) !important;
}

.auth-card.panel::before {
  height: 3px;
  background: linear-gradient(90deg, #e63c12, #ff7a35, #f5a623);
}

.auth-form-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-form-orb {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(230, 60, 18, 0.24), rgba(245, 166, 35, 0.16));
  border: 1px solid rgba(255, 140, 75, 0.38);
  color: #ff944d;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px -8px rgba(230, 60, 18, 0.45);
}

.auth-form-orb svg {
  width: 22px;
  height: 22px;
}

.auth-form-head .tag {
  margin-bottom: 6px;
}

.auth-form-head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.auth-form-sub {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.45;
  color: #b9a091;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.auth-field {
  margin-bottom: 15px;
}

.auth-label-text {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #dfcbbd;
  margin-bottom: 6px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .field-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #b89886;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.input-icon-wrap input {
  margin-top: 0 !important;
  padding: 11px 14px 11px 42px !important;
  min-height: 46px;
  border-radius: 12px !important;
  background-color: #120806 !important;
  border: 1px solid rgba(255, 150, 90, 0.22) !important;
  color: #fff6f0 !important;
  font-size: 14px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.input-icon-wrap.has-pwd-toggle input {
  padding-right: 44px !important;
}

.input-icon-wrap input::placeholder {
  color: #7e675b;
}

.input-icon-wrap input:hover {
  border-color: rgba(255, 150, 90, 0.38) !important;
  background-color: #160a07 !important;
}

.input-icon-wrap:focus-within .field-icon {
  color: #ff8a47;
}

.input-icon-wrap input:focus {
  border-color: #ff7a35 !important;
  background-color: #180b08 !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 53, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

/* Fix Chrome/Edge Ugly Grey Autofill Box */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #140907 inset !important;
  -webkit-text-fill-color: #fff6f0 !important;
  caret-color: #ff944d !important;
  border-color: rgba(255, 150, 90, 0.34) !important;
  transition: background-color 9999s ease-out 0s;
}

.pwd-toggle-btn {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  min-block-size: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #b89886 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.pwd-toggle-btn:hover,
.pwd-toggle-btn.is-showing {
  background: rgba(255, 122, 53, 0.14) !important;
  color: #ff944d !important;
}

.pwd-toggle-btn svg {
  width: 17px;
  height: 17px;
}

.auth-submit {
  width: 100%;
  min-height: 48px !important;
  margin-top: 6px;
  border-radius: 12px !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 12px 28px -8px rgba(230, 60, 18, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.auth-submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.auth-submit:hover svg {
  transform: translateX(3px);
}

.auth-security-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 160, 100, 0.1);
  color: #b49a8b;
  font-size: 11.8px;
}

.auth-security-strip svg {
  width: 14px;
  height: 14px;
  color: #86efac;
  flex-shrink: 0;
}

@media (max-width: 920px) {
  .auth-portal-grid {
    grid-template-columns: 1fr;
  }
  .auth-showcase.panel {
    order: 2;
  }
  .auth-card.panel {
    order: 1;
  }
}

@media (max-width: 560px) {
  .auth-field-grid {
    grid-template-columns: 1fr;
  }
  .auth-showcase-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-card.panel,
  .auth-showcase.panel {
    padding: 22px 18px !important;
  }
}

/* ============ Pending Slip Alert ============ */
.admin-pending-alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(230, 60, 18, 0.16));
  border: 1px solid rgba(251, 191, 36, 0.48);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.16);
}

.pending-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pending-alert-left strong {
  display: block;
  color: #fef3c7;
  font-size: 0.96rem;
}

.pending-alert-left small {
  display: block;
  color: #fde68a;
  font-size: 0.82rem;
  margin-top: 2px;
}

.pending-alert-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.25rem;
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.5);
  flex-shrink: 0;
}

.pending-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   ZERO-OVERFLOW TABLE, CARD & SIDEBAR LAYOUT REFINEMENT (v8.0)
   Fixes:
   1. Duplicate top-left logo in .admin-sidebar on desktop
   2. Horizontal overflow in /admin/apikeys table view & all other tables
   3. Compact 2-column action grids (.admin-key-actions-grid)
   ============================================================================ */

/* 1. Prevent duplicate brand logo & align topbar brand with left sidebar menu on desktop */
@media (min-width: 1081px) {
  .admin-sidebar > .sidebar-brand,
  #admin-topbar {
    display: none !important;
  }
  #admin-nav {
    padding-top: 14px !important;
  }
  body.admin-mode.admin-ready .inf-nav,
  body.admin-mode .inf-nav {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 24px 14px 12px !important;
  }
}

/* 2. Maximize usable width inside .admin-ready > main & .panel */
.admin-ready > main {
  max-width: 1680px !important;
  padding: 20px clamp(14px, 1.8vw, 24px) 48px !important;
  min-width: 0 !important;
}

.admin-ready .panel {
  padding: 18px clamp(14px, 1.6vw, 22px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 3. Responsive, zero-clipping tables across all pages */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto;
  border-collapse: collapse;
}

@media (max-width: 860px) {
  .table-wrap table {
    min-width: 680px !important;
  }
}

.table-wrap thead th {
  padding: 10px 10px !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  vertical-align: middle;
}

.table-wrap tbody td {
  padding: 10px 10px !important;
  font-size: 12.4px !important;
  line-height: 1.42 !important;
  vertical-align: middle;
  min-width: 0;
}

/* Remove excessive hard min-widths that pushed columns off-screen */
.admin-key-identity {
  min-width: 0 !important;
  max-width: 245px;
}

.admin-key-scope {
  min-width: 0 !important;
  max-width: 250px;
}

.admin-key-expiry {
  min-width: 0 !important;
  max-width: 245px;
}

.admin-quota-stack {
  min-width: 145px !important;
  max-width: 210px;
  gap: 6px !important;
}

.admin-key-actions,
td .actions {
  min-width: 0 !important;
}

.vault-table-media {
  min-width: 0 !important;
}

/* 4. Compact 2-Column Action Grid for Table Rows (.admin-key-actions-grid) */
.admin-key-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 172px;
  max-width: 100%;
  align-items: stretch;
}

.admin-key-actions-grid > button.small,
.table-actions-compact > button.small {
  padding: 5px 8px !important;
  min-height: 28px !important;
  min-block-size: 28px !important;
  font-size: 11.2px !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-actions-compact {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  align-items: center;
}

/* 5. Card View (.ak-card) header & action buttons refinement */
.ak-card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  justify-content: flex-end;
}

.ak-card-actions > button.small {
  padding: 5px 10px !important;
  min-height: 30px !important;
  min-block-size: 30px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
}

@media (max-width: 1280px) {
  .ak-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .ak-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .ak-card-grid {
    grid-template-columns: 1fr !important;
  }
  .admin-key-actions-grid {
    width: 156px;
  }
}

/* ==========================================================================
   SEO MANAGEMENT STUDIO — HEALTH SCORE, DUAL PREVIEW & KEYWORD CHIPS
   ========================================================================== */
.seo-health-card {
  margin: 14px 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(22, 11, 8, 0.94), rgba(10, 5, 4, 0.96));
  border: 1px solid rgba(255, 140, 75, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.seo-health-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.seo-score-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.seo-score-circle {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #5eead4;
  background: rgba(16, 185, 129, 0.14);
  border: 2px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.18);
  flex-shrink: 0;
}
.seo-score-circle.warn {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
}
.seo-score-circle.bad {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.45);
}
.seo-checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.seo-check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.seo-check-item.ok {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(16, 185, 129, 0.05);
}
.seo-check-item.warn {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.06);
}
.seo-check-item strong {
  display: block;
  font-size: 0.8rem;
  color: #f8ede6;
  margin-bottom: 2px;
}
.seo-check-item small {
  display: block;
  font-size: 0.72rem;
  color: #bfa596;
  line-height: 1.35;
}
.seo-preview-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  margin: 14px 0;
}
.seo-og-card-preview {
  border-radius: 12px;
  overflow: hidden;
  background: #14171f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}
.seo-og-img-wrap {
  aspect-ratio: 1200 / 630;
  width: 100%;
  background: #080404;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.seo-og-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.seo-og-meta {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.seo-og-meta small {
  font-size: 0.68rem;
  color: #9aa0a6;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.seo-og-meta strong {
  font-size: 0.86rem;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.seo-og-meta span {
  font-size: 0.75rem;
  color: #b0b6be;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.seo-keywords-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 8, 6, 0.78);
  border: 1px solid rgba(255, 140, 75, 0.22);
  margin-top: 4px;
}
.seo-keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
button.seo-kw-chip {
  padding: 4px 10px !important;
  min-height: 26px !important;
  min-block-size: 26px !important;
  border-radius: 999px !important;
  font-size: 0.73rem !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 160, 105, 0.22) !important;
  color: #d8c3b8 !important;
  box-shadow: none !important;
  cursor: pointer;
}
button.seo-kw-chip.active {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.48) !important;
  color: #6ee7b7 !important;
}
button.seo-kw-chip:hover {
  border-color: rgba(255, 140, 75, 0.6) !important;
  color: #ffffff !important;
}
.seo-perpage-details {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(16, 8, 6, 0.82);
  border: 1px solid rgba(255, 140, 75, 0.24);
}
.seo-perpage-details > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffb38a;
  user-select: none;
}
@media (max-width: 1024px) {
  .seo-checklist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .seo-preview-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .seo-checklist-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   MASTER RESPONSIVE UX/UI ARCHITECTURE (320px Small Mobile -> 2560px+ 4K/TV)
   Covers:
   - Off-canvas sidebar visibility & focus isolation on <= 1080px
   - iOS Safari 16px input font-size prevention on <= 767px
   - Zero horizontal overflow & button text wrapping on 320px-640px
   - Form Grid (1 col mobile / 2 col tablet / 2-3 col desktop)
   - Modal, Dialog & SweetAlert2 viewport & safe-area confinement
   - 1920px Full HD & 2560px+ 2K/4K/TV container scaling
   ============================================================================ */

button,
.inf-btn,
input,
select,
textarea {
  max-width: 100%;
}

input::placeholder,
textarea::placeholder {
  text-overflow: ellipsis;
}

.panel,
.bot-channel-box,
.form-grid,
.form-grid > *,
.section-head,
.section-head > *,
.section-head-actions,
.actions,
.admin-filter-toolbar,
.admin-filter-toolbar > * {
  min-width: 0;
  max-width: 100%;
}

/* Off-canvas Admin Drawer isolation on Tablet & Mobile (<= 1080px) */
@media (max-width: 1080px) {
  body:not(.admin-drawer-open) .admin-sidebar,
  body:not(.admin-drawer-open) .admin-sidebar * {
    visibility: hidden !important;
    pointer-events: none !important;
    transition: none !important;
  }
  .admin-sidebar {
    transform: translateX(-105%) !important;
    width: min(290px, 86vw) !important;
    max-width: 86vw !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  body.admin-drawer-open .admin-sidebar {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.22s ease !important;
  }
}

/* Prevent iOS Safari Auto-Zoom & Stack Filter Toolbars on Mobile (<= 767px) */
@media (max-width: 767px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]),
  select,
  textarea,
  .input-icon-wrap input,
  .idrama-interval-picker select,
  .admin-filter-toolbar input,
  .admin-filter-toolbar select,
  #idrama-cron-interval-sel {
    font-size: 16px !important;
  }

  .form-grid,
  .auth-field-grid,
  .settings-toggle-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .admin-filter-toolbar > input[type="search"],
  .admin-filter-toolbar > input[type="text"],
  .admin-filter-toolbar > select,
  .admin-filter-toolbar > div {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Small Mobile & Mobile (<= 640px): Wrap Long Button Labels & Stack Actions Cleanly */
@media (max-width: 640px) {
  button,
  .inf-btn,
  .source-tool-btn {
    white-space: normal !important;
    word-break: break-word;
    height: auto !important;
    line-height: 1.38;
    text-align: center;
    justify-content: center;
  }

  .admin-key-actions-grid > button.small {
    white-space: nowrap !important;
  }

  .bot-channel-box {
    padding: 14px 12px !important;
  }

  #modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    margin: auto !important;
  }

  #modal .modal-card {
    padding: 18px 14px max(18px, env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow-y: auto !important;
  }

  .swal2-popup {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 22px 16px !important;
  }
}

/* Ultra-Small Mobile (320px-380px) Extra Tight Padding */
@media (max-width: 380px) {
  main,
  .admin-ready > main {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .panel,
  .admin-ready .panel {
    padding: 14px 12px !important;
    border-radius: 14px !important;
  }
}

/* Large Desktop (1920px-2559px) & 2K/4K/TV (2560px+) Scaling */
@media (min-width: 1920px) {
  body:not(.admin-mode) main {
    max-width: 1440px;
  }
  .admin-ready > main {
    max-width: 1860px !important;
  }
}

@media (min-width: 2560px) {
  body:not(.admin-mode) main {
    max-width: 1680px;
  }
  .admin-ready > main {
    max-width: 2160px !important;
  }
}




