:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-light-card: #ffffff;
  --text-main: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #94a3b8;
  
  --primary-red: #e63743;
  --primary-red-hover: #cc2b36;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-light-color: rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--primary-red); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* CLEAN SOBER PANELS */
.sober-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.card-padding { padding: 1.5rem; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}

.btn-red {
  background-color: var(--primary-red);
  color: #ffffff;
}
.btn-red:hover {
  background-color: var(--primary-red-hover);
}

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

.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  position: relative;
}
.btn-icon:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }

/* NOTIFICATIONS DROPDOWN PANEL */
.notif-dropdown-panel {
  position: absolute;
  top: 45px;
  right: 0;
  width: 340px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 99999;
  overflow: hidden;
}

.notif-dropdown-header {
  padding: 0.85rem 1rem;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-dropdown-body {
  max-height: 300px;
  overflow-y: auto;
}

.notif-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}
.notif-item.unread {
  background: rgba(230, 55, 67, 0.05);
}

/* INPUT GROUPS */
.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-red);
}

/* LOGIN SCREEN */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 { font-size: 1.75rem; color: var(--text-main); }
.auth-header h2 span { color: var(--primary-red); }
.auth-header p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.25rem; }

/* APP LAYOUT */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  background: #090d16;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-brand h1 { font-size: 1.3rem; }
.sidebar-brand span { color: var(--primary-red); }

.sidebar-menu {
  flex: 1;
  padding: 0 0.75rem;
  overflow-y: auto;
}

.menu-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.4rem 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.menu-item:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }
.menu-item.active { color: #ffffff; background: var(--primary-red); }

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
}

/* MAIN CONTENT */
.main-viewport {
  flex: 1;
  margin-left: 250px;
  padding: 1.5rem 2rem 3rem 2rem;
}

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.top-navbar h2 { font-size: 1.6rem; }

/* BADGES */
.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.badge-danger { background: rgba(230, 55, 67, 0.15); color: var(--primary-red); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

/* DASHBOARD & SERVICES LIST */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

.overview-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.overview-number {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.overview-pills {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.8rem;
}

.service-list-container {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.service-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  padding: 0.85rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-light-color);
}

.service-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.service-list-row:hover { background: #f8fafc; }

/* TUNNEL DETAIL PAGE */
.tunnel-detail-header {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.tunnel-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tunnel-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}

.tunnel-tab {
  padding: 0.75rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
}

.tunnel-tab.active {
  color: var(--primary-red);
  border-bottom-color: var(--primary-red);
}

.tunnel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

/* MON COMPTE 5 CATEGORIES NAV */
.account-category-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.acc-cat-tab {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.acc-cat-tab.active {
  color: var(--primary-red);
  border-bottom-color: var(--primary-red);
}

/* CART PAGE (`#cart`) */
.cart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.cart-summary-box {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light-color);
  font-size: 0.9rem;
}

.cart-total-row {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  border-bottom: none;
  padding-top: 1rem;
}

/* FLEXIBLE PRICING LIST */
.flexible-pricing-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flexible-pricing-row {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.75rem;
  display: grid;
  grid-template-columns: 180px 1fr 140px 140px;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pricing-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  font-size: 0.85rem;
}

.pricing-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* CUSTOM POPUP DIALOGS */
.custom-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-md);
  padding: 2rem;
}

/* PROGRESS BAR */
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-red);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* MOBILE BOTTOM NAV */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 65px;
  background: #090d16;
  border-top: 1px solid var(--border-color);
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  overflow-x: auto;
}


.mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  min-width: 60px;
}
.mobile-bar-item i { font-size: 1.35rem; }
.mobile-bar-item.active { color: var(--primary-red); }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-bottom-bar { display: flex; }
  .main-viewport { margin-left: 0; padding: 1rem 1rem 80px 1rem; }
  .dashboard-layout, .tunnel-grid, .cart-grid { grid-template-columns: 1fr; }
  .flexible-pricing-row { grid-template-columns: 1fr; text-align: center; }
  .pricing-specs { grid-template-columns: 1fr 1fr; }
  .account-category-tabs { width: 100%; overflow-x: auto; }
}

/* ==========================================
   STORE WIZARD
   ========================================== */
.store-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.3s;
}
.wizard-step.active { color: var(--primary-red); }
.wizard-step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  background: var(--bg-card);
  transition: all 0.3s;
}
.wizard-step.active .wizard-step-dot {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #fff;
  box-shadow: 0 0 18px rgba(230, 55, 67, 0.5);
}
.wizard-step-line {
  flex: 1;
  max-width: 120px;
  height: 2px;
  background: var(--border-color);
  margin: 0 1rem;
  margin-bottom: 1.4rem;
}

.store-wizard-page { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* IP TYPE CARDS */
.ip-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.ip-type-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.ip-type-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(230, 55, 67, 0.18);
}
.ip-type-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(230, 55, 67, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-red);
}
.ip-type-icon.shared {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}
.ip-type-badge {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  background: rgba(230, 55, 67, 0.15);
  color: var(--primary-red);
  border: 1px solid rgba(230, 55, 67, 0.3);
  text-transform: uppercase;
}
.ip-type-badge.shared {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}
.ip-type-card h3 { font-size: 1.35rem; }
.ip-type-card p { font-size: 0.88rem; line-height: 1.6; }
.ip-type-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.ip-type-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.ip-type-features i { color: var(--accent-green); font-size: 1rem; flex-shrink: 0; }
.ip-type-price {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ip-type-from {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ip-type-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-red);
  font-family: 'Outfit', sans-serif;
}
.ip-type-amount small { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.ip-type-select-btn {
  margin-top: 0.6rem;
  background: var(--primary-red);
  color: #fff;
  text-align: center;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.ip-type-select-btn.shared { background: var(--accent-blue); }
.ip-type-card:hover .ip-type-select-btn { background: var(--primary-red-hover); }
.ip-type-card:hover .ip-type-select-btn.shared { background: #2563eb; }

/* STEP 2 LAYOUT */
.store-config-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* SLIDERS */
.slider-group { display: flex; flex-direction: column; }
.slider-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.slider-label i { color: var(--primary-red); }
.slider-value-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  background: rgba(230, 55, 67, 0.12);
  color: var(--primary-red);
  border: 1px solid rgba(230, 55, 67, 0.25);
  white-space: nowrap;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary-red);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 12px rgba(230, 55, 67, 0.5);
  transition: transform 0.15s;
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 10px;
}
.range-slider.range-slider-blue::-webkit-slider-thumb {
  background: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}
.range-slider.range-slider-green::-webkit-slider-thumb {
  background: var(--accent-green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* PRICE PREVIEW */
.store-price-preview {
  position: sticky;
  top: 1.5rem;
  border: 1px solid rgba(230, 55, 67, 0.2);
}
.store-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 1rem;
}
.store-preview-price { text-align: center; padding: 1.2rem 0; border-bottom: 1px solid var(--border-color); }
.store-price-main {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--primary-red);
  line-height: 1;
}
.store-price-main small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.store-preview-breakdown { display: flex; flex-direction: column; gap: 0.6rem; }
.store-preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.87rem;
  color: var(--text-muted);
}
.store-preview-row span:last-child { font-weight: 600; color: var(--text-main); }
.store-preview-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.3rem 0;
}
.store-preview-total {
  font-weight: 700;
  font-size: 1rem;
}
.store-preview-total span:last-child { font-size: 1.2rem; }

@media (max-width: 900px) {
  .ip-type-selector { grid-template-columns: 1fr; }
  .store-config-grid { grid-template-columns: 1fr; }
  .store-price-preview { position: static; }
}

