/* ============================================================
   CLYPULSE AI - MAIN STYLESHEET
   ============================================================ */

/* --- COLOR MAPPING CONFIG --- */
:root {
  --app-bg: #0F1A3C;
  --card-bg: #1E2B58;
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --electric-blue: #3B82F6;
  --cyber-purple: #8B5CF6;
  --violet: #7C3AED;
  --emerald: #10B981;
  --amber: #F59E0B;
  --rose: #EF4444;
  --tech-gradient: linear-gradient(135deg, var(--electric-blue) 0%, var(--cyber-purple) 100%);
  --glass-bg: rgba(30, 43, 88, 0.6);
  --glass-border: rgba(255, 255, 255, 0.12);
  --nav-height: 65px;
  --brand-glow: 0 0 30px rgba(59, 130, 246, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--app-bg);
  color: var(--text-main);
  padding-bottom: calc(var(--nav-height) + 20px);
  overflow-x: hidden;
}

/* ============================================================
   GLASS-MORPHISM COMPONENTS
   ============================================================ */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

/* ============================================================
   BRAND STYLES - Bigger & Vibrant
   ============================================================ */

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brand-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  position: relative;
  animation: brandPulse 3s ease-in-out infinite;
}

.brand-text span {
  background: var(--tech-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

@keyframes brandPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

.brand-glow {
  display: inline-block;
  position: relative;
}

.brand-glow::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: var(--tech-gradient);
  filter: blur(40px);
  opacity: 0.15;
  z-index: -1;
  border-radius: 50%;
}

/* ============================================================
   BUTTON STYLES - Professional Glass Look
   ============================================================ */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.45);
}

.btn-purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-spacing {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ============================================================
   STRUCTURAL COMPONENTS
   ============================================================ */

.app-header {
  background: rgba(30, 43, 88, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  padding: 14px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#app-canvas {
  padding: 15px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

#feed-container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   CONTENT COMPONENT CARDS
   ============================================================ */

.news-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.news-card.cly-special {
  border: 1.5px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), var(--tech-gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-snippet {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.read-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.read-btn:active {
  background: var(--tech-gradient);
}

/* ============================================================
   NAVIGATION INFRASTRUCTURE
   ============================================================ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(21, 34, 75, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  flex-grow: 1;
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
}

.nav-tab .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  margin-bottom: 4px;
}

.nav-tab.active {
  color: var(--electric-blue);
}

.nav-tab.brand-special.active {
  color: var(--cyber-purple);
}

/* ============================================================
   UNIQUE BRANDING ELEMENTS
   ============================================================ */

.pulse-indicator {
  width: 6px;
  height: 6px;
  background-color: var(--cyber-purple);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 32%;
  display: none;
  box-shadow: 0 0 8px var(--cyber-purple);
}

/* ============================================================
   SYSTEM UTILITIES
   ============================================================ */

#install-banner {
  background: var(--tech-gradient);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 15px;
}

#btn-install {
  background: white;
  color: #0F1A3C;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 8px;
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

/* ============================================================
   CHAT COMPONENTS
   ============================================================ */

#clybot-fab,
#clybot-chat-container,
.auth-box-overlay {
  box-sizing: border-box !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}

#clybot-fab {
  position: fixed !important;
  bottom: 90px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: linear-gradient(135deg, #0d3270 0%, #1c1045 100%) !important;
  border: 1px solid rgba(106, 90, 205, 0.4) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
  color: #ffffff !important;
  padding: 12px 24px !important;
  border-radius: 30px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  white-space: nowrap !important;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 600;
}

#clybot-fab:hover {
  transform: translateX(-50%) scale(1.03) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(59, 130, 246, 0.2) !important;
}

.sparkle-icon {
  font-size: 1.1rem;
}

#clybot-chat-container {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(0) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: 65vh !important;
  max-height: 600px !important;
  background: rgba(14, 26, 54, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top-left-radius: 24px !important;
  border-top-right-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 10000 !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7) !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important, opacity 0.25s ease !important;
  overflow: hidden !important;
}

#clybot-chat-container.clybot-hidden {
  transform: translateX(-50%) translateY(105%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.clybot-header {
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.clybot-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #fff !important;
}

.clybot-title h4 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: white !important;
}

.clybot-close-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border: none !important;
  color: #8fa0c0 !important;
  font-size: 18px !important;
  cursor: pointer !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s;
}

.clybot-close-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* ============================================================
   AUTH OVERLAY
   ============================================================ */

.auth-box-overlay {
  position: absolute !important;
  top: 53px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(9, 16, 34, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 10001 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  border-radius: 0 0 24px 24px !important;
}

.auth-card {
  width: 100% !important;
  max-width: 380px !important;
  background: rgba(30, 43, 88, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  flex-direction: column !important;
}

.auth-card h5 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: var(--text-main) !important;
}

.auth-card p {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  line-height: 1.5 !important;
  margin-bottom: 16px !important;
}

.auth-card input {
  display: block !important;
  width: 100% !important;
  background: rgba(11, 19, 38, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  padding: 12px 14px !important;
  border-radius: 8px !important;
  outline: none !important;
  font-size: 14px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card input:focus {
  border-color: var(--electric-blue) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.auth-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 4px !important;
}

.auth-actions .btn {
  flex: 1 !important;
  padding: 10px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

/* ============================================================
   CHAT MESSAGES
   ============================================================ */

.clybot-messages {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
}

.system-msg {
  background: rgba(24, 43, 87, 0.5) !important;
  border: 1px solid rgba(58, 110, 238, 0.15) !important;
  color: #e2e8f0 !important;
  padding: 14px !important;
  border-radius: 14px !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
}

.ams-capabilities {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-top: 10px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
}

/* ============================================================
   INPUT AREA
   ============================================================ */

.clybot-input-area {
  padding: 12px 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  gap: 10px !important;
  background: rgba(9, 16, 34, 0.5) !important;
  align-items: center !important;
  padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  flex-shrink: 0 !important;
}

#clybot-user-input {
  flex: 1 !important;
  background: rgba(11, 19, 38, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  padding: 10px 16px !important;
  border-radius: 20px !important;
  outline: none !important;
  font-size: 14px !important;
  transition: border-color 0.2s;
  min-height: 40px !important;
}

#clybot-user-input:focus {
  border-color: var(--electric-blue) !important;
}

#clybot-user-input:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

#clybot-send-btn {
  background: linear-gradient(135deg, #3a6eee 0%, #6a5acd 100%) !important;
  border: none !important;
  color: white !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  flex-shrink: 0 !important;
}

#clybot-send-btn:hover:not(:disabled) {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 20px rgba(58, 110, 238, 0.4) !important;
}

#clybot-send-btn:disabled {
  background: #1e2b58 !important;
  color: #4b5563 !important;
  cursor: not-allowed !important;
}

/* ============================================================
   SETTINGS - ACCORDION STYLES
   ============================================================ */

.settings-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section {
  background: rgba(30, 43, 88, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.settings-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.settings-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
}

.settings-accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.settings-accordion-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.settings-accordion-header .header-icon {
  font-size: 1.2rem;
}

.settings-accordion-header .header-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.settings-accordion-header .header-badge {
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--electric-blue);
  font-weight: 500;
  flex-shrink: 0;
}

.settings-accordion-header .header-arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.settings-accordion-header .header-arrow.open {
  transform: rotate(180deg);
}

.settings-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 18px;
}

.settings-accordion-content.open {
  max-height: 2000px;
  padding: 0 18px 18px 18px;
}

.settings-accordion-content-inner {
  padding-top: 4px;
}

.settings-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 18px 0;
}

/* ============================================================
   FAQ MANAGEMENT STYLES
   ============================================================ */

.faq-add-btn {
  width: 100%;
  padding: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--electric-blue);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.faq-add-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--electric-blue);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.faq-list::-webkit-scrollbar {
  width: 4px;
}

.faq-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.faq-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.faq-question {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
  word-break: break-word;
}

.faq-answer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.faq-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.faq-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.faq-actions .btn-edit {
  color: var(--electric-blue);
}

.faq-actions .btn-edit:hover {
  background: rgba(59, 130, 246, 0.15);
}

.faq-actions .btn-delete {
  color: #EF4444;
}

.faq-actions .btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
}

.faq-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px 0;
}

/* ============================================================
   DOMAIN MANAGEMENT STYLES
   ============================================================ */

.domain-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.domain-input-row input {
  flex: 1;
  background: rgba(11, 19, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  font-size: 0.9rem;
}

.domain-input-row input:focus {
  border-color: var(--electric-blue);
}

.domain-input-row button {
  padding: 10px 18px;
  background: var(--tech-gradient);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.domain-input-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.domain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.domain-item .domain-name {
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: monospace;
}

.domain-item .domain-status {
  font-size: 0.65rem;
  color: var(--emerald);
  font-weight: 500;
}

.domain-item .btn-remove {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.domain-item .btn-remove:hover {
  background: rgba(239, 68, 68, 0.15);
}

.domain-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 12px 0;
}

/* ============================================================
   WIDGET INSTALLATION STYLES
   ============================================================ */

.widget-code-container {
  background: rgba(11, 19, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  position: relative;
}

.widget-code-container code {
  display: block;
  font-family: monospace;
  font-size: 0.75rem;
  color: #e2e8f0;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.6;
}

.widget-code-container .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.widget-code-container .copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.widget-instructions {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.widget-instructions ol {
  padding-left: 20px;
  margin-top: 4px;
}

.widget-instructions li {
  margin-bottom: 4px;
}

/* ============================================================
   MODAL STYLES
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

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

.modal-content {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.modal-content .modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-content label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  background: rgba(11, 19, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  font-size: 0.9rem;
  margin-bottom: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: var(--electric-blue);
}

.modal-content textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-actions .btn-primary {
  padding: 10px 24px;
  background: var(--tech-gradient);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.modal-actions .btn-secondary {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 480px) {
  #clybot-chat-container {
    max-width: 100% !important;
    height: 70vh !important;
    max-height: 550px !important;
  }
  
  .auth-card {
    margin: 0 10px !important;
    padding: 20px !important;
  }
  
  .brand-text {
    font-size: 1.3rem;
  }
  
  #clybot-fab {
    padding: 10px 18px !important;
    font-size: 0.8rem !important;
    bottom: 80px !important;
  }
  
  .domain-input-row {
    flex-direction: column;
  }
  
  .domain-input-row button {
    width: 100%;
  }
  
  .faq-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .faq-actions {
    margin-top: 6px;
    width: 100%;
    justify-content: flex-end;
  }
  
  .modal-content {
    padding: 18px;
    margin: 10px;
  }
  
  .settings-accordion-header {
    padding: 12px 14px;
  }
  
  .settings-accordion-header .header-title {
    font-size: 0.85rem;
  }
  
  .settings-accordion-content.open {
    padding: 0 14px 14px 14px;
  }
}

@media (max-width: 380px) {
  .brand-text {
    font-size: 1.1rem;
  }
  
  .auth-card h5 {
    font-size: 1rem !important;
  }
  
  .auth-card p {
    font-size: 0.75rem !important;
  }
  
  #clybot-fab {
    padding: 8px 14px !important;
    font-size: 0.75rem !important;
    gap: 6px !important;
    bottom: 75px !important;
  }
  
  .settings-accordion-header .header-badge {
    display: none;
  }
}

/* ============================================================
   BILLING SECTION STYLES
   ============================================================ */

.billing-section {
    background: rgba(30, 43, 88, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.balance-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    background: var(--tech-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.balance-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.balance-actions .btn-mpesa {
    background: linear-gradient(135deg, #00A651 0%, #007A3D 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 166, 81, 0.35);
}

.balance-actions .btn-mpesa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 166, 81, 0.45);
}

.usage-bars {
    margin-top: 12px;
}

.usage-bar-item {
    margin-bottom: 12px;
}

.usage-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.usage-bar-label .channel-name {
    font-weight: 500;
    color: var(--text-main);
}

.usage-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

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

.usage-bar-fill.whatsapp {
    background: linear-gradient(90deg, #25D366, #128C7E);
}

.usage-bar-fill.telegram {
    background: linear-gradient(90deg, #0088cc, #2AABE2);
}

.usage-bar-fill.webapp {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
}

.usage-bar-fill.total {
    background: var(--tech-gradient);
}

.usage-summary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.usage-summary-item {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.usage-summary-item .value {
    font-weight: 600;
    color: var(--text-main);
}

/* Transaction History */
.transaction-history {
    margin-top: 16px;
}

.transaction-list {
    max-height: 200px;
    overflow-y: auto;
}

.transaction-list::-webkit-scrollbar {
    width: 4px;
}

.transaction-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item .date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.transaction-item .description {
    flex: 1;
    margin: 0 12px;
    color: var(--text-main);
}

.transaction-item .amount {
    font-weight: 600;
}

.transaction-item .amount.positive {
    color: #10B981;
}

.transaction-item .amount.negative {
    color: #EF4444;
}

.transaction-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px 0;
}

/* Top-Up Modal */
.topup-modal .modal-content {
    max-width: 400px;
}

.topup-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin: 12px 0 16px 0;
}

.topup-amounts .btn {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
}

.topup-amounts .btn.selected {
    border: 2px solid var(--electric-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.topup-custom {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topup-custom input {
    flex: 1;
    background: rgba(11, 19, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
}

.topup-custom input:focus {
    border-color: var(--electric-blue);
}

/* Responsive */
@media (max-width: 480px) {
    .balance-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .balance-actions {
        justify-content: stretch;
    }
    
    .balance-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .topup-amounts {
        grid-template-columns: 1fr 1fr;
    }
    
    .usage-summary {
        flex-direction: column;
        gap: 4px;
    }
}