/* ==========================================================================
   Link.kh - Cambodia Premier URL Shortener & Smart Routing Platform
   ========================================================================== */

:root {
  --font-main: 'Kantumruy Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(18, 26, 47, 0.7);
  --bg-card-hover: rgba(28, 38, 66, 0.85);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --primary-hover: #4f46e5;
  --secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}
.glow-1 { width: 500px; height: 500px; top: -150px; left: -150px; background: radial-gradient(circle, #6366f1, #3b82f6); }
.glow-2 { width: 600px; height: 600px; top: 40%; right: -200px; background: radial-gradient(circle, #8b5cf6, #ec4899); }
.glow-3 { width: 450px; height: 450px; bottom: -100px; left: 20%; background: radial-gradient(circle, #06b6d4, #10b981); }

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.glass-panel-accent {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-feature {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}
.pro-tag {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.pro-tag-sm {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 9px;
  padding: 1px 4px;
}
.vip-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Header */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}
.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white; box-shadow: var(--shadow-glow);
}
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.badge-pro {
  font-size: 10px; font-weight: 700; background: rgba(99, 102, 241, 0.2);
  color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 2px 6px; border-radius: 20px; text-transform: uppercase;
}

.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }

/* Modern Header Navigation & Dropdown Menus */
.nav-links-modern {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-main);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-dropdown-trigger:hover,
.nav-item-dropdown:hover .nav-dropdown-trigger {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-item-dropdown.active-group .nav-dropdown-trigger {
  color: white;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
}

.nav-caret {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.2);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-menu.menu-right {
  left: auto;
  right: 0;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.2);
  color: white;
  transform: translateX(4px);
}

.dropdown-item i {
  font-size: 16px;
  width: 22px;
  text-align: center;
}

.dropdown-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.dropdown-item small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-btn {
  background: transparent; border: none; font-family: var(--font-main);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: var(--transition); white-space: nowrap;
}
.nav-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.nav-btn.active { color: white; background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); }

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

/* Sub-Header Bar (Language Switcher & Quick Access) */
.header-sub-bar {
  max-width: 1440px;
  margin: 10px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sub-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lang-toggle {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #f8fafc;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}
.btn-lang-toggle:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: white;
  transform: translateY(-1px);
}

.btn-csv-export {
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-glass);
  color: white; font-size: 12px; font-weight: 600; padding: 8px 14px;
  border-radius: var(--radius-sm); text-decoration: none; display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.btn-csv-export:hover { background: rgba(255, 255, 255, 0.16); color: #34d399; }
.btn-upgrade-pill {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white; border: none; font-family: var(--font-main);
  font-size: 12px; font-weight: 700; padding: 8px 14px;
  border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.live-indicator {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: #34d399; background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25); padding: 5px 12px; border-radius: 20px;
}
.pulse-dot {
  width: 8px; height: 8px; background: #10b981; border-radius: 50%; animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Ticker Bar */
.stats-ticker { max-width: 1440px; margin: 12px auto 0; padding: 0 24px; }
.stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-pill {
  background: var(--bg-card); backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass); border-radius: var(--radius-md);
  padding: 12px 18px; display: flex; align-items: center; gap: 14px;
}
.stat-pill i { font-size: 22px; }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; }
.stat-info strong { font-size: 18px; font-weight: 700; color: var(--text-main); }

/* Main Content */
.main-content { max-width: 1440px; margin: 24px auto 60px; padding: 0 24px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Hero Shortener */
.hero-shorten { padding: 40px; margin-bottom: 36px; text-align: center; }
.hero-header h1 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; }
.hero-header p { color: var(--text-muted); font-size: 15px; max-width: 680px; margin: 0 auto 30px; }

.shorten-form { max-width: 900px; margin: 0 auto; }
.input-glow-wrapper {
  background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl); padding: 6px 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.input-main-group { display: flex; align-items: center; gap: 12px; }
.input-icon { font-size: 18px; color: var(--text-subtle); margin-left: 14px; }
.input-main-group input {
  flex: 1; background: transparent; border: none; color: white;
  font-family: var(--font-main); font-size: 15px; padding: 12px 4px; outline: none;
}

.btn-primary-gradient {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; border: none; font-family: var(--font-main);
  font-weight: 600; font-size: 14px; padding: 12px 24px;
  border-radius: var(--radius-lg); cursor: pointer; display: inline-flex;
  align-items: center; gap: 8px; text-decoration: none;
}
.btn-primary-gradient:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45); }

.advanced-toggle-bar { margin-top: 16px; }
.text-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-family: var(--font-main); font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.advanced-options-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 20px; padding: 24px;
  background: rgba(15, 23, 42, 0.5); border: 1px solid var(--border-glass);
  border-radius: var(--radius-md); text-align: left;
}
.advanced-options-grid.hidden { display: none; }
.grid-full-width-card { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between;
}
.form-group input, .form-group select, .form-group textarea {
  background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border-glass);
  color: white; font-family: var(--font-main); font-size: 13px;
  padding: 10px 12px; border-radius: var(--radius-sm); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow);
}

.slug-input-wrapper {
  display: flex; align-items: center; background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
}
.slug-prefix {
  padding: 8px 10px; background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle); font-family: var(--font-mono); font-size: 12px;
}
.slug-input-wrapper input { border: none; background: transparent; flex: 1; }

/* Result Card */
.result-card { margin-top: 28px; padding: 20px 24px; text-align: left; }
.result-card.hidden { display: none; }
.result-card-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.result-tag { font-size: 12px; font-weight: 700; color: #34d399; margin-bottom: 4px; }
.result-meta h3 { font-size: 17px; margin-bottom: 6px; }
.short-link-href { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: #38bdf8; text-decoration: none; }
.result-original { font-size: 12px; color: var(--text-muted); }
.truncate { max-width: 380px; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

.result-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-action {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15);
  color: white; font-family: var(--font-main); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-copy { background: var(--primary); border-color: var(--primary-hover); }

.social-share-group { display: flex; gap: 6px; background: rgba(15, 23, 42, 0.6); padding: 4px; border-radius: var(--radius-sm); }
.share-icon {
  width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; color: white; text-decoration: none; font-size: 14px;
}
.share-icon.wa { background: #25D366; } .share-icon.tg { background: #0088cc; }
.share-icon.x { background: #000; border: 1px solid #333; } .share-icon.fb { background: #1877F2; } .share-icon.li { background: #0A66C2; }

/* Table */
.table-responsive { overflow-x: auto; }
.custom-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.custom-table th { padding: 14px 18px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-glass); text-transform: uppercase; font-size: 11px; }
.custom-table td { padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: middle; }
.custom-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.text-right { text-align: right; } .text-center { text-align: center; }

.link-title-cell { font-weight: 600; color: white; margin-bottom: 2px; }
.link-target-cell { font-size: 11px; color: var(--text-muted); }
.short-cell-code { font-family: var(--font-mono); color: #38bdf8; font-weight: 600; text-decoration: none; }
.badge-status { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-paused { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.clicks-pill { background: rgba(99, 102, 241, 0.15); color: #818cf8; font-weight: 700; padding: 3px 8px; border-radius: 6px; }

.table-action-btns { display: inline-flex; gap: 4px; }
.btn-sm-action {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-glass);
  color: var(--text-muted); width: 30px; height: 30px; border-radius: 6px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.btn-sm-action:hover { color: white; background: rgba(255, 255, 255, 0.15); }
.btn-sm-delete:hover { color: #f87171; border-color: rgba(239, 68, 68, 0.4); }

/* Bulk Shortener Tab */
.bulk-container { padding: 36px; }

/* Custom Domains Tab */
.domains-grid-top { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; }
.add-domain-card, .domains-list-card { padding: 30px; }
.dns-instruction-box {
  background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm); padding: 14px; font-size: 12px; margin-top: 14px;
}
.dns-instruction-box h4 { font-size: 13px; color: #38bdf8; margin-bottom: 6px; }
.badge-dns { background: rgba(16, 185, 129, 0.15); color: #34d399; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }

/* OneLink & Live Phone Simulator */
.bio-builder-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
.bio-controls-panel { padding: 30px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 14px; }
.bio-header-actions { display: flex; gap: 8px; }
.btn-secondary-sm {
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-glass);
  color: white; padding: 8px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-main); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none;
}
.btn-secondary-sm:hover { background: rgba(255, 255, 255, 0.15); }

.editor-accordion { border: 1px solid var(--border-glass); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; background: rgba(15, 23, 42, 0.4); }
.accordion-head { padding: 14px 18px; background: rgba(255, 255, 255, 0.03); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.accordion-body { padding: 18px; display: none; }
.editor-accordion.active .accordion-body { display: block; }
.editor-accordion.active .accordion-head i.fa-chevron-down { transform: rotate(180deg); }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-container { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }

.theme-selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.theme-card { background: rgba(15, 23, 42, 0.8); border: 2px solid var(--border-glass); border-radius: var(--radius-sm); padding: 8px; text-align: center; cursor: pointer; }
.theme-card.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.theme-card span { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.theme-preview { height: 42px; border-radius: 6px; margin-bottom: 6px; }
.theme-obsidian { background: linear-gradient(135deg, #090d16, #1e293b); }
.theme-aurora { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.theme-cyberpunk { background: linear-gradient(135deg, #2b0938, #0d0221); border: 1px solid #00f0ff; }
.theme-sunset { background: linear-gradient(135deg, #43122c, #833ab4, #fd1d1d); }
.theme-glass { background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)); backdrop-filter: blur(10px); }
.theme-emerald { background: linear-gradient(135deg, #064e3b, #047857); }

.link-block-item { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.link-block-row { display: flex; gap: 8px; margin-bottom: 8px; }
.btn-remove-link { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-dashed-add { width: 100%; background: rgba(99, 102, 241, 0.05); border: 2px dashed rgba(99, 102, 241, 0.4); color: #818cf8; font-family: var(--font-main); font-weight: 600; font-size: 13px; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Phone Simulator */
.bio-preview-column { display: flex; justify-content: center; }
.preview-sticky-wrap { position: sticky; top: 90px; }
.preview-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; width: 330px; }
.preview-badge { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.preview-link-btn { font-size: 12px; font-weight: 600; color: #38bdf8; text-decoration: none; }

.phone-mockup {
  width: 330px; height: 660px; background: #020617; border-radius: 44px;
  border: 9px solid #1e293b; box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.2);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.phone-notch {
  width: 130px; height: 22px; background: #1e293b; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
  z-index: 10; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.phone-camera { width: 8px; height: 8px; background: #090d16; border-radius: 50%; }
.phone-speaker { width: 40px; height: 4px; background: #334155; border-radius: 4px; }

.phone-screen { flex: 1; padding: 46px 16px 20px; overflow-y: auto; color: white; }
.bio-rendered-wrapper { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bio-avatar-container { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.3); margin-bottom: 10px; }
.bio-avatar-container img { width: 100%; height: 100%; object-fit: cover; }
.bio-profile-header { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.bio-profile-header h3 { font-size: 17px; font-weight: 700; }
.verified-badge { color: #38bdf8; font-size: 15px; }
.bio-handle-badge { font-size: 11px; color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.1); padding: 2px 8px; border-radius: 10px; margin-bottom: 8px; }
.bio-rendered-text { font-size: 12px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); margin-bottom: 14px; }

/* Lead Capture Box inside OneLink */
.bio-lead-card {
  width: 100%; background: rgba(236, 72, 153, 0.12); border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 14px; padding: 12px; margin-bottom: 16px; text-align: left;
}
.lead-card-title { font-size: 12px; font-weight: 700; color: #f472b6; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lead-input-row { display: flex; gap: 6px; }
.lead-input-row input {
  flex: 1; background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255, 255, 255, 0.1);
  color: white; font-size: 11px; padding: 6px 8px; border-radius: 6px; outline: none;
}
.btn-lead-sub {
  background: #ec4899; color: white; border: none; font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
}

.bio-socials-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
.bio-soc-btn { font-size: 16px; color: white; text-decoration: none; }
.bio-buttons-list { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.bio-btn-item {
  width: 100%; padding: 10px 14px; background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; color: white;
  text-decoration: none; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between;
}
.bio-embeds-list { width: 100%; margin-bottom: 16px; }
.bio-embed-frame { width: 100%; height: 140px; border-radius: 10px; border: none; margin-bottom: 8px; }
.bio-phone-footer { font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: auto; padding-top: 14px; }

/* Dynamic QR Studio */
.qr-studio-layout { padding: 36px; }
.qr-studio-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; margin-top: 20px; }
.qr-frames-grid { display: flex; gap: 10px; margin-top: 8px; }
.qr-frame-btn {
  flex: 1; background: rgba(15, 23, 42, 0.8); border: 1px solid var(--border-glass);
  color: var(--text-muted); font-size: 12px; font-weight: 600; padding: 10px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.qr-frame-btn.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.15); color: white; }

.qr-preview-box { display: flex; justify-content: center; }
.qr-framed-card {
  background: white; padding: 20px; border-radius: 20px; text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5); display: inline-block;
}
.qr-framed-card img { width: 220px; height: 220px; display: block; margin: 0 auto; }
.frame-top-text, .frame-bottom-text { display: none; font-weight: 800; letter-spacing: 1px; color: #0f172a; }
.frame-badge .frame-top-text { display: block; font-size: 14px; margin-bottom: 8px; color: #6366f1; }
.frame-polaroid { padding-bottom: 40px; }
.frame-polaroid .frame-bottom-text { display: block; font-size: 13px; margin-top: 14px; color: #334155; }

/* 5-Column Link.kh Pricing */
.pricing-5-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.pricing-container { padding: 10px 0; }
.pricing-header h1 { font-size: 34px; font-weight: 800; margin: 8px 0; }
.pricing-header p { color: var(--text-muted); font-size: 14px; max-width: 600px; margin: 0 auto 24px; }
.billing-switcher { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 30px; }
.billing-label { font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.billing-label.active { color: white; }
.discount-badge { background: #10b981; color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 8px; margin-left: 4px; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #1e293b; border: 1px solid var(--border-glass); transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; } .slider.round:before { border-radius: 50%; }

.pricing-card { padding: 24px 18px; position: relative; display: flex; flex-direction: column; transition: var(--transition); }
.pricing-card:hover { transform: translateY(-4px); }
.popular-card { border: 2px solid var(--primary); background: linear-gradient(180deg, rgba(30, 41, 75, 0.8), rgba(15, 23, 42, 0.9)); box-shadow: 0 0 35px rgba(99, 102, 241, 0.3); }
.popular-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; font-size: 9px; font-weight: 800; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }

.plan-name { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.plan-subtitle { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }
.plan-price-wrap { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin-bottom: 18px; }
.price-currency { font-size: 18px; font-weight: 700; color: var(--text-muted); }
.price-amount { font-size: 34px; font-weight: 800; }
.price-period { font-size: 12px; color: var(--text-muted); }

.plan-features-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; font-size: 12px; }
.feature-item { display: flex; align-items: center; gap: 6px; }
.feature-item.disabled { color: var(--text-subtle); }
.btn-plan-action { width: 100%; padding: 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; text-align: center; justify-content: center; }
.btn-current-plan { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-glass); color: var(--text-muted); cursor: default; }

/* Modal & Toast */
.custom-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.custom-modal.hidden { display: none; }
.modal-backdrop { position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); }
.modal-card { position: relative; z-index: 10; width: 90%; max-width: 440px; padding: 26px; }
.modal-lg { max-width: 720px; }
.modal-checkout { max-width: 500px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close-btn { background: transparent; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }

#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15); padding: 10px 18px;
  border-radius: 10px; color: white; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }

.mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 20px; }

/* Affiliate & Referral Dashboard */
.affiliate-dashboard { display: flex; flex-direction: column; gap: 24px; }
.affiliate-hero {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.affiliate-hero h1 { font-size: 32px; font-weight: 800; max-width: 700px; line-height: 1.25; }
.affiliate-hero p { max-width: 650px; color: var(--text-muted); font-size: 14px; }

.referral-link-box {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 14px;
  gap: 10px;
  max-width: 580px;
  width: 100%;
  margin-top: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.referral-link-box .ref-icon { color: var(--primary); font-size: 16px; }
.referral-link-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-family: monospace;
  font-size: 13px;
  outline: none;
}
.ref-custom-slug-row { display: flex; align-items: center; gap: 10px; }

.affiliate-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.highlight-balance-card {
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.8));
  position: relative;
}
.btn-payout-cta {
  padding: 6px 12px;
  font-size: 11px;
  margin-left: auto;
  border-radius: var(--radius-sm);
}

.affiliate-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Marketing & Promo Coupons */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.coupon-pill-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed var(--border-glass-bright);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.coupon-code-badge {
  font-family: monospace;
  font-weight: 800;
  font-size: 15px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}
.coupon-desc { font-size: 12px; color: var(--text-muted); }
.coupon-desc strong { color: var(--text-light); }

.coupon-input-group {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.coupon-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.coupon-field-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  outline: none;
}
.coupon-success-tag {
  margin-top: 8px;
  font-size: 12px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* Swipe Boxes for Social Marketing */
.swipe-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.swipe-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
}
.swipe-box pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

.text-pink { color: var(--accent); }
.text-amber { color: #f59e0b; }
.text-red { color: #ef4444; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .pricing-5-grid { grid-template-columns: repeat(3, 1fr); }
  .domains-grid-top { grid-template-columns: 1fr; }
  .affiliate-tables-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pricing-5-grid { grid-template-columns: 1fr; }
  .bio-builder-layout { grid-template-columns: 1fr; }
  .qr-studio-grid { grid-template-columns: 1fr; }
  .affiliate-hero h1 { font-size: 24px; }
}

/* ==========================================================================
   LinkFlow AI Copilot & Teaching Assistant Styles
   ========================================================================== */
#ai-copilot-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  font-family: var(--font-main);
}

.ai-copilot-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.6), 0 0 20px rgba(168, 85, 247, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-copilot-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.8), 0 0 30px rgba(236, 72, 153, 0.5);
}

.ai-fab-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
  animation: pulseAiGlow 2.5s infinite alternate;
}

@keyframes pulseAiGlow {
  0% { transform: scale(0.95); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.8; }
}

.ai-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #10b981;
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  border: 2px solid #090d16;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* AI Copilot Chat Modal / Drawer */
.ai-copilot-modal {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.ai-copilot-modal.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85) translateY(20px);
  pointer-events: none;
}

.ai-drawer-header {
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.ai-drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.ai-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.2;
}

.ai-drawer-status {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.ai-drawer-ctrls {
  display: flex;
  gap: 6px;
}

.ai-ctrl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.ai-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

/* Suggestion Pills */
.ai-prompts-bar {
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ai-prompts-bar::-webkit-scrollbar { display: none; }

.ai-chip {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-chip:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: white;
  transform: translateY(-1px);
}

/* Chat Messages */
.ai-drawer-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.ai-message {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: fadeInMsg 0.3s ease forwards;
}

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

.ai-message.ai-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

.ai-user .ai-avatar-sm {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.ai-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  border-radius: 16px 16px 16px 4px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-user .ai-bubble {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 16px 16px 4px 16px;
  color: white;
}

.ai-bubble p { margin-bottom: 8px; }
.ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble ul, .ai-bubble ol { margin: 6px 0 6px 18px; }
.ai-bubble li { margin-bottom: 4px; }
.ai-bubble strong { color: #f8fafc; }
.ai-bubble a { color: #38bdf8; text-decoration: underline; }
.ai-bubble code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a5f3fc;
}

.ai-action-btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.ai-action-btn-chip:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(168, 85, 247, 0.45));
  color: white;
  border-color: #818cf8;
  transform: translateY(-1px);
}

/* Typing Indicator */
.ai-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 6px 4px;
}
.ai-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input Area */
.ai-drawer-footer {
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 4px 6px 4px 14px;
  transition: var(--transition);
}

.ai-input-wrapper:focus-within {
  border-color: #818cf8;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

#ai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 13px;
  font-family: inherit;
  padding: 8px 0;
}
#ai-chat-input::placeholder { color: #64748b; }

.ai-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

@media (max-width: 480px) {
  #ai-copilot-container { bottom: 16px; right: 16px; }
  .ai-copilot-modal { width: calc(100vw - 32px); height: calc(100vh - 100px); bottom: 70px; }
}

/* ==========================================================================
   Modern Categorized Dropdown Navigation
   ========================================================================== */
.nav-links-modern {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-item-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-main);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-dropdown-trigger:hover,
.nav-item-dropdown:hover .nav-dropdown-trigger {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.nav-item-dropdown.active-group .nav-dropdown-trigger {
  color: white;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}
.nav-caret {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.nav-item-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 275px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 36px -10px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05) inset;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  margin-top: 4px;
  animation: fadeInDownNav 0.2s ease-out;
}
.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu {
  display: flex;
}
@keyframes fadeInDownNav {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
}
.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  transform: translateX(3px);
}
.dropdown-item i {
  font-size: 15px;
  width: 20px;
  text-align: center;
}
.dropdown-item strong {
  display: block;
  font-size: 13px;
  color: #f1f5f9;
}
.dropdown-item small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ==========================================================================
   Smart NFC/RFID Digital ID Card Studio
   ========================================================================== */
.smartcard-studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}
@media (max-width: 980px) {
  .smartcard-studio-grid { grid-template-columns: 1fr; }
}

.smart-card-live-preview {
  width: 100%;
  max-width: 440px;
  height: 250px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.3s ease;
  margin: 0 auto 20px;
}
.smart-card-live-preview:hover {
  transform: translateY(-3px) scale(1.01);
}
.smart-card-live-preview.gold_executive {
  background: linear-gradient(135deg, #2a2212 0%, #15120a 50%, #0a0905 100%);
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.smart-card-live-preview.cyber_emerald {
  background: linear-gradient(135deg, #062b20 0%, #0a1f18 50%, #06120e 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.smart-card-live-preview.obsidian_dark {
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-verified-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-revoked-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   Mini Shop & POS Terminal Layout
   ========================================================================== */
.pos-terminal-container {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
}
@media (max-width: 980px) {
  .pos-terminal-container { grid-template-columns: 1fr; }
}

.pos-product-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.pos-product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
}
.pos-product-card:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}
.pos-prod-img {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
}
.pos-prod-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  line-height: 1.3;
}
.pos-prod-price {
  font-size: 15px;
  font-weight: 800;
  color: #34d399;
}
.pos-prod-stock {
  font-size: 11px;
  color: var(--text-muted);
}

.pos-cart-panel {
  background: rgba(18, 26, 47, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pos-cart-items-list {
  max-height: 280px;
  overflow-y: auto;
  margin: 14px 0;
}
.pos-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pos-cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.pos-cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
  font-weight: 800;
  color: white;
}
.payment-method-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.payment-btn-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 6px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.payment-btn-option.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #34d399;
}

/* ==========================================================================
   TOP SPONSOR & ADVERTISING BANNERS
   ========================================================================== */
.sponsor-top-bar {
  background: linear-gradient(90deg, #312e81, #4338ca, #6366f1, #3b82f6);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}
.sponsor-badge-tag {
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sponsor-ad-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 4px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.sponsor-ad-btn:hover {
  background: white;
  color: #312e81;
}

.native-ad-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 24px 0;
  position: relative;
}
.native-ad-label {
  position: absolute;
  top: -10px;
  right: 16px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   FREE TOOLS SUITE (SEO & ORGANIC TRAFFIC MAGNET)
   ========================================================================== */
.tools-nav-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tool-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.tool-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}
.tool-pill-btn.active {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: white;
  border-color: #6366f1;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.tool-workspace {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Currency Tool */
.currency-dual-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
}
@media (max-width: 768px) {
  .currency-dual-card {
    grid-template-columns: 1fr;
  }
}
.currency-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.currency-input-field {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 24px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
  width: 100%;
  outline: none;
  transition: all 0.2s ease;
}
.currency-input-field:focus {
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.bill-denominations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.bill-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.bill-card .bill-val {
  font-size: 14px;
  font-weight: 800;
  color: #f59e0b;
}
.bill-card .bill-qty {
  font-size: 18px;
  font-weight: 900;
  color: #34d399;
  margin-top: 4px;
}

/* Image Compressor Dropzone */
.img-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.03);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.img-dropzone:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: #6366f1;
}

/* ==========================================================================
   GLOBAL FOOTER & SITEMAP DIRECTORY
   ========================================================================== */
.site-footer {
  background: #070a12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 24px 30px;
  margin-top: 80px;
  position: relative;
  z-index: 10;
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-links a:hover {
  color: #38bdf8;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: #64748b;
}
.carrier-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

/* ==========================================================================
   SHORTLINK DOMAINS SELECTOR ARCHITECTURE (slink.ly, slink.ad, link.kh)
   ========================================================================== */
.domain-selector-bar {
  margin-bottom: 16px;
}
.domain-selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.domain-pills-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.domain-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.domain-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.domain-pill:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.domain-pill.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35), inset 0 0 12px rgba(99, 102, 241, 0.1);
}
.domain-pill[data-domain="slink.ad"].active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35), inset 0 0 12px rgba(245, 158, 11, 0.1);
}
.domain-pill[data-domain="link.kh"].active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35), inset 0 0 12px rgba(16, 185, 129, 0.1);
}
.domain-pill-content {
  width: 100%;
}
.domain-pill-content .pill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.domain-pill-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.2px;
}
.domain-pill-sub {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}
.domain-info-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 12px;
  font-size: 13px;
  color: #cbd5e1;
  gap: 12px;
  transition: all 0.3s ease;
}
.domain-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   CAMBODIA IDENTITY & COMPANY VERIFICATION MODAL
   ========================================================================== */
.kh-verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kh-verify-badge.verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.kh-verify-badge.unverified {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.kh-verify-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}
.kh-verify-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.kh-verify-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.kh-verify-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.kh-seal-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.kh-seal-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.kh-seal-text h4 {
  font-size: 15px;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 4px;
}
.kh-seal-text p {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}



