/* ==========================================================================
   TGBOOST PRO 2026 DESIGN SYSTEM — NEXT-GEN SAAS AESTHETICS (LINEAR / STRIPE / DUB)
   ========================================================================== */

:root {
  /* Surface & Background Palette */
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-input: #FFFFFF;
  --bg-input-focus: #FFFFFF;
  
  /* Borders */
  --border-subtle: #E2E8F0;
  --border-card: #E2E8F0;
  --border-card-hover: #CBD5E1;
  --border-focus: #0284C7;
  --border-divider: #F1F5F9;
  
  /* Brand Accents */
  --primary: #0284C7;
  --primary-bright: #0284C7;
  --primary-hover: #0369A1;
  --primary-light: rgba(2, 132, 199, 0.08);
  --primary-glow: rgba(2, 132, 199, 0.25);
  
  --telegram-blue: #0284C7;
  --telegram-dark: #0070BA;
  
  --success: #059669;
  --success-light: #ECFDF5;
  --success-border: #A7F3D0;
  
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --warning-border: #FDE68A;
  
  --danger: #E11D48;
  --danger-light: #FFF1F2;
  --danger-border: #FECDD3;
  
  --purple: #7C3AED;
  --purple-light: #F5F3FF;
  
  /* Typography Colors (High-Contrast & Clean) */
  --text-pure: #0F172A;
  --text-main: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  
  /* Geometry & Shadows */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 8px 24px -2px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 15% 0%, rgba(2, 132, 199, 0.04) 0px, transparent 50%),
    radial-gradient(at 85% 100%, rgba(5, 150, 105, 0.03) 0px, transparent 50%),
    linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Top Navigation Bar */
.top-navbar {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  box-shadow: var(--shadow-xs);
}

.top-navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0284C7 0%, #2563EB 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  color: white;
  font-size: 16px;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary-bright);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(2, 132, 199, 0.2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-menu.horizontal-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.6);
}

.nav-item.active {
  color: var(--primary-bright);
  background: #FFFFFF;
  border-color: rgba(2, 132, 199, 0.15);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.nav-item i {
  font-size: 14px;
  opacity: 0.9;
}

.nav-item.active i {
  opacity: 1;
}

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

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 28px 28px 48px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* Modern Card Architecture */
.glass-card,
.tg-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.glass-card:hover,
.tg-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.card-title i {
  font-size: 15px;
  color: var(--primary-bright);
}

/* Top Metrics Grid (4 KPI Cards) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  will-change: box-shadow, border-color;
}

.metric-card:hover {
  border-color: var(--border-card-hover);

  box-shadow: var(--shadow-hover);
}

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

.metric-title {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.badge-live {
  background: var(--primary-light);
  color: var(--primary-bright);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-trend {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-pure);
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  margin-bottom: 4px;
  line-height: 1.1;
}

.metric-footer {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Dashboard Grid Layout (2-Column Main Workspace) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Inputs & Sliders */
.config-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-label .highlight {
  color: var(--primary-bright);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.slider-container {
  padding: 8px 0 4px;
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #E2E8F0;
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0284C7;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
  border: 3px solid #FFFFFF;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.5);
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0284C7;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
  border: 3px solid #FFFFFF;
  transition: transform 0.15s ease;
}

.input-field {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-pure);
  font-size: 13.5px;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.input-field:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Presets & Chips Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.preset-btn {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: var(--transition);
  text-align: center;
}

.preset-btn:hover {
  background: #F1F5F9;
  color: var(--text-pure);
  border-color: #CBD5E1;
}

.preset-btn.active {
  background: var(--primary-light);
  color: var(--primary-bright);
  border-color: rgba(2, 132, 199, 0.35);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.12);
}

/* Feature Option Cards (3 Toggles) */
.toggle-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .toggle-options-grid {
    grid-template-columns: 1fr;
  }
}

.toggle-card {
  background: #F8FAFC;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.toggle-card:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.toggle-card.active {
  border-color: rgba(2, 132, 199, 0.3);
  background: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.toggle-info h5 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Switches (iOS Style) */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 20px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .slider-switch {
  background-color: var(--primary-bright);
}

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

/* ==========================================================================
   COST BREAKDOWN & CHANNEL ECONOMY CARD (CLEAN SAAS UI)
   ========================================================================== */
.cost-breakdown-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.calc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.calc-label i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.calc-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-pure);
  font-size: 13px;
  text-align: right;
  letter-spacing: -0.01em;
}

.calc-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 6px 24px;
  font-size: 11.5px;
}

.calc-sublabel {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.calc-subvalue {
  color: #DB2777;
  font-weight: 600;
  font-family: var(--font-mono);
}

.calc-divider {
  height: 1px;
  background: var(--border-divider);
  margin: 6px 0;
}

.calc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cam-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.cam-styled-input {
  width: 120px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #DB2777;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 34px 4px 8px;
  border-radius: var(--radius-xs);
  text-align: right;
  outline: none;
  transition: var(--transition);
}

.cam-styled-input:focus {
  border-color: #DB2777;
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.1);
}

.cam-styled-suffix {
  position: absolute;
  right: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

.calc-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 6px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
}

.calc-total-label {
  font-weight: 700;
  color: #166534;
  font-size: 13px;
}

.calc-total-value {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #059669;
  font-size: 16.5px;
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  font-family: var(--font-sans);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #0284C7 0%, #0070BA 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  border-color: rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #0396E2 0%, #0080D4 100%);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

.btn-primary:active {
  opacity: 0.95;
}

.btn-secondary {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--text-pure);
}

.btn-secondary:active {
  background: #F1F5F9;
}

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

/* Segmented Chart Controls (macOS Pill Style) */
.chart-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.chart-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.18s ease, 
              box-shadow 0.22s ease, 
              border-color 0.22s ease;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  position: relative;
  z-index: 1;
}

.chart-tab-btn.active {
  background: #FFFFFF;
  color: var(--primary-bright);
  border: 1px solid rgba(2, 132, 199, 0.25);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.chart-tab-btn:hover:not(.active) {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.6);
}

.post-feed-link {
  font-size: 12px;
  color: var(--primary-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
  transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

.post-feed-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Chart Canvas */
.chart-container {
  position: relative;
  height: 270px;
  width: 100%;
}

/* Glassmorphism Premium Chart Tooltip */
.chart-glass-tooltip {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 12px 16px;
  pointer-events: none;
  transition: opacity 0.12s cubic-bezier(0.16, 1, 0.3, 1), transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  font-family: var(--font-sans);
  color: var(--text-pure);
  min-width: 200px;
}

.chart-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-bright);
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
  flex-shrink: 0;
}

.chart-tooltip-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-pure);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.chart-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chart-tooltip-row {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.chart-tooltip-row i {
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.chart-tooltip-row strong {
  color: var(--text-pure);
  font-weight: 700;
}

/* Telegram Desktop Preview (Right Column) */
.telegram-preview-card {
  background: #F1F5F9;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.tg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tg-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  letter-spacing: -0.02em;
  user-select: none;
}

.channel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
  flex-shrink: 0;
  overflow: hidden;
  text-transform: uppercase;
  user-select: none;
}

.channel-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  text-transform: uppercase;
  user-select: none;
}

.user-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
}

.tg-meta h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-badge {
  color: #0284C7;
  font-size: 13px;
}

.tg-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.tg-content {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  margin-bottom: 12px;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.tg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* Custom UI Vector Reaction Badges */
.reaction-pill {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
  cursor: pointer;
}

.reaction-pill:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  background: #F8FAFC;
}

.reaction-pill.reaction-fire i { color: #F97316; }
.reaction-pill.reaction-thumb i { color: #0284C7; }
.reaction-pill.reaction-heart i { color: #E11D48; }

.tg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-divider);
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tg-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tg-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Wave Schedule Breakdown List */
.wave-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-divider);
  font-size: 12.5px;
}

.wave-schedule-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wave-day-title {
  color: var(--text-secondary);
  font-weight: 600;
  width: 65px;
  font-size: 12px;
}

.wave-bar-bg {
  flex: 1;
  height: 7px;
  background: #E2E8F0;
  border-radius: 4px;
  margin: 0 14px;
  overflow: hidden;
}

.wave-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s ease;
}

.wave-views-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-pure);
  font-size: 12.5px;
  text-align: right;
  min-width: 95px;
}

/* Guarantee / KPI Badges in Right Column */
.security-badge-item {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.security-badge-item:hover {
  border-color: #CBD5E1;

}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 560px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.15s;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-pure);
}

/* Toast Notifications (Next-Gen Light SaaS) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999;
  pointer-events: none;
}

.toast {
  background: #FFFFFF !important;
  border: 1px solid var(--border-card) !important;
  padding: 12px 18px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 14px 36px -4px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-pure) !important;
  animation: slideInToast 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  pointer-events: auto !important;
  min-width: 260px !important;
  max-width: 440px !important;
  backdrop-filter: blur(16px);
}

@keyframes slideInToast {
  from { transform: translateX(120%) scale(0.95); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

/* Modal Notification Items */
.notification-item {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.notification-item:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-sm);

}

.notification-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notification-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
}

.notification-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.notification-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Tab Content Transitions */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInContent 0.25s ease forwards;
}

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

/* Channel Cards (High-End SaaS Bento) */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.channel-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  position: relative;
}

.channel-card:hover {
  border-color: #CBD5E1;

  box-shadow: var(--shadow-md);
}

.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channel-card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.channel-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.channel-card-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.channel-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card-handle {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-stats-bento {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 4px;
}

.channel-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.channel-stat-col:not(:last-child) {
  border-right: 1px solid #E2E8F0;
}

.channel-stat-col .label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.channel-stat-col .val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure);
}

.channel-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ch-badge-tag {
  background: #F1F5F9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ch-badge-tag i {
  font-size: 10.5px;
  color: var(--text-muted);
}

.ch-badge-tag.highlight {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}

.ch-badge-tag.highlight i {
  color: #059669;
}

.channel-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-divider);
  gap: 10px;
}

/* Back Button & Channel Hero Detail Card */
.back-to-channels-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  color: var(--text-main);
  cursor: pointer;
}

.back-to-channels-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--text-pure);
  box-shadow: var(--shadow-sm);
}

.btn-danger-soft {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-danger-soft:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #B91C1C;

  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-icon-delete {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-delete:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #DC2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);

}

.channel-hero-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: var(--transition);
}

.channel-hero-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

/* Channel Settings Bento Grid */
.channel-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 1100px) {
  .channel-settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.channel-setting-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.channel-setting-card:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;

  box-shadow: var(--shadow-sm);
}

.ch-setting-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.channel-setting-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.channel-setting-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.channel-setting-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-pure);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Post Feed */
.posts-feed-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-feed-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-feed-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-sm);
}

.post-feed-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding-right: 20px;
}

.post-feed-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.post-feed-preview h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure);
  margin: 3px 0 2px 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.post-feed-preview p {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-feed-metrics {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.metric-pill-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  min-width: 120px;
}

.metric-pill-box .label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.metric-pill-box .val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
  text-align: center;
  letter-spacing: -0.01em;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

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

.custom-table th {
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-divider);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.custom-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-divider);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: #F8FAFC;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-divider);
  flex-wrap: wrap;
  gap: 12px;
}

.page-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-width: 32px;
  text-align: center;
}

.page-btn:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--text-pure);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary-bright);
  color: white;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Step Wizard in Modals */
.step-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary-bright);
  border: 1px solid rgba(2, 132, 199, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.step-text h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 2px;
}

.step-text p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.verify-status-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  display: none;
}

.verify-status-box.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: var(--text-pure);
  font-size: 12.5px;
}

.verify-status-box.success {
  display: block;
  background: #FFFFFF;
  border: 1px solid #A7F3D0;
  box-shadow: var(--shadow-xs);
  color: var(--text-pure);
  font-size: 12.5px;
}/* 2. Tab Navigation & Content Transitions */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInTab 0.2s ease-out;
}

@keyframes fadeInTab {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* 3. Cards & Clean Light Hover */
.glass-card,
.metric-card,
.channel-card,
.post-feed-card,
.toggle-card,
.cost-breakdown-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover,
.channel-card:hover,
.post-feed-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-sm);
}

/* 4. Buttons & Interactive Controls */
.btn {
  transition: background 0.15s ease, 
              border-color 0.15s ease,
              color 0.15s ease,
              box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  box-shadow: var(--shadow-xs);
}

.btn:active:not(:disabled) {
  opacity: 0.92;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.preset-btn {
  transition: background 0.15s ease, 
              border-color 0.15s ease, 
              color 0.15s ease, 
              box-shadow 0.15s ease;
}

.preset-btn:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.preset-btn:active {
  background: #F1F5F9;
}

.preset-btn.active {
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}

/* 5. Navigation Items */
.nav-item {
  transition: color 0.15s ease, background 0.15s ease;
}

/* 6. Modals Animation */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active .modal-card {
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 7. Live Badges & Static Indicators (100% Solid & Zero Paint Reflow) */
.badge-live {
  background: #EFF6FF;
  color: #0284C7;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.status-active::before,
.status-badge.status-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  margin-right: 6px;
  vertical-align: middle;
}

/* 8. Table Row Fluidity */
.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background: #F8FAFC;
}

/* 9. Switch Smooth Slider */
.slider-switch {
  transition: background-color 0.2s ease;
}

.slider-switch:before {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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


