:root {
  --bg-dark: #0b0d14;
  --bg-card: #141724;
  --bg-card-hover: #1a1e2f;
  --bg-input: #1a1e2f;
  --border-color: #252a3d;
  --border-focus: #5865F2;
  
  --primary: #5865F2;
  --primary-hover: #4752c4;
  --accent: #00d2ff;
  --success: #23A55A;
  --danger: #F23F43;
  --warning: #FEE75C;
  
  --text-main: #f2f3f5;
  --text-muted: #949ba4;
  --text-dim: #6d737f;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(88, 101, 242, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* NAVBAR */
.navbar {
  height: 70px;
  background: rgba(20, 23, 36, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #5865F2, #00d2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.8px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(35, 165, 90, 0.12);
  border: 1px solid rgba(35, 165, 90, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.guild-select-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: #252b42;
  border-color: #38405e;
}

.btn-accent {
  background: linear-gradient(135deg, #5865F2, #00d2ff);
  color: #fff;
}
.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* LAYOUT */
.layout-container {
  display: flex;
  flex: 1;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: #10131d;
  border-right: 1px solid var(--border-color);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  padding: 12px 14px 4px;
}

.sidebar-group-label:first-of-type {
  padding-top: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.nav-item .icon {
  font-size: 18px;
}

.nav-item:hover {
  background: rgba(88, 101, 242, 0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
}

.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.tech-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

/* CONTENT AREA */
.content-area {
  flex: 1;
  padding: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.tab-pane.active {
  display: block;
}

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

/* HERO CARD */
.hero-card {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #5865F2, #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 600px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: #38405e;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.purple { background: rgba(88, 101, 242, 0.15); color: #5865F2; }
.stat-icon.blue { background: rgba(0, 210, 255, 0.15); color: #00d2ff; }
.stat-icon.green { background: rgba(35, 165, 90, 0.15); color: #23A55A; }
.stat-icon.orange { background: rgba(254, 231, 92, 0.15); color: #FEE75C; }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

/* CARD COMPONENT */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h2 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 5px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.header-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-with-toggle > div:first-child {
  flex: 1;
  min-width: 0;
}

.highlight {
  color: var(--accent);
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.flex-1 { flex: 1; min-width: 0; }

.styled-select, .styled-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.styled-select:focus, .styled-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

/* TOGGLE SWITCH */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  min-width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2c3247;
  transition: .3s;
  border-radius: 34px;
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.switch-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* CHECKBOX GRID */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-pill:hover {
  background: #252b42;
  border-color: #3b4468;
}

.category-pill input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* GRID 2 COLUMNS */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.toggle-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.toggle-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.toggle-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* INFO BOX */
.info-box {
  background: rgba(88, 101, 242, 0.08);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 14px;
}

.info-box.green-border {
  border-left-color: var(--success);
  background: rgba(35, 165, 90, 0.08);
}

.info-box h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.info-box p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.clean-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.clean-list strong {
  color: var(--text-main);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.badge.ready {
  background: rgba(35, 165, 90, 0.2);
  color: var(--success);
}
.badge.missing {
  background: rgba(242, 63, 67, 0.2);
  color: var(--danger);
}

/* BAD WORDS TAGS */
.tags-input-container {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 32px;
}

.tag-badge {
  background: rgba(242, 63, 67, 0.15);
  border: 1px solid rgba(242, 63, 67, 0.3);
  color: #ff7675;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag-badge button {
  background: none;
  border: none;
  color: #ff7675;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.tags-add-row {
  display: flex;
  gap: 10px;
}

/* ACTION BAR */
.action-bar {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.mt-20 { margin-top: 20px; }

/* GLOBAL SAVE FOOTER */
.save-footer {
  position: sticky;
  bottom: 20px;
  background: rgba(20, 23, 36, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 30px;
}

.save-footer span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* TOAST NOTIFICATION */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: #1c2133;
  color: #fff;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .layout-container { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
  .form-row { flex-direction: column; align-items: stretch; }
  .grid-2 { grid-template-columns: 1fr; }
  .content-area { padding: 20px; }
  .save-footer { flex-direction: column; gap: 12px; text-align: center; }
}

/* ========================================================
   AUTHENTICATION OVERLAY & LOGIN SCREEN
   ======================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #141724 0%, #0b0d14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease forwards;
}

.login-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5865F2, #00d2ff);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
}

.login-box h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
}

.login-box p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4);
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
}

.btn-owner {
  background: linear-gradient(135deg, #FEE75C, #ff9f43);
  color: #1a1600;
  font-weight: 800;
}
.btn-owner:hover {
  box-shadow: 0 4px 16px rgba(254, 231, 92, 0.4);
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  margin: 10px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.divider span {
  padding: 0 10px;
}

.demo-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* USER PROFILE BADGE IN NAVBAR */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.btn-icon-only {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.btn-icon-only:hover {
  background: rgba(242, 63, 67, 0.2);
}

/* INVITE BANNER */
.invite-banner {
  background: linear-gradient(135deg, rgba(254, 231, 92, 0.12), rgba(242, 63, 67, 0.08));
  border: 1px solid rgba(254, 231, 92, 0.4);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.invite-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.invite-icon {
  font-size: 36px;
}

.invite-banner h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.invite-banner p {
  font-size: 13px;
  color: var(--text-muted);
}

/* OWNER TAB BUTTON */
.owner-tab-btn {
  background: linear-gradient(135deg, rgba(254, 231, 92, 0.15), rgba(255, 159, 67, 0.15)) !important;
  border: 1px solid rgba(254, 231, 92, 0.35) !important;
  color: #FEE75C !important;
  font-weight: 800 !important;
  box-shadow: 0 0 14px rgba(254, 231, 92, 0.2);
}

.owner-tab-btn:hover {
  background: linear-gradient(135deg, rgba(254, 231, 92, 0.25), rgba(255, 159, 67, 0.25)) !important;
  transform: translateY(-1px);
}

.admin-hero {
  border-color: rgba(254, 231, 92, 0.4) !important;
  background: linear-gradient(135deg, rgba(254, 231, 92, 0.12), rgba(255, 159, 67, 0.06)) !important;
}

.owner-health, .owner-billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}
.owner-health-item, .owner-billing-stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(18, 23, 39, .76);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.owner-health-item span, .owner-billing-stat span, .owner-guild-results { color: var(--text-muted); font-size: 12px; }
.owner-health-item strong { font-size: 15px; }
.owner-billing-stat strong { font-size: 27px; line-height: 1; color: #c3b5ff; }
.owner-billing-card { border-color: rgba(150, 137, 255, .28); }
.owner-billing-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.owner-billing-grid { margin: 0; padding: 0 20px 16px; }
.owner-billing-note { margin: 0; padding: 0 20px 20px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.owner-guild-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.owner-guild-tools input { flex: 2 1 230px; }
.owner-guild-tools select { flex: 1 1 180px; }
.owner-guild-results { margin-left: auto; white-space: nowrap; }
.owner-plan-badge { display: inline-block; border-radius: 999px; padding: 5px 9px; background: rgba(116, 128, 157, .2); color: #b9c3d9; font-size: 12px; font-weight: 800; white-space: nowrap; }
.owner-plan-badge.paid { background: rgba(129, 102, 255, .24); color: #c8baff; }
.owner-plan-badge.trial { background: rgba(76, 180, 234, .18); color: #86dafa; }
.owner-plan-badge.free { background: rgba(87, 203, 142, .16); color: #84dcb0; }
.owner-plan-badge.expired { background: rgba(255, 151, 96, .17); color: #ffba8e; }
.owner-plan-badge.legacy { background: rgba(255, 214, 98, .16); color: #ffe296; }
.owner-plan-badge.unknown { background: rgba(241, 107, 110, .16); color: #ffb1b3; }
.owner-server-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.owner-server-cell img { width: 30px; height: 30px; border-radius: 9px; }
.owner-server-cell small { display: block; color: var(--text-muted); font-size: 11px; font-weight: 500; }
.owner-modules { max-width: 270px; min-width: 180px; color: var(--text-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }

/* TEXTAREA */
.styled-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  resize: vertical;
  transition: all 0.2s ease;
  line-height: 1.5;
}
.styled-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

/* TABLE */
.table-responsive {
  overflow-x: auto;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.styled-table th {
  background: #10131d;
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.styled-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
}

.styled-table tr:hover td {
  background: rgba(88, 101, 242, 0.04);
}

/* RAFFLES & DATA TABLE STYLES */
.flex-2 {
  flex: 2;
}

.raffle-create-box {
  background: rgba(22, 27, 46, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  margin-top: 8px;
}

.data-table th {
  background: #10131d;
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 500;
}

.data-table tr:hover td {
  background: rgba(88, 101, 242, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-danger {
  background: #ED4245;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #c03537;
  transform: translateY(-1px);
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================================
   ROLE PICKER, WINDOW STYLES, THEMES & DISCORD EMBED PREVIEWS
   ========================================================= */

/* ROLES PICKER */
.roles-picker-wrapper {
  background: rgba(16, 19, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roles-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.roles-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}

.roles-picker-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e2235;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-pill:hover {
  background: #282d45;
  transform: translateY(-1px);
  border-color: rgba(88, 101, 242, 0.5);
}

.role-pill.selected {
  background: rgba(88, 101, 242, 0.25);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.35);
}

.role-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.role-pill .role-check {
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.role-pill.selected .role-check {
  opacity: 1;
}

/* WINDOW STYLES GRID */
.window-styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.style-card {
  background: rgba(20, 23, 36, 0.85);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.style-card:hover {
  background: #1c2136;
  border-color: rgba(88, 101, 242, 0.6);
  transform: translateY(-2px);
}

.style-card.selected {
  border-color: #00d2ff;
  background: linear-gradient(145deg, rgba(20, 23, 36, 0.95), rgba(0, 210, 255, 0.08));
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.25);
}

.style-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-card-icon {
  font-size: 26px;
}

.style-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.style-card.selected .style-card-badge {
  background: rgba(0, 210, 255, 0.2);
  color: #00d2ff;
}

.style-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.style-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.style-card-radio {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.style-card.selected .style-card-radio {
  border-color: #00d2ff;
  background: #00d2ff;
}

.style-card.selected .style-card-radio::after {
  content: '✓';
  font-size: 11px;
  color: #0b0d14;
  font-weight: 900;
}

/* THEME PALETTE GRID */
.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.theme-pill-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.theme-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.theme-pill-btn.selected {
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.theme-pill-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.theme-pill-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

/* LIVE DISCORD EMBED PREVIEW */
.preview-box {
  background: #1e1f22;
  border: 1px solid #313338;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 18px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2b2d31;
}

.preview-header span {
  font-size: 13px;
  font-weight: 700;
  color: #dbdee1;
}

.preview-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(88, 101, 242, 0.2);
  color: #5865F2;
  font-weight: 700;
}

.discord-message-mock {
  display: flex;
  gap: 14px;
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.discord-avatar-col {
  flex-shrink: 0;
}

.discord-mock-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865F2, #00d2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.discord-content-col {
  flex: 1;
  min-width: 0;
}

.discord-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.discord-username {
  font-weight: 600;
  font-size: 15px;
  color: #f2f3f5;
}

.discord-bot-badge {
  background: #5865F2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.discord-timestamp {
  font-size: 12px;
  color: #949ba4;
}

.discord-mock-text {
  font-size: 14px;
  color: #dbdee1;
  margin-bottom: 8px;
  line-height: 1.4;
}

.discord-embed-card {
  background: #2b2d31;
  border-left: 4px solid #5865F2;
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 540px;
}

.discord-embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #dbdee1;
}

.discord-embed-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.discord-embed-title a {
  color: #00a8fc;
  text-decoration: none;
}

.discord-embed-desc {
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.5;
  white-space: pre-line;
}

.discord-embed-desc blockquote,
.discord-embed-desc > .quote-block {
  border-left: 4px solid #4e5058;
  padding-left: 10px;
  margin: 4px 0;
  color: #b5bac1;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.discord-embed-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.discord-field-name {
  font-size: 12px;
  font-weight: 700;
  color: #b5bac1;
}

.discord-field-value {
  font-size: 13px;
  color: #dbdee1;
  word-break: break-word;
}

.discord-embed-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  float: right;
  margin-left: 12px;
  object-fit: cover;
}

.discord-embed-banner {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 6px;
}

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

.discord-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.discord-mock-btn {
  background: #4e5058;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discord-mock-btn.primary {
  background: #5865F2;
}

.discord-mock-btn.success {
  background: #248046;
}

.discord-mock-btn.secondary {
  background: #4e5058;
}
/* News subscriptions are scoped to the selected Discord server. */
.source-help { color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.source-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.source-add-grid .flex-2 { grid-column: span 2; }
.news-feed-card-wrap {
  background: rgba(16, 19, 29, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}
.news-feed-card-wrap:hover {
  border-color: rgba(88, 101, 242, 0.45);
}
.news-feed-row {
  display: grid;
  grid-template-columns: minmax(190px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto;
  align-items: end;
  gap: 12px;
}
.news-feed-heading { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.news-feed-heading small { color: var(--text-dim); overflow-wrap: anywhere; }
.news-feed-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }
.news-feed-field input[type="checkbox"] { width: 18px; height: 18px; margin: 8px auto; }
.news-feed-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.feed-styles-bar {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feed-styles-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.feed-style-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.feed-style-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}
.feed-style-choice:hover {
  border-color: rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.08);
}
.feed-style-choice.selected {
  border-color: #5865F2;
  background: rgba(88, 101, 242, 0.18);
  box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.4);
}
.feed-style-choice-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.feed-style-choice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.feed-style-choice-text strong {
  font-size: 13px;
  color: #fff;
}
.feed-style-choice-text small {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.feed-custom-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.feed-editor-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}
.feed-editor-header {
  margin-bottom: 12px;
}
.feed-editor-header h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #fff;
}
.feed-editor-header p {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.feed-editor-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0 12px;
}
.feed-toggle-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.feed-editor-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1000px) {
  .news-feed-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-feed-heading { grid-column: 1 / -1; }
  .feed-style-pills { grid-template-columns: 1fr; }
  .feed-editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .source-add-grid .flex-2 { grid-column: auto; }
  .news-feed-row { grid-template-columns: minmax(0, 1fr); }
  .news-feed-heading { grid-column: auto; }
}

/* SUB-TABS BAR (FiveM Modules) */
.subtabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  margin-bottom: 20px;
}

.subtab-btn {
  flex: 1;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.subtab-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.subtab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
}

/* ACTION BUTTONS ROW */
.action-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

/* 3-STEP QUICK GUIDE CARDS */
.step-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.step-card {
  background: rgba(26, 30, 47, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.step-badge {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.18);
  color: #8ea1ff;
}

.step-card strong {
  font-size: 14px;
  color: #fff;
}

.step-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* WEBHOOK COPY BOX */
.webhook-copy-box {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.webhook-copy-box label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.webhook-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* SUB-PANELS */
.sub-panel {
  background: rgba(26, 30, 47, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.sub-panel.danger-panel {
  background: rgba(237, 66, 69, 0.07);
  border-color: rgba(237, 66, 69, 0.28);
}

.sub-panel.success-panel {
  background: rgba(46, 204, 113, 0.06);
  border-color: rgba(46, 204, 113, 0.28);
}

@media (max-width: 900px) {
  .step-cards-grid {
    grid-template-columns: 1fr;
  }
  .webhook-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}
.fdoc-command-summary { color: #a9b5c7; font-size: 13px; line-height: 1.6; }
.fdoc-command-filter { box-sizing: border-box; width: 100%; max-width: 460px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #35405a; border-radius: 8px; background: #111827; color: #e2e8f0; font: inherit; }
.fdoc-command-filter:focus-visible { outline: 2px solid #5865f2; outline-offset: 2px; }
.fdoc-command-table-wrap { max-width: 100%; overflow-x: auto; }
.fdoc-command-table { min-width: 650px; }
.fdoc-command-table td:first-child { min-width: 210px; }
.fdoc-command-table code { white-space: normal; overflow-wrap: anywhere; }
.fdoc-command-subrow { background: rgba(88, 101, 242, 0.05); }
.fdoc-command-table tr[hidden] { display: none; }

.premium-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 18px 0 24px; padding: 22px 24px; border: 1px solid rgba(139, 129, 255, .32); border-radius: 16px; background: linear-gradient(120deg, rgba(88, 101, 242, .15), rgba(20, 27, 43, .88)); }
.premium-card h2 { margin: 6px 0; font-size: 1.25rem; }
.premium-card p { margin: 0 0 5px; color: #bcc7dc; line-height: 1.5; }
.premium-card small { color: #a6b4cf; }
.premium-subscription { display: block; margin-top: 7px; }
.premium-card .btn { flex: none; }
.premium-card [hidden] { display: none !important; }
.nav-item.premium-locked { opacity: .62; }
.nav-item.premium-locked::after { content: '🔒 Pro'; margin-left: auto; font-size: .68rem; color: #a99cff; white-space: nowrap; }
@media (max-width: 640px) { .premium-card { align-items: flex-start; flex-direction: column; } }

/* Pro plan entry and details */
#mainApp .pro-nav-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 65px;
  margin: 0 0 14px;
  padding: 10px;
  gap: 9px;
  border: 1px solid rgba(143, 132, 255, .48);
  border-radius: 11px;
  background: linear-gradient(125deg, rgba(88, 101, 242, .25), rgba(27, 34, 51, .96));
  color: #f4f3ff;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
#mainApp .pro-nav-button:hover { border-color: #b4a9ff; background: linear-gradient(125deg, rgba(105, 94, 241, .36), rgba(37, 46, 67, .96)); transform: translateY(-1px); }
.pro-nav-mark { display: grid; place-items: center; width: 31px; height: 31px; flex: none; border-radius: 8px; background: linear-gradient(145deg, #9f8fff, #6557e8); color: #fff; font-size: 19px; }
.pro-nav-copy { display: grid; min-width: 0; gap: 3px; }
.pro-nav-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pro-nav-copy small { color: #c5c1e7; font-size: 9px; line-height: 1.25; }
.pro-nav-status { margin-left: auto; padding: 4px 6px; border-radius: 5px; background: rgba(155, 143, 255, .18); color: #d8d1ff; font-size: 9px; font-weight: 800; white-space: nowrap; }
.premium-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.bot-nickname-card { border-color: rgba(166, 146, 255, .38); background: linear-gradient(125deg, rgba(98, 78, 190, .13), rgba(19, 27, 43, .94)); }
.bot-nickname-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bot-nickname-badge { padding: 4px 8px; border-radius: 999px; background: rgba(169, 145, 255, .18); color: #c5b8ff; font-size: 10px; font-weight: 800; }
.bot-nickname-controls { display: flex; flex-wrap: wrap; gap: 9px; margin: 9px 0; }
.bot-nickname-controls .styled-input { flex: 1 1 260px; min-width: 0; }
.bot-nickname-controls .btn { flex: 0 0 auto; }
.bot-nickname-card small { display: block; color: var(--text-muted); line-height: 1.45; }
@media (max-width: 640px) { .bot-nickname-controls .btn { flex: 1 1 auto; } }

.pro-dialog {
  position: fixed;
  inset: 0;
  width: min(760px, calc(100vw - 28px));
  max-width: none;
  max-height: min(88dvh, 900px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #465176;
  border-radius: 18px;
  background: #111827;
  color: #f2f3f8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
}
.pro-dialog::backdrop { background: rgba(2, 5, 15, .78); backdrop-filter: blur(5px); }
.pro-dialog-shell { display: flex; flex-direction: column; max-height: min(88dvh, 900px); }
.pro-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-bottom: 1px solid #2b3650; }
.pro-dialog-eyebrow { color: #bcb2ff; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.pro-dialog-close { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid #33405a; border-radius: 8px; background: #1b2436; color: #c9d2e4; cursor: pointer; }
.pro-dialog-close:hover { background: #303b55; color: #fff; }
.pro-dialog-scroll { min-height: 0; overflow-y: auto; padding: 0 22px 22px; scrollbar-color: #536083 #111827; }
.pro-dialog-hero { position: relative; margin: 0 -22px 22px; padding: 25px 22px 24px; background: radial-gradient(circle at 92% 5%, rgba(69, 209, 229, .19), transparent 36%), linear-gradient(130deg, rgba(79, 72, 178, .36), rgba(19, 31, 49, .8)); border-bottom: 1px solid #34405d; }
.pro-dialog-chip { display: inline-block; padding: 5px 9px; border: 1px solid rgba(180, 169, 255, .42); border-radius: 999px; color: #d7d1ff; background: rgba(117, 101, 215, .18); font-size: 10px; font-weight: 800; }
.pro-dialog-hero h2 { max-width: 580px; margin: 13px 0 8px; font-size: clamp(22px, 4vw, 29px); letter-spacing: -.04em; line-height: 1.2; }
.pro-dialog-hero p { max-width: 615px; color: #c2cbdd; font-size: 13px; line-height: 1.55; }
.pro-dialog-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 15px 0 5px; }
.pro-dialog-price strong { font-size: 25px; letter-spacing: -.04em; }
.pro-dialog-price span { color: #c4cadd; font-size: 12px; }
.pro-dialog-hero small { color: #aab6cd; font-size: 10px; line-height: 1.4; }
.pro-dialog-section-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.pro-dialog-section-title h3 { font-size: 15px; }
.pro-dialog-section-title span { color: #98a6bf; font-size: 10px; }
.pro-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pro-feature { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #303a50; border-radius: 11px; background: #172133; }
.pro-feature > span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; background: #273451; font-size: 15px; }
.pro-feature strong { display: block; margin: 1px 0 5px; color: #f0f2fc; font-size: 11px; line-height: 1.4; }
.pro-feature p { color: #afbdd3; font-size: 10.5px; line-height: 1.5; }
.pro-dialog-trial-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding: 13px; border: 1px solid rgba(82, 193, 169, .35); border-radius: 10px; background: rgba(33, 118, 105, .12); }
.pro-dialog-trial-note > span { font-size: 19px; }
.pro-dialog-trial-note p { color: #c2d4d3; font-size: 11px; line-height: 1.55; }
.pro-dialog-trial-note strong { color: #e1fff4; }
.pro-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 22px; border-top: 1px solid #34405d; background: #131c2c; }
.pro-dialog-footer > span { max-width: 245px; color: #b9c8df; font-size: 11px; line-height: 1.4; }
.pro-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pro-dialog-actions .btn { padding: 9px 12px; font-size: 11px; white-space: normal; text-align: center; }
.pro-dialog-actions [hidden] { display: none !important; }
.pro-dialog :is(button, a):focus-visible, #mainApp .pro-nav-button:focus-visible { outline: 2px solid #88dcff; outline-offset: 2px; }
.pro-dialog button:disabled { opacity: .55; cursor: wait; }

/* Give paid access and the trial separate, readable visual identities. */
#mainApp .premium-card.is-pro {
  border-color: rgba(245, 194, 104, .68);
  background: radial-gradient(circle at 95% 8%, rgba(245, 181, 76, .18), transparent 38%), linear-gradient(120deg, #30271e, #1b2130 75%);
  box-shadow: inset 4px 0 #eeb95f, 0 12px 32px rgba(0, 0, 0, .14);
}
#mainApp .premium-card.is-pro .section-kicker,
#mainApp .premium-card.is-pro h2 { color: #ffe3a7; }
#mainApp .premium-card.is-trial {
  border-color: rgba(84, 224, 209, .58);
  background: radial-gradient(circle at 95% 8%, rgba(61, 205, 195, .17), transparent 38%), linear-gradient(120deg, #193a3e, #192331 75%);
  box-shadow: inset 4px 0 #5ddbc9, 0 12px 32px rgba(0, 0, 0, .14);
}
#mainApp .premium-card.is-trial .section-kicker,
#mainApp .premium-card.is-trial h2 { color: #a9f5e8; }
#mainApp .premium-card.is-trial #premiumDate:not(:empty) {
  display: inline-block;
  margin-top: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(111, 234, 218, .4);
  border-radius: 7px;
  background: rgba(34, 143, 134, .2);
  color: #c3fff3;
  font-weight: 750;
}
#mainApp .premium-card.is-trial #premiumTrialButton {
  border-color: #68e1d2;
  background: #43c9b8;
  color: #092b2b;
  font-weight: 800;
}
#mainApp .premium-card.is-trial #premiumTrialButton:hover { background: #74e5d6; }
#mainApp .pro-nav-button {
  border-color: rgba(245, 194, 104, .58);
  background: linear-gradient(125deg, rgba(160, 104, 36, .35), rgba(43, 34, 34, .96));
}
#mainApp .pro-nav-button:hover {
  border-color: #ffd58e;
  background: linear-gradient(125deg, rgba(187, 125, 43, .44), rgba(51, 40, 38, .96));
}
#mainApp .pro-nav-button .pro-nav-mark { background: linear-gradient(145deg, #ffe09b, #d49235); color: #302007; }
#mainApp .pro-nav-button .pro-nav-copy small { color: #e8cb9a; }
#mainApp .pro-nav-button .pro-nav-status { background: rgba(233, 178, 84, .2); color: #ffe0a5; }
#mainApp .pro-nav-button.is-trial {
  border-color: rgba(84, 224, 209, .62);
  background: linear-gradient(125deg, rgba(37, 133, 130, .37), rgba(27, 46, 52, .96));
}
#mainApp .pro-nav-button.is-trial .pro-nav-mark { background: linear-gradient(145deg, #a9fff0, #45bfb6); color: #09332f; }
#mainApp .pro-nav-button.is-trial .pro-nav-status { background: rgba(69, 204, 190, .22); color: #b7fff2; }
.pro-dialog { border-color: #9b7749; }
.pro-dialog-eyebrow { color: #ffda95; }
.pro-dialog-hero {
  background: radial-gradient(circle at 92% 5%, rgba(245, 184, 82, .22), transparent 39%), linear-gradient(130deg, rgba(104, 71, 45, .58), rgba(19, 31, 49, .82));
  border-bottom-color: #6b543e;
}
.pro-dialog-chip { border-color: rgba(255, 215, 147, .46); background: rgba(174, 116, 49, .2); color: #ffe3b2; }
@media (max-width: 640px) {
  .premium-card-actions { justify-content: flex-start; }
  .pro-dialog, .pro-dialog-shell { max-height: 92dvh; }
  .pro-dialog-top { padding: 12px 16px; }
  .pro-dialog-scroll { padding: 0 16px 16px; }
  .pro-dialog-hero { margin: 0 -16px 18px; padding: 20px 16px; }
  .pro-feature-grid { grid-template-columns: 1fr; }
  .pro-dialog-footer { display: grid; padding: 12px 16px; }
  .pro-dialog-footer > span { max-width: none; }
  .pro-dialog-actions { justify-content: stretch; }
  .pro-dialog-actions .btn { flex: 1; }
}
