﻿/*
  ================================================================================
  Professional Dark Theme (Corporate Edition)
  Author: Enhanced Professional Design
  Description: Clean, corporate dark theme with optimized structure
               and professional colors. Table hover effects removed.
  ================================================================================
*/

:root {
  /* --- Corporate Dark Color Palette --- */
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #252b3b;
  --bg-card: #1e2433;
  --bg-input: #2a3142;
  
  /* --- Text Colors --- */
  --text-primary: #e4e6eb;
  --text-secondary: #b0b3b8;
  --text-muted: #8b8d91;
  --text-inverse: #ffffff;
  
  /* --- Corporate Accent Colors --- */
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #1a75ff;
  --success: #00a86b;
  --danger: #dc3545;
  --warning: #ff9500;
  --info: #17a2b8;
  --purple: #6f42c1;
  --pink: #e83e8c;
  
  /* --- Border & Shadow Colors --- */
  --border-light: #2d3548;
  --border-medium: #384152;
  --border-strong: #434d5d;
  
  /* --- Shadows --- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.3);
  
  /* --- Layout & Sizing --- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body, .theme-dark {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page .container-xl {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text-inverse);
  font-weight: 600;
  margin-bottom: 1rem;
}

h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

p {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.text-bright { color: var(--text-inverse) !important; }
.text-accent { color: var(--primary-light) !important; }

/* Navigation */
.navbar-bg-img,
.navbar[data-bs-theme="dark"] {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1050;
}

.navbar {
  height: 64px;
  padding: 0 2rem;
}

.navbar .navbar-brand {
  color: var(--text-inverse) !important;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
  padding: 0;
}

.navbar .navbar-brand:hover { opacity: 0.9; }
.navbar .navbar-brand img { height: 30px; width: auto; }

.navbar .nav-link,
.navbar .btn {
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1rem !important;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  background: transparent !important;
  border: none;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease-out;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--text-inverse) !important;
}

.navbar .nav-link:hover::after,
.navbar .nav-link:focus::after {
  transform: scaleX(1);
}

.navbar .nav-link.active,
.navbar .nav-item.active .nav-link {
  color: var(--text-inverse) !important;
  font-weight: 600;
}

.navbar .nav-link.active::after,
.navbar .nav-item.active .nav-link::after {
  transform: scaleX(1);
}

.navbar .btn {
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  font-weight: 500;
  border-radius: var(--radius-md);
}

.navbar .btn:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--primary) !important;
  color: var(--text-inverse) !important;
}

.navbar .btn-outline-danger {
  background: transparent !important;
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

.navbar .btn-outline-danger:hover {
  background: var(--danger) !important;
  color: var(--text-inverse) !important;
}

.navbar .dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  min-width: 220px;
  margin-top: 0.5rem;
  padding: 0.5rem;
}

/* Ensure top navbar stays above the secondary navbar on mobile so the toggler remains clickable */
.navbar { position: relative; }
.navbar + .navbar { z-index: 1000; }
@media (max-width: 768px){
  .navbar + .navbar { z-index: 1000; }
}
/* Prevent the collapsed menu panel from overlaying interactive controls above it */
#navbar-menu.navbar-collapse { position: relative; z-index: 0; }


/* Mobile quickbar under navbar */
.mobile-quickbar{
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}
.mobile-quickbar .container-xl{ padding: 8px 16px; }
.mobile-quickbar .mq-label{ color: var(--text-muted); font-weight: 500; }
.mobile-quickbar .btn{ padding: 0.25rem 0.5rem; }
@media (max-width: 768px){
  .mobile-quickbar{ display: block; }
}


.navbar .dropdown-menu .dropdown-item {
  color: var(--text-primary);
  padding: 0.625rem 1rem;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  background: var(--bg-tertiary);
  color: var(--text-inverse);
}

.navbar .dropdown-menu .dropdown-item i {
  margin-right: 0.75rem;
  width: 18px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.navbar .dropdown-menu .dropdown-item:hover i { color: var(--primary); }

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.navbar-toggler:hover { background: var(--bg-tertiary); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3); }

.navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28228, 230, 235, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse { background-color: transparent; }
.navbar .text-warning { color: var(--warning) !important; font-weight: 600; }
.navbar .nav-link i { font-size: 1.1rem; margin-right: 0.5rem; transition: var(--transition); }

@media (max-width: 1200px) {
  .navbar { padding: 0 1.5rem; }
  .navbar .nav-link, .navbar .btn { padding: 0.75rem 0.75rem !important; font-size: 0.813rem; }
}

@media (max-width: 768px) {
  .navbar { height: auto; min-height: 64px; padding: 1rem; }
  .navbar .navbar-brand { font-size: 1.125rem; }
  .navbar .navbar-brand img { height: 28px; }
  .navbar .nav-link, .navbar .btn { padding: 0.75rem 1rem !important; font-size: 0.875rem; justify-content: flex-start; }
  .navbar .dropdown-menu { margin-top: 0.25rem; min-width: 200px; background: transparent; }
  .navbar-collapse { background: var(--bg-card) !important; border-radius: 8px; padding: 0.75rem; margin-top: 0.75rem; border: 1px solid var(--border-light); box-shadow: var(--shadow-md); }
  .navbar .nav-link::after { left: 1rem; right: auto; width: 2px; height: 60%; top: 20%; }
}

/* Desktop credit/logout pill styles (match look; logout in red) */
.navbar .btn-credit-pill{
  background: rgba(22,163,74,0.12) !important;
  border: 1px solid rgba(22,163,74,0.28) !important;
  color: #16a34a !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600;
  height: 32px;
  line-height: 1.1;
  padding: 0.35rem 0.6rem;
}
.navbar .btn-credit-pill .icon{ color:#16a34a !important; }
.navbar .btn-credit-pill:hover{ background: rgba(22,163,74,0.18) !important; }

.navbar .btn-logout-pill{
  background: rgba(220,53,69,0.12) !important;
  border: 1px solid rgba(220,53,69,0.35) !important;
  color: #dc3545 !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600;
  display: inline-flex; align-items: center;
  height: 32px;
  line-height: 1.1;
  padding: 0.35rem 0.6rem;
}
.navbar .btn-logout-pill .icon{ color:#dc3545 !important; }
.navbar .btn-logout-pill:hover{ background: rgba(220,53,69,0.18) !important; }

/* Pill-style selects for language/theme (desktop + mobile) */
.pill-select{
  border-radius: var(--radius-md) !important;
  font-weight: 600;
  border-width: 1px !important;
  padding: 0.35rem 0.6rem !important;
  height: 32px;
  line-height: 1.1;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-clip: padding-box;
}
.pill-select:focus{ box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.18); }
.pill-lang{
  background: rgba(13,110,253,0.12) !important;
  border: 1px solid rgba(13,110,253,0.28) !important;
  color: #0d6efd !important;
}
.pill-lang:hover{ background: rgba(13,110,253,0.18) !important; }
.pill-theme{
  background: rgba(99,102,241,0.12) !important;
  border: 1px solid rgba(99,102,241,0.28) !important;
  color: #6366f1 !important;
}
.pill-theme:hover{ background: rgba(99,102,241,0.18) !important; }

/* Compact variant inside mobile bottom bar */
.mobile-bottombar .pill-select{ height: 28px; font-size: 0.6875rem; padding: 0.25rem 0.5rem !important; }
.mobile-bottombar .pill-lang:focus{ box-shadow: 0 0 0 2px rgba(13,110,253,0.18); }
.mobile-bottombar .pill-theme:focus{ box-shadow: 0 0 0 2px rgba(99,102,241,0.18); }

/* Mobile bottom bar: centered controls */
.mobile-bottombar{ display:none; position: fixed; left:0; right:0; bottom:0; z-index: 1040; background: var(--bg-secondary); border-top: 1px solid var(--border-light); }
.mobile-bottombar .container-xl{ padding: 8px 12px; }
.mobile-bottombar .mb-row{ display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap: wrap; }
@media (max-width: 768px){ .mobile-bottombar{ display:block; } }

/* Pretty credit badge for mobile */
.mobile-bottombar .credit-badge{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: #16a34a;
  font-size: 0.9rem;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.28);
  box-shadow: 0 6px 18px rgba(22,163,74,0.18);
  flex: 1 1 60%;
  text-align: center;
}
.mobile-bottombar .credit-badge .ti{ font-size: 1rem; color:#16a34a; }

/* Compact selects/buttons in mobile bottom bar */
.mobile-bottombar .form-select.form-select-sm{ font-size: 0.6875rem; padding: 0.25rem 0.5rem; height: 28px; }
.mobile-bottombar .btn{ font-size: 0.6875rem; padding: 0.25rem 0.5rem; height: 28px; line-height: 1; }
.mobile-bottombar #langSelect{ min-width: 64px !important; }
.mobile-bottombar #themeSelect{ min-width: 80px !important; }

/* Slightly compact desktop selects as well */
@media (min-width: 768px){
  header.navbar .form-select.form-select-sm{ font-size: 0.8rem; padding: 0.25rem 0.5rem; height: 32px; }
}

/* Theme-aware text helpers and overrides */
body.theme-dark .text-theme { color: #ffffff !important; }
body.theme-dark .text-white, body.theme-dark .text-light { color: #ffffff !important; }
/* Force override inline whites if present inside PHP pages */
body.theme-dark [style*="color:#000"],
body.theme-dark [style*="color: #000"],
body.theme-dark [style*="color:black"],
body.theme-dark [style*="color: black"] { color: #ffffff !important; }

/* Hide/Show buttons for mobile bottom bar */
.mb-hide-btn{ position:absolute; right:10px; top:-12px; width:28px; height:28px; border-radius:50%; border:1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-sm); }
.mb-hide-btn .ti{ font-size: 1rem; }
.mb-hide-btn:active{ transform: scale(0.96); }

.mb-show-btn{ position: fixed; right:10px; bottom:10px; width:34px; height:34px; border-radius:50%; border:1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); display:none; align-items:center; justify-content:center; z-index: 1041; box-shadow: var(--shadow-md); }
.mb-show-btn .ti{ font-size: 1.1rem; }
.mb-show-btn:active{ transform: scale(0.96); }

.mobile-bottombar.is-hidden{ transform: translateY(110%); }

@media (max-width: 576px) {
  .navbar { padding: 0.75rem; }
  .navbar .navbar-brand { font-size: 1rem; }
  .navbar .navbar-brand img { height: 24px; }
  .navbar .nav-link, .navbar .btn { padding: 0.625rem 0.75rem !important; font-size: 0.813rem; }
}

/* Login Page */
body.login-page {
  background: var(--bg-primary) url('../img/background.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
}

.page-center .card {
  background-color: rgba(30, 36, 51, 0.95);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  max-width: 400px;
  margin: 0 auto;
}

.page-center .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  padding: 2rem;
}

.page-center .card-body { padding: 2rem; }

/* Cards - NO HOVER EFFECTS */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-inverse);
  padding: 1.25rem;
  font-weight: 600;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-glow);
}

.card-body { padding: 1.5rem; }
.card-footer { background-color: var(--bg-tertiary); border-top: 1px solid var(--border-light); padding: 1rem 1.5rem; }

/* Host Request Modal (#confirmModal) */
#confirmModal .modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#confirmModal .modal-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-inverse);
}

#confirmModal .modal-header .modal-title {
  color: var(--text-inverse);
}

#confirmModal .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

#confirmModal .modal-header.bg-warning {
  background: linear-gradient(135deg, var(--warning), #e08600) !important;
  border-color: var(--warning) !important;
  color: #000 !important;
}

/* Host Status Badges */
.host-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.host-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.host-status-pending {
  background: rgba(255, 149, 0, 0.12);
  color: #ffb84d;
  border: 1px solid rgba(255, 149, 0, 0.25);
}
.host-status-pending::before { background: #ff9500; box-shadow: 0 0 6px rgba(255, 149, 0, 0.5); }

.host-status-registering {
  background: rgba(59, 130, 246, 0.12);
  color: #7cb8ff;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.host-status-registering::before { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-registered {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.host-status-registered::before { background: #6366f1; box-shadow: 0 0 6px rgba(99, 102, 241, 0.5); }

.host-status-cf_adding {
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.25);
}
.host-status-cf_adding::before { background: #f97316; box-shadow: 0 0 6px rgba(249, 115, 22, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-ssl_setting {
  background: rgba(168, 85, 247, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.host-status-ssl_setting::before { background: #a855f7; box-shadow: 0 0 6px rgba(168, 85, 247, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-dns_adding {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.25);
}
.host-status-dns_adding::before { background: #ec4899; box-shadow: 0 0 6px rgba(236, 72, 153, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-ns_updating {
  background: rgba(14, 165, 233, 0.12);
  color: #67d4ff;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.host-status-ns_updating::before { background: #0ea5e9; box-shadow: 0 0 6px rgba(14, 165, 233, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-active {
  background: rgba(0, 168, 107, 0.12);
  color: #4ade80;
  border: 1px solid rgba(0, 168, 107, 0.25);
}
.host-status-active::before { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }

.host-status-host_switching {
  background: rgba(20, 184, 166, 0.12);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.host-status-host_switching::before { background: #14b8a6; box-shadow: 0 0 6px rgba(20, 184, 166, 0.5); animation: pulse-dot 1.5s ease-in-out infinite; }

.host-status-failed {
  background: rgba(220, 53, 69, 0.12);
  color: #f87171;
  border: 1px solid rgba(220, 53, 69, 0.25);
}
.host-status-failed::before { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Activation Timer Ring */
.activation-timer-ring {
  position: relative;
  width: 120px;
  height: 120px;
  display: inline-block;
}
.activation-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tblr-primary);
}

#confirmModal .modal-header.bg-warning .modal-title {
  color: #000 !important;
}

#confirmModal .modal-header.bg-warning .btn-close {
  filter: none;
}

#confirmModal .modal-body {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

#confirmModal .modal-footer {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
}

#confirmModal .alert-warning {
  background-color: rgba(255, 149, 0, 0.15);
  border-color: rgba(255, 149, 0, 0.3);
  color: #ffb84d;
}

#confirmModal .alert-info {
  background-color: rgba(0, 102, 204, 0.15);
  border-color: rgba(0, 102, 204, 0.3);
  color: #6db3f2;
}

#hostToggleModal .modal-content,
#externalDomainModal .modal-content,
#nsCloudflareModal .modal-content,
#deleteDomainModal .modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-medium);
}

#hostToggleModal .modal-header,
#externalDomainModal .modal-header,
#nsCloudflareModal .modal-header,
#deleteDomainModal .modal-header {
  border-bottom: 1px solid var(--border-light);
}

#hostToggleModal .modal-header.bg-primary,
#externalDomainModal .modal-header.bg-primary,
#nsCloudflareModal .modal-header.bg-primary,
#deleteDomainModal .modal-header.bg-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
  border-color: var(--primary) !important;
  color: var(--text-inverse) !important;
}

#hostToggleModal .modal-header.bg-primary .modal-title,
#externalDomainModal .modal-header.bg-primary .modal-title,
#nsCloudflareModal .modal-header.bg-primary .modal-title,
#deleteDomainModal .modal-header.bg-primary .modal-title {
  color: var(--text-inverse) !important;
}

#hostToggleModal .modal-header.bg-primary .btn-close,
#externalDomainModal .modal-header.bg-primary .btn-close,
#nsCloudflareModal .modal-header.bg-primary .btn-close,
#deleteDomainModal .modal-header.bg-primary .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

#hostToggleModal .modal-header.bg-warning .modal-title {
  color: #000 !important;
}

#hostToggleModal .modal-header.bg-warning .btn-close {
  filter: none;
}

#hostToggleModal .modal-body,
#externalDomainModal .modal-body,
#nsCloudflareModal .modal-body,
#deleteDomainModal .modal-body {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

#hostToggleModal .modal-footer,
#externalDomainModal .modal-footer,
#nsCloudflareModal .modal-footer,
#deleteDomainModal .modal-footer {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-light);
}

#hostToggleModal .country-list {
  max-height: 320px;
  overflow: auto;
  background-color: var(--bg-input);
  border-color: var(--border-light) !important;
}

#hostToggleModal .country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
}

#hostToggleModal .country-option:hover {
  background: var(--bg-tertiary);
}

#hostToggleModal .country-option input {
  flex: 0 0 auto;
}

#hostToggleModal .country-code {
  font-family: monospace;
  color: var(--text-muted);
}

/* Forms */
.form-control, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-input);
  border-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }
.input-group-text { background-color: var(--bg-input); border: 1px solid var(--border-light); color: var(--text-muted); border-radius: var(--radius-md); }
.form-label { color: var(--text-inverse); font-weight: 500; margin-bottom: 0.5rem; }

/* Disabled form elements */
.form-select:disabled {
    background-color: #141920;
    color: var(--text-secondary) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.form-control:disabled {
    background-color: #141920;
    color: var(--text-secondary) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Tables - NO HOVER EFFECTS */
.table {
  color: var(--text-primary);
  margin-bottom: 0;
}

.table-bordered > :not(caption) > * > * { border-color: var(--border-light); }

.table th {
  background-color: var(--bg-tertiary);
  color: var(--text-inverse);
  font-weight: 600;
  border-bottom: 2px solid var(--border-medium);
  padding: 1rem;
}

.table td {
  padding: 1rem;
  border-color: var(--border-light);
}

/* Remove all table hover effects */
.table-hover tbody tr:hover,
.table tbody tr:hover,
#tableWrap .table tbody tr:hover,
#tableWrap .table tbody tr:hover td,
.table-hover tbody tr:hover td,
.table tbody tr:hover td,
.table tbody tr td:hover,
.table tbody tr:hover td:hover,
#tableWrap .table tbody tr td:hover,
#tableWrap .table tbody tr:hover td:hover,
.table td:hover,
#tableWrap .table td:hover {
  background-color: transparent !important;
  color: inherit !important;
}

.table-dark {
  --tblr-table-border-color: var(--border-light);
  background-color: var(--bg-card);
}

.table-dark > th {
  color: var(--text-inverse) !important;
  background: var(--bg-tertiary) !important;
}

#tableWrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: auto;
  min-height: 600px;
  max-height: 1200px;
}

#tableWrap .table { margin-bottom: 0; }

#tableWrap .table th {
  background: var(--bg-tertiary);
  color: var(--text-inverse);
  font-weight: 600;
  border-bottom: 2px solid var(--border-medium);
  padding: 0.75rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
}

#tableWrap .table td {
  padding: 0.75rem;
  border: none;
  text-align: center;
  vertical-align: middle;
}

#tableWrap .table tbody tr:nth-child(odd) { background-color: var(--bg-card); }
#tableWrap .table tbody tr:nth-child(even) { background-color: var(--bg-tertiary); }

#tableWrap .table .lc { text-align: left !important; line-height: 1.4; }
#tableWrap .table .lc .compact-ch-name { color: var(--success) !important; font-size: 0.8rem !important; font-weight: 600 !important; margin-bottom: 2px !important; }
#tableWrap .table .lc .compact-ip { color: var(--danger) !important; font-size: 0.8rem !important; font-weight: 600 !important; }

/* Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c82333) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333, var(--danger)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #00915c) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #00915c, var(--success)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #e68600) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e68600, var(--warning)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, var(--info), #138496) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #138496, var(--info)) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }

/* Components */
.dropdown-menu {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.dropdown-menu .dropdown-item {
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.dropdown-menu .dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-inverse);
}

.dropdown-divider { border-top-color: var(--border-light); margin: 0.5rem 0; }

.dropdown-menu.action-menu {
  min-width: 240px;
  padding: 10px;
}

.dropdown-menu.action-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-menu.action-menu .dropdown-item:hover,
.dropdown-menu.action-menu .dropdown-item:focus,
.dropdown-menu.action-menu .dropdown-item:active {
  background: var(--bg-tertiary);
  color: var(--text-inverse) !important;
}

.dropdown-menu.action-menu .action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  line-height: 1;
  transition: var(--transition);
}

.dropdown-menu.action-menu .action-icon i { font-size: 18px; }

.action-icon.btn-danger { background: rgba(220, 53, 69, 0.2); color: #ff6b7a; border: 0; }
.action-icon.btn-danger:hover { background: rgba(220, 53, 69, 0.3); transform: scale(1.1); }

.action-icon.btn-success { background: rgba(0, 168, 107, 0.2); color: #4cd964; border: 0; }
.action-icon.btn-success:hover { background: rgba(0, 168, 107, 0.3); transform: scale(1.1); }

.action-icon.btn-info { background: rgba(23, 162, 184, 0.2); color: #5ac8fa; border: 0; }
.action-icon.btn-info:hover { background: rgba(23, 162, 184, 0.3); transform: scale(1.1); }

.action-icon.btn-primary { background: rgba(0, 102, 204, 0.2); color: #007aff; border: 0; }
.action-icon.btn-primary:hover { background: rgba(0, 102, 204, 0.3); transform: scale(1.1); }

.dropdown-menu.action-menu .dropdown-item .label { color: var(--text-primary); font-weight: 500; }

/* Playlist Modal */
.pl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1090;
  display: none;
  backdrop-filter: blur(5px);
}

.pl-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92vw;
  max-width: 840px;
  max-height: 92vh;
  overflow: auto;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  display: none;
  border: 1px solid var(--border-light);
}

.pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-input));
  border-bottom: 1px solid var(--border-light);
}

.pl-title { font-size: 18px; font-weight: 700; color: var(--text-inverse); }

.pl-close {
  border: 0;
  background: var(--bg-input);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: var(--transition);
}

.pl-close:hover {
  background: var(--danger);
  color: var(--text-inverse);
  transform: scale(1.1);
}

.pl-body { padding: 14px; }
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pl-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.pl-block h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
}

.pl-input, .pl-textarea {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 14px;
  transition: var(--transition);
}

.pl-input:focus, .pl-textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.pl-textarea { height: 70px; resize: vertical; }
.pl-list { margin-top: 8px; }

.pl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.pl-item:hover {
  background: var(--bg-input);
  transform: translateX(5px);
}

.pl-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
}

.pl-actions { display: flex; align-items: center; gap: 8px; }
.pl-hidden { display: none; margin-top: 8px; }

@media (max-width: 768px) {
  .pl-item { flex-wrap: wrap; align-items: flex-start; }
  .pl-label { width: 100%; align-items: flex-start; gap: 6px; }
  .pl-label .pl-url { display: block; overflow-wrap: anywhere; word-break: break-word; white-space: normal; direction: ltr; font-weight: 400; color: #ffffff; }
  .pl-actions { width: 100%; margin-top: 6px; justify-content: flex-start; }
}

/* DNS Warning Animation */
@keyframes dnsWarningPulse {
  0%, 100% { color: #ff0000; text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
  25% { color: #ff6600; text-shadow: 0 0 8px rgba(255, 102, 0, 0.7); }
  50% { color: #ffcc00; text-shadow: 0 0 10px rgba(255, 204, 0, 0.9); }
  75% { color: #ff6600; text-shadow: 0 0 8px rgba(255, 102, 0, 0.7); }
}

.dns-warning-message {
  display: inline-block;
  margin-left: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  animation: dnsWarningPulse 2s ease-in-out infinite;
}

/* Desktop URL color */
.pl-label .pl-url { color: #ffffff; }

.btn-copy, .btn-download {
  border: 0;
  background: var(--primary);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  transition: var(--transition);
}

.btn-copy:hover, .btn-download:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.list-group-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  transition: var(--transition);
}

.list-group-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-inverse);
}

.list-group-item.bg-black {
  background-color: var(--bg-primary) !important;
  color: var(--text-inverse) !important;
}

/* Utilities */
.row-borderd > div { border-color: var(--border-light) !important; }
.row > div > label { vertical-align: middle; color: var(--text-inverse); font-weight: 500; }
.w-md-50 { width: 50%; }
.w-md-25 { width: 25%; }

.text-dark { color: var(--text-primary) !important; }
.text-danger { color: var(--danger) !important; }

.mc-full {
  color: var(--success) !important;
  background: rgba(0, 168, 107, 0.2) !important;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  font-weight: 600;
}

.text-secondary { color: var(--text-muted) !important; }
.text-muted { color: var(--text-muted) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.border { border: 1px solid var(--border-light) !important; }
.border-top { border-top: 1px solid var(--border-light) !important; }
.border-bottom { border-bottom: 1px solid var(--border-light) !important; }

.bg-dark { background-color: var(--bg-card) !important; }
.bg-darker { background-color: var(--bg-tertiary) !important; }
.bg-darkest { background-color: var(--bg-primary) !important; }

.ti-xs { font-size: 1.125rem !important; }
.ti-sm { font-size: 1.376rem !important; }
.ti-md { font-size: 1.625rem !important; }
.ti-lg { font-size: 2rem !important; }
.ti-xl { font-size: 2.25rem !important; }

/* Responsive Design */
@media (max-width: 1200px) {
  .page .container-xl { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 992px) {
  .card { margin-bottom: 1rem; }
  .table-responsive { border: 0; }
  .table { font-size: 0.875rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
}

@media (max-width: 768px) {
  .card .card-body { padding: 1rem; }
  .table { font-size: 0.813rem; }
  .table th, .table td { padding: 0.5rem; }
  .navbar .navbar-brand img { height: 24px; }
  .row-borderd > div { border: 0 !important; }
  .w-md-50, .w-md-25 { width: 100%; }
  .pl-grid { grid-template-columns: 1fr; }
  .pl-item { flex-wrap: wrap; }
  .app-footer { text-align: center; }
  .app-footer .col-md-4 { margin-bottom: 1rem; }
  .form-control, .form-select { font-size: 0.875rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
  .card-header { padding: 0.75rem 1rem; }
  .list-group-item { padding: 0.75rem 1rem; }
  .row.row-cards > div { margin-bottom: 1rem; }
}

@media (max-width: 576px) {
  .page .container-xl { padding-left: 0.75rem; padding-right: 0.75rem; }
  .card { border-radius: var(--radius-md); margin-bottom: 1rem; }
  .card .card-body { padding: 0.75rem; }
  .table { font-size: 0.75rem; }
  .table th, .table td { padding: 0.5rem 0.25rem; }
  .btn { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
  .form-control, .form-select { padding: 0.5rem 0.75rem; font-size: 0.813rem; }
  .navbar .navbar-brand img { height: 22px; }
  .pl-modal { width: 98vw; max-height: 96vh; border-radius: 12px; }
  .pl-grid { gap: 0.75rem; }
  .pl-block { padding: 0.75rem; }
  .pl-item { padding: 0.75rem; }
  .app-footer { padding: 1rem 0; font-size: 0.813rem; }
  .app-footer .logo-wrap img { height: 22px; }
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.75rem; }
  h3, .h3 { font-size: 1.5rem; }
  h4, .h4 { font-size: 1.25rem; }
  h5, .h5 { font-size: 1.125rem; }
  h6, .h6 { font-size: 1rem; }
}

/* Footer */
.app-footer {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-input) 60%, var(--bg-card) 100%);
  color: var(--text-muted);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
  margin-top: 3rem;
}

.app-footer .brand {
  color: var(--text-inverse);
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 1.125rem;
}

.app-footer .logo-wrap img {
  height: 26px;
  width: auto;
  vertical-align: middle;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.app-footer a:hover {
  color: var(--text-inverse);
  text-decoration: underline;
}

.app-footer .divider { opacity: 0.35; margin: 0 0.5rem; }

/* Animations & Effects */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease-out; }

.glow { box-shadow: 0 0 15px rgba(0, 102, 204, 0.3); }
.glow-danger { box-shadow: 0 0 15px rgba(220, 53, 69, 0.3); }
.glow-success { box-shadow: 0 0 15px rgba(0, 168, 107, 0.3); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 102, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0); }
}

.pulse { animation: pulse 2s infinite; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg-tertiary);
}

/* Additional utilities */
.pl-full{ grid-column: 1 / -1; margin-bottom: 14px; }
.pl-textarea-lg{ height: 220px; }
@media (max-width: 576px){
  .pl-textarea-lg{ height: 60vh; }
}



