:root {
  --bg-dark: #080d1a;
  --bg-card: #111827;
  --bg-input: #0b1120;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s ease-in-out;
}

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

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

.app-container {
  width: 100%;
  max-width: 99%;
  margin: 0 auto;
  padding: 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

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

.brand-icon {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.portal-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.central-card {
  max-width: 500px;
  margin: 40px auto;
}

.card-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.text-center { text-align: center; }

.icon-circle {
  width: 64px;
  height: 64px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 18px auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Fix browser autofill blinding white background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  caret-color: #ffffff !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--success-hover); }
.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #d97706; color: #fff; }

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: #ffffff;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.actions-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

/* Square Icon Action Button (Uniform size, style, and row alignment) */
.btn-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
}

.btn-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-icon:active {
  transform: translateY(0);
}

/* Hover Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #f8fafc;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.btn-block { width: 100%; }

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

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

.mt-4 { margin-top: 24px; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-active { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-trial { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-expired { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.status-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.stat-box {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.playlist-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(10, 16, 29, 0.75);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.type-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #94a3b8);
  padding: 11px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  user-select: none;
}

.type-btn i {
  font-size: 14px;
  color: var(--text-muted, #94a3b8);
  transition: transform 0.2s ease, color 0.2s ease;
}

.type-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.type-btn:hover i {
  color: #60a5fa;
  transform: scale(1.15);
}

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

.type-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: rgba(147, 197, 253, 0.35);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.type-btn.active i {
  color: #ffffff;
  transform: scale(1.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.type-btn .badge-rec {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.4px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.type-btn.active .badge-rec {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease-out;
}

.toast-success { background: #059669; color: white; }
.toast-error { background: #dc2626; color: white; }

.hidden { display: none !important; }

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

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: modalFade 0.2s ease-out;
}

@keyframes modalFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.close-modal-btn:hover { color: var(--text-main); }

/* ==========================================================================
   MOBILE & SMALL SCREEN RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 14px;
  }

  .grid-2-col, .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .navbar {
    padding-bottom: 18px;
    margin-bottom: 24px;
    gap: 12px;
  }

  .portal-badge {
    padding: 6px 12px;
    font-size: 12px;
  }

  .card {
    padding: 20px 16px;
  }

  /* Prevent auto-zoom on iOS Safari by enforcing min 16px font */
  .form-group input {
    font-size: 16px;
    padding: 12px 14px;
  }

  .btn {
    padding: 12px 18px;
    min-height: 44px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 12px 10px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .central-card {
    margin: 16px auto;
    padding: 22px 14px;
  }

  .card-header h2 { font-size: 19px; }
  .card-header h3 { font-size: 16px; }

  /* Stack playlist items cleanly on mobile */
  .stat-box.flex-between {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .stat-box.flex-between > button,
  .stat-box.flex-between .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }

  /* Centered mobile toast */
  .toast {
    top: 12px;
    left: 12px;
    right: 12px;
    padding: 12px 16px;
    font-size: 13px;
    text-align: center;
    border-radius: var(--radius-md);
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 480px) {
  .status-details {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .playlist-type-selector {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    margin-bottom: 16px;
  }

  .type-btn {
    padding: 10px 8px;
    font-size: 12px;
    justify-content: center;
    gap: 6px;
  }

  .type-btn .badge-rec {
    font-size: 9px;
    padding: 1px 5px;
  }
}

/* ========================================== */
/* LANGUAGE SELECTOR & I18N STYLING           */
/* ========================================== */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.lang-select:hover, .lang-select:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ff2a48;
}

.lang-select option {
  background: #111827;
  color: #fff;
  font-size: 14px;
}

/* ==========================================================================
   RESTYLED ACTION BUTTONS & PLAYLIST CARD SYSTEM (CMS & User Modals)
   ========================================================================== */
.playlists-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.playlists-container::-webkit-scrollbar {
  width: 6px;
}
.playlists-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.device-pl-item,
.playlist-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.device-pl-item:hover,
.playlist-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.device-pl-top,
.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}

.device-pl-meta,
.playlist-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.device-pl-title,
.playlist-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.pl-type-badge,
.pl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.pl-badge-m3u {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

.pl-badge-xtream {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
}

.pl-badge-protected,
.pl-badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  line-height: 1;
}

.pl-badge-free {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  line-height: 1;
}

/* Beautiful Restyled Action Buttons (Edit & Delete) & Playlist Cards */
.device-pl-item.playlist-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 13px 15px !important;
  margin-bottom: 11px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.device-pl-item.playlist-card:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-1px);
}

.device-pl-top.playlist-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.device-pl-meta.playlist-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.playlist-title-left {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

.playlist-type-icon {
  color: var(--primary, #e50914) !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
}

.device-pl-title.playlist-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.device-pl-actions,
.playlist-actions-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.btn-pl-action,
.pl-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 13px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
}

/* Edit Button: Ultra Sleek Royal Blue Pill */
.btn-pl-edit,
.pl-btn-edit {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(37, 99, 235, 0.28)) !important;
  border: 1px solid rgba(96, 165, 250, 0.45) !important;
  color: #93c5fd !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18) !important;
}

.btn-pl-edit:hover,
.pl-btn-edit:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5) !important;
}

.btn-pl-edit:active,
.pl-btn-edit:active {
  transform: translateY(0) !important;
}

/* Delete Button: Ultra Sleek Crimson Red Pill */
.btn-pl-delete,
.pl-btn-delete {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(220, 38, 38, 0.28)) !important;
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  color: #fca5a5 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.18) !important;
}

.btn-pl-delete:hover,
.pl-btn-delete:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5) !important;
}

.btn-pl-delete:active,
.pl-btn-delete:active {
  transform: translateY(0) !important;
}

/* Details Snippet Box & Copy Button */
.device-pl-endpoint-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.device-pl-endpoint-box,
.playlist-details {
  flex: 1 !important;
  min-width: 0 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 7px 11px !important;
  font-size: 11.5px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #cbd5e1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.btn-copy-endpoint {
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 11px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1 !important;
}

.btn-copy-endpoint:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

@media (max-width: 540px) {
  .btn-pl-action span,
  .btn-copy-endpoint span {
    display: none !important;
  }
  .btn-pl-action {
    padding: 6px 10px !important;
  }
}

/* ==========================================================================
   SORTABLE TABLE HEADERS (Requirement 2)
   ========================================================================== */
.sortable-th {
  cursor: pointer !important;
  user-select: none;
  transition: background-color 0.2s, color 0.2s;
}

.sortable-th:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
}

.sortable-th:hover .sort-icon {
  opacity: 0.9 !important;
}

/* ==========================================================================
   CARD HEADER ICONS & COMMON COMPONENT STYLES
   ========================================================================== */
.card-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

/* ==========================================================================
   QUICK ACTIVATION PLAN SELECTION CARDS
   ========================================================================== */
.plan-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.plan-select-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-select-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.plan-select-card.active {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06)) !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25) !important;
}

.plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.plan-card-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.plan-select-card.active .plan-card-radio {
  border-color: #10b981;
}

.plan-card-radio .radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: transparent;
  transition: all 0.2s ease;
}

.plan-select-card.active .plan-card-radio .radio-dot {
  background-color: #10b981;
}

.plan-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.plan-desc {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .plan-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RESELLER PLAYBOOK STEP CARDS
   ========================================================================== */
.playbook-steps-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.playbook-step-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}

.playbook-step-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.25), rgba(255, 42, 72, 0.35));
  border: 1px solid rgba(255, 42, 72, 0.5);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

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

.step-content p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   HIERARCHY & CREDIT RULE TILES
   ========================================================================== */
.rule-tiles-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.rule-tile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}

.rule-tile:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.rule-icon-disc {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

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

.rule-tile-content p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* Quick credit chips */
.quick-credit-chips {
  display: flex;
  gap: 5px;
}

.credit-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.credit-chip:hover {
  background: rgba(229, 9, 20, 0.2);
  border-color: rgba(255, 42, 72, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   SUPER ADMIN EXECUTIVE HEADER & ANNOUNCEMENT LIVE PREVIEW
   ========================================================================== */
.admin-executive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(255, 42, 72, 0.25);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-crown-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2a48, #b80017);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.admin-header-brand h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.admin-quick-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Announcement Preview Panel */
.announcement-preview-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.preview-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-mockup-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mockup-header-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.mockup-header-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-header-dots span:nth-child(1) { background: #ef4444; }
.mockup-header-dots span:nth-child(2) { background: #f59e0b; }
.mockup-header-dots span:nth-child(3) { background: #10b981; }

.mockup-img-wrap {
  width: 100%;
  max-height: 140px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.mockup-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.mockup-title {
  font-size: 16px;
  font-weight: 700;
  color: #ff2a48;
  margin: 0 0 8px 0;
}

.mockup-content {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-line;
  margin: 0 0 16px 0;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}



