@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --admin-bg: #07090e;
  --admin-surface: #0b0f19;
  --admin-sidebar: #0d121f;
  --admin-card: #111827;
  --admin-card-hover: #162033;
  --admin-border: rgba(251, 191, 36, 0.15);
  --admin-border-subtle: rgba(255, 255, 255, 0.08);
  --admin-gold: #fbbf24;
  --admin-gold-dark: #d97706;
  --admin-gold-glow: rgba(251, 191, 36, 0.2);
  --admin-text: #f8fafc;
  --admin-muted: #94a3b8;
  --admin-danger: #ef4444;
  --admin-success: #22c55e;
  --admin-info: #38bdf8;
  --admin-purple: #a855f7;
  --sidebar-width: 270px;
}

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

html, body {
  height: 100%;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  direction: rtl;
  font-size: 14px;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--admin-bg); }
::-webkit-scrollbar-thumb { background: rgba(251, 191, 36, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--admin-gold); }

/* ── LOGIN OVERLAY ── */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0d121f 0%, #07090e 100%);
  backdrop-filter: blur(14px);
}

.login-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 60px,
    rgba(251,191,36,0.02) 60px,
    rgba(251,191,36,0.02) 61px
  );
}

.login-box {
  position: relative; z-index: 1;
  width: 440px; max-width: 92vw;
  background: var(--admin-card);
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 18px;
  padding: 40px 36px;
  box-shadow: 0 0 60px rgba(251,191,36,0.12), 0 24px 60px rgba(0,0,0,0.7);
}

.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--admin-gold), var(--admin-gold-dark));
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 14px;
  box-shadow: 0 0 35px var(--admin-gold-glow);
}
.login-title {
  font-size: 22px; font-weight: 800;
  color: var(--admin-text); margin-bottom: 4px;
}
.login-subtitle {
  font-size: 13px; color: var(--admin-muted);
}

.login-form-group {
  margin-bottom: 18px;
}
.login-form-group label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--admin-muted); margin-bottom: 8px;
}
.login-form-group input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}
.login-form-group input:focus {
  border-color: var(--admin-gold);
  background: rgba(251,191,36,0.03);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}
.login-form-group input::placeholder { color: var(--admin-muted); }

.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fca5a5;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-error.visible { display: block; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--admin-gold), var(--admin-gold-dark));
  color: #1a1200; font-weight: 800;
  font-family: 'Cairo', sans-serif; font-size: 14px;
  border: none; border-radius: 10px;
  padding: 12px 24px; cursor: pointer;
  transition: all 0.2s; width: 100%;
  box-shadow: 0 4px 20px rgba(251,191,36,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(251,191,36,0.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; font-weight: 700;
  font-family: 'Cairo', sans-serif; font-size: 14px;
  border: none; border-radius: 10px;
  padding: 10px 20px; cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(239,68,68,0.25);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--admin-text); font-weight: 600;
  font-family: 'Cairo', sans-serif; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 20px; cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.05);
  color: #fff;
}
.btn-secondary.danger:hover {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.1);
  color: #fca5a5;
}

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 8px; cursor: pointer;
  font-size: 15px; color: var(--admin-gold);
  transition: all 0.2s;
}
.btn-icon:hover { background: rgba(251,191,36,0.25); transform: scale(1.08); }

.btn-text {
  background: none; border: none; color: var(--admin-gold);
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-text:hover { text-decoration: underline; color: #fff; }

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  cursor: pointer;
  color: #fca5a5;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 12px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
}
.btn-logout:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.btn-logout:active {
  transform: translateY(0);
}

/* ── LAYOUT ── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--admin-sidebar);
  border-left: 1px solid var(--admin-border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.admin-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--admin-gold);
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bot-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #5865f2, #eb459e);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(251,191,36,0.3);
}
.bot-info { overflow: hidden; }
.bot-name {
  font-size: 15px; font-weight: 800;
  color: var(--admin-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bot-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--admin-muted);
}
.bot-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--admin-success);
  box-shadow: 0 0 8px var(--admin-success);
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 11px; font-weight: 700;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--admin-muted);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  margin-bottom: 3px;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--admin-text);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(251,191,36,0.15) 0%, rgba(251,191,36,0.03) 100%);
  color: var(--admin-gold);
  border-right: 3px solid var(--admin-gold);
  font-weight: 800;
}
.nav-icon { font-size: 18px; }
.nav-badge {
  margin-right: auto;
  font-size: 11px;
  font-weight: 800;
  background: rgba(251,191,36,0.2);
  color: var(--admin-gold);
  padding: 2px 8px;
  border-radius: 12px;
}

/* ── SETTINGS NAV GROUP (Collapsible) ── */
.nav-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--admin-muted);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  margin-bottom: 3px;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.12);
  user-select: none;
}
.nav-group-header:hover {
  background: rgba(251, 191, 36, 0.1);
  color: var(--admin-gold);
}
.nav-group-header.has-active {
  color: var(--admin-gold);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}
.nav-group-arrow {
  margin-right: auto;
  font-size: 11px;
  color: var(--admin-muted);
  transition: transform 0.25s ease;
  display: inline-block;
}
.nav-group-arrow.open {
  transform: rotate(180deg);
  color: var(--admin-gold);
}
.nav-group-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 0;
  padding-right: 8px;
}
.nav-group-children.open {
  max-height: 400px;
  opacity: 1;
}
.nav-child {
  padding-right: 28px !important;
  font-size: 13px !important;
  border-right: 2px solid rgba(251, 191, 36, 0.08) !important;
  margin-bottom: 1px !important;
  border-radius: 8px !important;
}
.nav-child:hover {
  border-right-color: rgba(251, 191, 36, 0.3) !important;
}
.nav-child.active {
  border-right: 2px solid var(--admin-gold) !important;
  background: linear-gradient(90deg, rgba(251,191,36,0.12) 0%, rgba(251,191,36,0.02) 100%) !important;
  color: var(--admin-gold) !important;
}



.sidebar-footer {
  padding: 18px 16px;
  border-top: 1px solid var(--admin-border-subtle);
  background: rgba(0,0,0,0.15);
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.user-role-pill {
  font-size: 11px; font-weight: 700; color: var(--admin-gold);
}
.user-name-text {
  font-weight: 800; color: #fff; font-size: 13px;
}

/* ── MAIN WRAPPER & TOPBAR ── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--admin-bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border-subtle);
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #86efac;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--admin-success);
  box-shadow: 0 0 10px var(--admin-success);
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.topbar-ping-badge {
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--admin-gold);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--admin-text);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.topbar-btn:hover {
  background: rgba(251,191,36,0.12);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}
.topbar-btn.restart:hover {
  background: rgba(239,68,68,0.15);
  border-color: var(--admin-danger);
  color: #fca5a5;
}

/* ── MAIN CONTENT ── */
.main-content {
  padding: 32px;
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.25s ease-out; }

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

.page-header { margin-bottom: 28px; }
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 24px; font-weight: 800;
  color: var(--admin-text); margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px; color: var(--admin-muted);
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.accent-gold::after   { background: var(--admin-gold); }
.stat-card.accent-blue::after   { background: var(--admin-info); }
.stat-card.accent-green::after  { background: var(--admin-success); }
.stat-card.accent-purple::after { background: var(--admin-purple); }

.stat-icon {
  font-size: 28px; margin-bottom: 12px; display: inline-block;
}
.stat-value {
  font-size: 28px; font-weight: 800;
  color: var(--admin-text); font-family: 'JetBrains Mono', 'Cairo', monospace;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px; color: var(--admin-muted); font-weight: 600;
}

/* ── ENGINE TELEMETRY BOX ── */
.engine-telemetry-box {
  background: linear-gradient(180deg, rgba(17,24,39,0.95) 0%, rgba(13,18,31,0.95) 100%);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.telemetry-title {
  font-size: 16px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.telemetry-badge {
  font-size: 12px; font-weight: 700;
  color: var(--admin-gold);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
}
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.telemetry-card {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
}
.telemetry-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 12px;
}
.telemetry-value-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--admin-gold);
}
.telemetry-value-tag.green { color: var(--admin-success); }
.telemetry-value-tag.purple { color: var(--admin-purple); }

.progress-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-in-out;
}
.progress-bar-fill.gold { background: linear-gradient(90deg, #d97706, #fbbf24); }
.progress-bar-fill.green { background: linear-gradient(90deg, #16a34a, #22c55e); }
.progress-bar-fill.purple { background: linear-gradient(90deg, #9333ea, #a855f7); }

.telemetry-subinfo {
  font-size: 11px; color: var(--admin-muted);
}
.telemetry-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--admin-muted);
  font-weight: 600;
}

/* ── CARDS & DASHBOARD GRID ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 16px;
  padding: 24px;
}

.card-title {
  font-size: 16px; font-weight: 800;
  color: var(--admin-text);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.card-title-icon { font-size: 20px; }

/* ── PLAN BARS ── */
.plan-bar-item { margin-bottom: 16px; }
.plan-bar-header {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 700;
  margin-bottom: 8px;
}
.plan-bar-label { color: var(--admin-text); }
.plan-bar-count { color: var(--admin-muted); font-family: 'JetBrains Mono', monospace; }
.plan-bar-track {
  height: 8px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.plan-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.plan-bar-fill.free { background: #64748b; }
.plan-bar-fill.pro { background: var(--admin-gold); box-shadow: 0 0 10px var(--admin-gold-glow); }
.plan-bar-fill.enterprise { background: var(--admin-purple); box-shadow: 0 0 10px rgba(168,85,247,0.4); }

/* ── ACTIVITY LIST ── */
.activity-list {
  display: flex; flex-direction: column; gap: 10px;
}
.activity-entry {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
}
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text {
  font-size: 13px; color: var(--admin-text); font-weight: 600;
  word-break: break-word;
}
.activity-time {
  font-size: 11px; color: var(--admin-muted); margin-top: 2px;
}

/* ── DATA TABLES ── */
.table-wrapper {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
}
.data-table th {
  background: rgba(0,0,0,0.3);
  padding: 14px 18px;
  color: var(--admin-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--admin-border-subtle);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: rgba(251,191,36,0.02);
}

.guild-cell {
  display: flex; align-items: center; gap: 12px;
}
.guild-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  color: var(--admin-gold);
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--admin-border);
}
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-name { font-weight: 800; color: #fff; font-size: 14px; }
.guild-id-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--admin-muted);
  background: rgba(0,0,0,0.25);
  padding: 2px 6px; border-radius: 4px;
  cursor: pointer; transition: all 0.2s;
}
.guild-id-pill:hover { color: var(--admin-gold); background: rgba(251,191,36,0.1); }

.plan-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 800;
  text-align: center;
}
.plan-badge.free { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.plan-badge.pro { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.35); }
.plan-badge.enterprise { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.35); }

/* ── SEARCH & FILTERS ── */
.search-filters-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.search-wrapper { position: relative; min-width: 260px; }
.search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12);
}
.filter-select {
  background: var(--admin-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--admin-gold); }

/* ── PRESETS BAR ── */
.presets-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 12px 18px;
}
.presets-label {
  font-weight: 800; font-size: 13px; color: var(--admin-gold);
}
.preset-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--admin-text);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.preset-btn:hover {
  background: rgba(251,191,36,0.15);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
  transform: translateY(-1px);
}

/* ── GLOBAL BROADCAST LAYOUT ── */
.broadcast-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.radio-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.radio-card:hover { background: rgba(255,255,255,0.05); }
.radio-card input:checked + .radio-card-content .radio-card-title {
  color: var(--admin-gold);
}
.radio-card:has(input:checked) {
  border-color: var(--admin-gold);
  background: rgba(251,191,36,0.05);
}
.radio-card-title { font-size: 12px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.radio-card-desc { font-size: 10px; color: var(--admin-muted); line-height: 1.3; }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--admin-muted); margin-bottom: 6px;
}
.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.12);
}
.form-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.color-picker-wrapper {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px 12px;
}
.color-picker-wrapper input[type="color"] {
  border: none; width: 28px; height: 28px; border-radius: 6px;
  background: none; cursor: pointer; padding: 0;
}
.color-hex-text {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--admin-gold);
}

.broadcast-actions { margin-top: 24px; }
.broadcast-btn {
  font-size: 15px; padding: 14px;
}

.broadcast-status-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
}
.broadcast-status-box.success {
  background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #86efac;
}
.broadcast-status-box.error {
  background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5;
}

/* ── DISCORD LIVE PREVIEW COMPONENT ── */
.discord-preview-container {
  background: #313338;
  border-radius: 12px;
  padding: 20px;
  direction: ltr; /* Discord client preview is LTR based with Arabic RTL content support */
  text-align: left;
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.discord-message {
  display: flex;
  gap: 16px;
}
.discord-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.discord-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-message-content { flex: 1; min-width: 0; }

.discord-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.discord-bot-name {
  font-size: 15px; font-weight: 600; color: #f2f3f5;
}
.discord-bot-tag {
  background: #5865f2; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px;
  line-height: 1.3;
}
.discord-timestamp {
  font-size: 12px; color: #949ba4; margin-left: 4px;
}

.discord-embed {
  background: #2b2d31;
  border-radius: 4px;
  display: flex;
  position: relative;
  overflow: hidden;
  max-width: 520px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.03);
}
.discord-embed-side-color {
  width: 4px; flex-shrink: 0;
}
.discord-embed-body {
  padding: 12px 16px;
  flex: 1;
  direction: rtl;
  text-align: right;
}

.discord-embed-author {
  font-size: 12px; font-weight: 600; color: #f2f3f5; margin-bottom: 4px;
}
.discord-embed-title {
  font-size: 15px; font-weight: 700; color: #00a8fc; margin-bottom: 8px; line-height: 1.3;
}
.discord-embed-desc {
  font-size: 13px; color: #dbdee1; line-height: 1.5; white-space: pre-line; margin-bottom: 10px;
}

.discord-embed-thumbnail-wrap {
  padding: 12px 16px 12px 0;
  flex-shrink: 0;
}
.discord-embed-thumbnail {
  width: 80px; height: 80px; border-radius: 6px; object-fit: cover;
}
.discord-embed-image-wrapper {
  margin: 10px 0; max-width: 100%; border-radius: 6px; overflow: hidden;
}
.discord-embed-image {
  max-width: 100%; max-height: 220px; border-radius: 6px; display: block;
}

.discord-embed-footer {
  font-size: 11px; color: #949ba4; margin-top: 6px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 6px;
}

.discord-buttons-row {
  margin-top: 10px;
  display: flex; gap: 8px;
  direction: rtl;
}
.discord-btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: #4e5058; color: #fff;
  padding: 6px 14px; border-radius: 4px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.discord-btn-link:hover { background: #6d6f78; }
.discord-external-icon { font-size: 14px; }

/* ── CONTROLS & BOT ENGINE ── */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.control-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.control-card-title {
  font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.control-card-desc {
  font-size: 12px; color: var(--admin-muted); margin-bottom: 20px; line-height: 1.4;
}

.bot-control-layout-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .bot-control-layout-grid {
    grid-template-columns: 1fr;
  }
}

.bot-settings-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.var-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.var-chip {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-gold);
  cursor: pointer;
  transition: all 0.2s;
}

.var-chip:hover {
  background: rgba(251, 191, 36, 0.2);
  transform: translateY(-1px);
}

.rotating-status-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
}

.rotating-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--admin-border-subtle);
}

.control-field {
  margin-bottom: 16px;
}
.control-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--admin-muted); margin-bottom: 6px;
}
.control-field select, .control-field input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.control-field select:focus, .control-field input:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.maintenance-toggle-area {
  display: flex; align-items: center; gap: 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 16px;
}
.big-toggle {
  position: relative; display: inline-block;
  width: 52px; height: 28px; flex-shrink: 0;
}
.big-toggle input { opacity: 0; width: 0; height: 0; }
.big-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #334155; border-radius: 28px; transition: 0.3s;
}
.big-toggle-slider::before {
  position: absolute; content: "";
  height: 20px; width: 20px; left: 4px; bottom: 4px;
  background: #fff; border-radius: 50%; transition: 0.3s;
}
.big-toggle input:checked + .big-toggle-slider { background: var(--admin-danger); }
.big-toggle input:checked + .big-toggle-slider::before { transform: translateX(24px); }

.maintenance-label { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.maintenance-status { font-size: 11px; color: var(--admin-muted); }

.action-buttons-stack {
  display: flex; flex-direction: column; gap: 12px; margin-top: auto;
}
.action-stack-btn {
  width: 100%; justify-content: center; padding: 12px;
}

/* ── DISCORD BOT PROFILE LIVE PREVIEW CARD ── */
.bot-preview-column {
  position: sticky;
  top: 90px;
}

/* ── PREVIEW TABS BAR ── */
.preview-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.preview-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #949ba4;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-tab-btn:hover {
  color: #f2f3f5;
  background: rgba(255, 255, 255, 0.05);
}

.preview-tab-btn.active {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.4);
}

/* ── DISCORD PROFILE POPOUT CARD (Matches Real Discord UI) ── */
.discord-profile-card {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 24px rgba(88, 101, 242, 0.08);
  font-family: 'gg sans', 'Noto Sans', 'Segoe UI', sans-serif;
  color: #dbdee1;
  direction: ltr !important;
  text-align: left !important;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
}

.discord-profile-banner {
  height: 120px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 8px 12px;
  display: flex;
  justify-content: flex-end;
}

.discord-banner-more-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: -1px;
}

.discord-banner-more-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.discord-profile-avatar-container {
  position: relative;
  height: 0;
  margin-left: 16px;
}

.discord-profile-avatar-wrap {
  position: absolute;
  top: -46px;
  left: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #111214;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 3;
}

.discord-profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.discord-profile-status-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid #111214;
  background: #23a55a;
  z-index: 4;
}

.discord-profile-status-indicator.online { background: #23a55a; }
.discord-profile-status-indicator.idle { background: #f0b232; }
.discord-profile-status-indicator.dnd { background: #f23f43; }
.discord-profile-status-indicator.invisible { background: #80848e; }
.discord-profile-status-indicator.streaming { background: #593695; }

.discord-profile-body {
  background: #232428;
  border-radius: 12px;
  margin: 48px 12px 14px 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discord-profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.discord-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #f2f3f5;
  letter-spacing: -0.2px;
}

.discord-app-tag {
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.discord-profile-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -6px;
}

.discord-profile-handle {
  font-size: 14px;
  font-weight: 500;
  color: #b5bac1;
}

.discord-slash-tag {
  color: #57f287;
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.discord-profile-mutuals {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #949ba4;
  margin-top: 2px;
}

.discord-mutuals-badge-icon {
  font-size: 14px;
}

.discord-full-action-btn {
  width: 100%;
  background: #2b2d31;
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
  box-sizing: border-box;
  cursor: pointer;
}

.discord-full-action-btn:hover {
  background: #35373c;
  color: #fff;
}

.discord-profile-activity-box {
  background: #111214;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  direction: ltr !important;
  text-align: left !important;
}

.discord-activity-header {
  font-size: 11px;
  font-weight: 800;
  color: #b5bac1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.discord-activity-title {
  font-size: 13px;
  font-weight: 600;
  color: #dbdee1;
  line-height: 1.4;
  unicode-bidi: plaintext;
}

.discord-profile-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.discord-profile-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  color: #00a8fc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.discord-profile-link-btn:hover {
  background: #35373c;
  color: #fff;
}

.discord-profile-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.discord-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #b5bac1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.discord-roles-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.discord-role-pill {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #dbdee1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.discord-role-dot {
  font-size: 10px;
}

.discord-role-add {
  width: 22px;
  height: 22px;
  background: #2b2d31;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #b5bac1;
  cursor: pointer;
}

.discord-fake-msg-box {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #72767d;
  font-size: 13px;
  user-select: none;
}

.discord-fake-msg-placeholder {
  color: #6d6f78;
}

.discord-fake-msg-icon {
  font-size: 14px;
  cursor: pointer;
}

/* ── DISCORD MEMBER LIST MOCKUP ── */
.discord-memberlist-card {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  font-family: 'gg sans', 'Noto Sans', sans-serif;
  color: #dbdee1;
  direction: ltr !important;
  text-align: left !important;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.discord-memberlist-header {
  font-size: 11px;
  font-weight: 800;
  color: #949ba4;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 4px;
}

.discord-memberlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.discord-memberlist-item:hover, .discord-memberlist-item.active-bot {
  background: #35373c;
}

.discord-memberlist-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.discord-memberlist-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.discord-memberlist-avatar-wrap .discord-profile-status-indicator {
  width: 12px;
  height: 12px;
  border-width: 2px;
  bottom: -1px;
  right: -1px;
}

.discord-memberlist-info {
  flex: 1;
  min-width: 0;
}

.discord-memberlist-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.discord-memberlist-name {
  font-size: 14px;
  font-weight: 600;
  color: #f2f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-memberlist-status {
  font-size: 11px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  unicode-bidi: plaintext;
}


/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 32px;
  width: 500px; max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  transform: translateY(12px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-title {
  font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 20px;
}
.modal-field { margin-bottom: 16px; }
.modal-field label {
  display: block; font-size: 13px; font-weight: 700; color: var(--admin-muted); margin-bottom: 6px;
}
.modal-field select, .modal-field input, .modal-field textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text);
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  outline: none;
}
.modal-field select:focus, .modal-field input:focus, .modal-field textarea:focus {
  border-color: var(--admin-gold);
}

.modal-actions {
  display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px;
}

.date-shortcuts {
  display: flex; gap: 6px;
}
.date-shortcut-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--admin-gold);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  font-family: 'Cairo', sans-serif;
}
.date-shortcut-btn:hover {
  background: rgba(251,191,36,0.15); border-color: var(--admin-gold);
}

/* ── ACTIVITY FULL LOG ── */
.activity-filters-group {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.activity-log-full {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 650px; overflow-y: auto;
}
.activity-log-entry {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
}
.activity-log-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.activity-log-icon.type-plan { background: rgba(251,191,36,0.15); color: #fbbf24; }
.activity-log-icon.type-auth { background: rgba(56,189,248,0.15); color: #38bdf8; }
.activity-log-icon.type-user { background: rgba(168,85,247,0.15); color: #c084fc; }
.activity-log-icon.type-bot  { background: rgba(34,197,94,0.15); color: #86efac; }
.activity-log-icon.type-error{ background: rgba(239,68,68,0.15); color: #fca5a5; }

.activity-log-body { flex: 1; min-width: 0; }
.activity-log-text { font-size: 13px; font-weight: 700; color: #fff; }
.activity-log-meta { font-size: 11px; color: var(--admin-muted); margin-top: 2px; }
.activity-log-time { font-size: 12px; color: var(--admin-muted); font-family: 'JetBrains Mono', monospace; }

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed; bottom: 28px; left: 28px; z-index: 10000;
  display: flex; align-items: center; gap: 12px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 14px 22px;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(16px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { border-color: rgba(34,197,94,0.4); color: #86efac; }
.toast.error   { border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.toast.info    { border-color: rgba(251,191,36,0.4); color: #fbbf24; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .telemetry-grid { grid-template-columns: 1fr; }
  .controls-grid { grid-template-columns: 1fr; }
  .broadcast-layout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .radio-cards-grid { grid-template-columns: 1fr; }
}

/* ── RESOURCE USAGE METRICS ── */
.resource-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.resource-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.resource-ram-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.resource-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}
.resource-impact-badge.low {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.resource-impact-badge.medium {
  background: rgba(251, 191, 36, 0.12);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.resource-impact-badge.high {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.resource-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.resource-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.resource-bar-fill.low { background: #22c55e; }
.resource-bar-fill.medium { background: #fbbf24; }
.resource-bar-fill.high { background: #ef4444; }

.resource-subinfo {
  font-size: 10px;
  color: var(--admin-muted);
}

/* ── TOP RESOURCE CONSUMERS WIDGET ── */
.top-consumers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.top-consumer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
}
.top-consumer-item:hover {
  background: rgba(251, 191, 36, 0.04);
  border-color: rgba(251, 191, 36, 0.25);
  transform: translateX(-3px);
}
.top-consumer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-consumer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--admin-border);
}
.top-consumer-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-consumer-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.top-consumer-members {
  font-size: 11px;
  color: var(--admin-muted);
}
.top-consumer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── INSPECTOR RESOURCE BREAKDOWN ── */
.breakdown-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.breakdown-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.breakdown-stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.breakdown-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--admin-gold);
}
.breakdown-stat-lbl {
  font-size: 11px;
  color: var(--admin-muted);
}

/* ── PLANS MANAGER STYLES (SAAS FEATURE MATRIX & CARDS) ── */
.plans-summary-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.plan-summary-chip {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.plan-summary-chip::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: var(--chip-color, var(--admin-gold));
}

.plan-summary-chip-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.plan-summary-chip-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.plan-summary-chip-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-muted);
}

/* Toolbar & View Switcher */
.plans-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.plans-view-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: var(--admin-muted);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-switch-btn:hover {
  color: #fff;
}

.view-switch-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(217, 119, 6, 0.2));
  color: var(--admin-gold);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.plans-filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── MATRIX COMPARISON TABLE ── */
.plans-matrix-table-wrap {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}

.plans-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  min-width: 900px;
}

.plans-matrix-table th,
.plans-matrix-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
  border-left: 1px solid var(--admin-border-subtle);
  vertical-align: middle;
}

.plans-matrix-table th:first-child,
.plans-matrix-table td:first-child {
  border-left: 1px solid var(--admin-border-subtle);
}

.plans-matrix-table tr:last-child td {
  border-bottom: none;
}

/* Sticky Header & Feature Column */
.matrix-th-feature {
  position: sticky;
  right: 0;
  top: 0;
  background: var(--admin-sidebar);
  z-index: 30;
  min-width: 300px;
  max-width: 360px;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
}

.matrix-th-plan {
  position: sticky;
  top: 0;
  background: var(--admin-surface);
  z-index: 20;
  min-width: 220px;
  vertical-align: top !important;
  border-top: 3px solid var(--plan-head-color, var(--admin-gold));
}

.matrix-td-feature {
  position: sticky;
  right: 0;
  background: var(--admin-surface);
  z-index: 10;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
}

/* Plan Column Header Card in Matrix */
.matrix-plan-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-plan-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.matrix-plan-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.matrix-plan-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.matrix-plan-title-input {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  outline: none;
  font-family: 'Cairo', sans-serif;
  width: 100%;
}

.matrix-plan-title-input:focus {
  border-color: var(--admin-gold);
  background: rgba(0, 0, 0, 0.3);
}

.matrix-plan-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-plan-price-input {
  font-family: 'JetBrains Mono', 'Cairo', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--plan-head-color, var(--admin-gold));
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  width: 100%;
  outline: none;
}

.matrix-plan-price-input:focus {
  border-color: var(--admin-gold);
}

.matrix-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--admin-border-subtle);
}

.matrix-bulk-btn {
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  color: var(--admin-gold);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.matrix-bulk-btn:hover {
  background: rgba(251, 191, 36, 0.1);
  color: #fff;
}

.matrix-bulk-btn.danger {
  color: #fca5a5;
}

.matrix-bulk-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fff;
}

/* Category Separator Rows */
.matrix-cat-row td {
  background: #090e18;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--admin-gold);
  border-bottom: 1px solid var(--admin-border);
}

.matrix-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.matrix-cat-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.12);
  color: var(--admin-gold);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Feature Item Row */
.matrix-row {
  transition: background 0.15s ease;
}

.matrix-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.matrix-feature-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.matrix-feature-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.matrix-feature-text {
  display: flex;
  flex-direction: column;
}

.matrix-feature-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.matrix-feature-desc {
  font-size: 11px;
  color: var(--admin-muted);
}

/* Matrix Cells */
.matrix-td-cell {
  text-align: center !important;
}

.matrix-cell-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-quota-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 8px;
  padding: 4px 8px;
}

.matrix-quota-input {
  width: 60px;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--admin-gold);
  text-align: center;
}

.matrix-quota-unit {
  font-size: 10px;
  font-weight: 700;
  color: var(--admin-muted);
}

/* ── CARDS VIEW (POLISHED & RESPONSIVE) ── */
.plans-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}

.plan-config-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.plan-config-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}

.plan-config-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--plan-card-color, var(--admin-gold));
}

.plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border-subtle);
  padding-bottom: 16px;
}

.plan-header-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.plan-icon-display {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.plan-title-input {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  outline: none;
  width: 100%;
  font-family: 'Cairo', sans-serif;
  margin-bottom: 6px;
}

.plan-title-input:focus {
  border-color: var(--admin-gold);
  background: rgba(0, 0, 0, 0.3);
}

.plan-desc-input {
  font-size: 12px;
  color: var(--admin-muted);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  outline: none;
  font-family: 'Cairo', sans-serif;
  resize: none;
}

.plan-desc-input:focus {
  border-color: var(--admin-gold);
}

.plan-section-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
}

.plan-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Categorized Accordion Groups in Cards */
.plan-category-group {
  margin-bottom: 12px;
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.plan-category-head {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-weight: 800;
  color: var(--admin-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.plan-feature-row-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

.plan-feature-row-full:last-child {
  border-bottom: none;
}

.plan-feature-row-full:hover {
  background: rgba(255, 255, 255, 0.03);
}

.plan-feature-row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-text);
  min-width: 0;
}

/* Numeric Limits Grid */
.plan-limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.plan-limit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-limit-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-limit-field input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-gold);
  outline: none;
  text-align: center;
}

.plan-limit-field input:focus {
  border-color: var(--admin-gold);
}

/* Switch Styles */
.plan-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
}

.plan-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  pointer-events: none;
}

.plan-switch-slider {
  position: absolute;
  inset: 0;
  background-color: #334155;
  border-radius: 22px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.plan-switch-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.plan-switch input:checked + .plan-switch-slider {
  background-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.plan-switch input:checked + .plan-switch-slider::before {
  transform: translateX(16px);
}

/* Floating Unsaved Changes Bar */
.unsaved-changes-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 50px;
  padding: 10px 24px;
  display: none;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(251, 191, 36, 0.2);
  backdrop-filter: blur(12px);
  z-index: 1000;
  animation: slideUpFloating 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.unsaved-changes-floating-bar.show {
  display: flex;
}

@keyframes slideUpFloating {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.unsaved-bar-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.unsaved-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════
   PAYMENT GATEWAYS & TRANSACTIONS STYLES
═══════════════════════════════════════════════════════════ */
.status-badge-tx {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.status-badge-tx.completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.status-badge-tx.pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.status-badge-tx.refunded {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.status-badge-tx.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.tx-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tx-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.tx-modal-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
}

.tx-modal-label {
  font-size: 11px;
  color: var(--admin-muted);
  margin-bottom: 4px;
  font-weight: 700;
}

.tx-modal-val {
  font-size: 13px;
  color: #f8fafc;
  font-weight: 700;
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE CMS COMPREHENSIVE STYLING
═══════════════════════════════════════════════════════════ */
#page-landing-cms input[type="text"],
#page-landing-cms input[type="number"],
#page-landing-cms input[type="url"],
#page-landing-cms textarea,
#page-landing-cms select {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f8fafc;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#page-landing-cms input[type="text"]:focus,
#page-landing-cms input[type="number"]:focus,
#page-landing-cms input[type="url"]:focus,
#page-landing-cms textarea:focus,
#page-landing-cms select:focus {
  border-color: var(--admin-gold);
  background: rgba(251, 191, 36, 0.05);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

#page-landing-cms textarea {
  min-height: 68px;
  line-height: 1.6;
  resize: vertical;
}

#page-landing-cms input::placeholder,
#page-landing-cms textarea::placeholder {
  color: #64748b;
  opacity: 0.9;
}

/* CMS Preset Buttons */
.preset-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: right;
  width: 100%;
}

.preset-card-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* CMS Dynamic Item Cards */
.cms-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cms-item-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cms-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--admin-gold);
}

.cms-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cms-icon-box {
  width: 48px !important;
  height: 42px !important;
  flex-shrink: 0;
  text-align: center !important;
  font-size: 18px !important;
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 10px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cms-icon-box:focus {
  border-color: var(--admin-gold) !important;
  background: rgba(251, 191, 36, 0.15) !important;
}

.cms-title-input {
  flex: 1;
  font-weight: 700 !important;
  font-size: 13.5px !important;
}

.cms-desc-textarea {
  width: 100%;
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  min-height: 64px !important;
}

.cms-stat-val-input {
  flex: 1;
  font-weight: 800 !important;
  font-family: 'JetBrains Mono', 'Cairo', monospace !important;
  text-align: center !important;
  color: var(--admin-gold) !important;
  letter-spacing: 0.5px;
}

.cms-stat-lbl-input {
  width: 100%;
  font-size: 12.5px !important;
}

/* ── SMART RESTART MODAL & STATUS PULSE ── */
.spinning-icon {
  display: inline-block;
  animation: adminSpin 2s linear infinite;
}
@keyframes adminSpin {
  100% { transform: rotate(360deg); }
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: statusPulse 1.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.bot-perm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.bot-perm-badge.full {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.bot-perm-badge.partial {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.bot-perm-badge.limited {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.topbar-quick-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--admin-text);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.topbar-quick-link:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--admin-gold);
  color: #fff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   INCIDENTS & SYSTEM ALERTS CENTER
═══════════════════════════════════════════════════════════ */
.incident-severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.incident-severity-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.incident-severity-badge.warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.incident-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.incident-status-pill.open {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.incident-status-pill.resolved {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED GUILD 360° PROFILE MODAL
═══════════════════════════════════════════════════════════ */
.guild-360-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--admin-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.guild-360-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}
.guild-360-tab.active {
  color: var(--admin-gold);
  border-bottom-color: var(--admin-gold);
  background: rgba(251, 191, 36, 0.05);
}

.g360-system-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
}
.g360-system-card:hover {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(255, 255, 255, 0.04);
}
.g360-system-card.active {
  border-left: 3px solid #22c55e;
}
.g360-system-card.inactive {
  border-left: 3px solid #64748b;
  opacity: 0.75;
}

.diag-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.diag-score-banner.healthy {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.diag-score-banner.warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.diag-score-banner.critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.diag-issue-item {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border-subtle);
}
.diag-issue-item.critical {
  border-right: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.04);
}
.diag-issue-item.warning {
  border-right: 4px solid #fbbf24;
  background: rgba(251, 191, 36, 0.04);
}
.diag-issue-item.info {
  border-right: 4px solid #38bdf8;
  background: rgba(56, 189, 248, 0.04);
}

.g360-note-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}
.g360-note-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ── ENV SETTINGS PAGE ── */
.settings-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s;
}
.settings-card:hover {
  border-color: rgba(251, 191, 36, 0.2);
}
.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
}
.settings-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--admin-text);
  margin-bottom: 4px;
}
.settings-card-subtitle {
  font-size: 13px;
  color: var(--admin-muted);
}
.env-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.env-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.env-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text);
}
.env-label-icon { font-size: 15px; }
.env-restart-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(251,191,36,0.12);
  color: var(--admin-gold);
  border: 1px solid rgba(251,191,36,0.25);
  padding: 2px 7px;
  border-radius: 20px;
  margin-right: auto;
}
.env-live-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
  padding: 2px 7px;
  border-radius: 20px;
  margin-right: auto;
}
.env-input-wrap {
  display: flex;
  align-items: center;
  background: var(--admin-input-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.env-input-wrap:focus-within {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.08);
}
.env-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 14px;
  color: var(--admin-text);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  width: 100%;
  direction: ltr;
  text-align: left;
}
.env-input::placeholder { color: var(--admin-muted); font-family: 'Cairo', sans-serif; direction: rtl; }
.env-toggle-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--admin-border-subtle);
  padding: 0 12px;
  height: 42px;
  cursor: pointer;
  font-size: 15px;
  color: var(--admin-muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.env-toggle-btn:hover { color: var(--admin-gold); }
.env-hint {
  font-size: 11.5px;
  color: var(--admin-muted);
  line-height: 1.5;
}
