@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Premium Slate Light Palette */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.85);
  
  --color-primary: #1979c3;
  --color-primary-hover: #1565a8;
  --color-primary-light: #dceefb;
  
  --color-secondary: #2196f3;
  --color-secondary-hover: #1976d2;
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-warning: #f59e0b;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  
  --border-color: rgba(99, 102, 241, 0.08);
  --border-focus: #818cf8;
  
  --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.03);
  --shadow-md: 0 10px 30px -10px rgba(99, 102, 241, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(99, 102, 241, 0.12);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.12);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  
  /* Cybernetic mesh grid pattern in light mode */
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    linear-gradient(rgba(15, 23, 42, 0.003) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.003) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.3);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* Glassmorphism Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-title);
  background: linear-gradient(135deg, #1979c3 0%, #2196f3 50%, #42a5f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.logo-dot {
  width: 11px;
  height: 11px;
  background-color: var(--color-success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.15); box-shadow: 0 0 14px rgba(16, 185, 129, 0.7); }
}

.user-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  background: rgba(15, 23, 42, 0.03);
  padding: 0.4rem 0.8rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35), var(--shadow-glow);
  filter: brightness(1.05);
}

.btn-secondary {
  background-color: #ffffff;
  border-color: rgba(99, 102, 241, 0.15);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--color-danger-light);
  border-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.btn-danger:hover {
  background-color: var(--color-danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}

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

/* Auth Split Layout */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
  gap: 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.auth-brand-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 2rem;
}

.brand-glow {
  position: absolute;
  top: 10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.brand-title {
  font-size: 2.85rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #0f172a 35%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 3.5rem;
}

.brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 2rem;
}

.b-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.b-num {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(79, 70, 229, 0.1);
}

.b-lbl {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 960px) {
  .auth-brand-side {
    display: none;
  }
  .auth-wrapper {
    gap: 0;
    max-width: 460px;
  }
}

.auth-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.auth-title {
  font-size: 1.85rem;
  text-align: center;
  color: #0f172a;
  font-family: var(--font-title);
}

.auth-desc {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-top: -0.75rem;
  line-height: 1.5;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.form-control {
  font-family: var(--font-body);
  font-size: 0.925rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background-color: rgba(15, 23, 42, 0.01);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1), var(--shadow-glow);
}

.form-control::placeholder {
  color: var(--text-light);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.form-footer a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Main Workspace */
.main-container {
  max-width: 1320px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* Section Controls */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 45%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Stats Banner */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.03) 0%, transparent 60%);
  z-index: 1;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 1px solid rgba(99, 102, 241, 0.08);
  z-index: 2;
}

.stat-info {
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.15rem;
}

.stat-trend {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
}

.stat-trend.positive {
  color: var(--color-success);
  background-color: rgba(16, 185, 129, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.12);
}

/* Store Cards Grid */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.store-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.store-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0.25;
  transition: opacity var(--transition-fast);
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.25);
}

.store-card:hover::before {
  opacity: 1;
}

.store-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.store-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-title);
}

.store-card-domain {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: 'Courier New', Courier, monospace;
  background: rgba(15, 23, 42, 0.02);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.store-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 6px;
  text-transform: uppercase;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.store-card-body {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8rem;
}

.store-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  padding-top: 1.25rem;
}

/* Detail Shop Panel Layout (2 Columns) */
.panel-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.panel-sidebar {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: fit-content;
}

.panel-tab {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.panel-tab:hover {
  background-color: rgba(15, 23, 42, 0.02);
  color: var(--text-main);
}

.panel-tab.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: var(--shadow-glow);
}

.panel-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Table Style for RAG database */
.rag-table-container {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

/* Premium Custom Checkbox styling inside table */
.rag-chunk-checkbox, #rag-select-all {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1; /* slate-300 */
  border-radius: 5px;
  background-color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.rag-chunk-checkbox:hover, #rag-select-all:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 121, 195, 0.15);
}

.rag-chunk-checkbox:checked, #rag-select-all:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(25, 121, 195, 0.25);
}

.rag-chunk-checkbox:checked::after, #rag-select-all:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 1.5px;
  left: 4.5px;
  box-sizing: border-box;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(15, 23, 42, 0.04);
  background-color: rgba(15, 23, 42, 0.015);
}

td {
  padding: 1.1rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  color: var(--text-muted);
  vertical-align: middle;
  transition: background-color var(--transition-fast);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(99, 102, 241, 0.015);
  color: #0f172a;
}

.topic-cell {
  font-weight: 600;
  color: #0f172a;
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.content-cell {
  max-width: 480px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.badge-active {
  background-color: var(--color-success-light);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-inactive {
  background-color: var(--color-danger-light);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* RAG Search / Filter bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.filter-bar input {
  flex-grow: 1;
}

/* RAG Wizard Items styling */
.wizard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wizard-item-card {
  background-color: rgba(15, 23, 42, 0.005);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.wizard-item-card:hover {
  background-color: #ffffff;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: var(--shadow-md);
}

.wizard-item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wizard-item-number {
  width: 26px;
  height: 26px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.wizard-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  flex-grow: 1;
}



/* Snippet Code box */
.code-box {
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

/* Custom Mock Chat Preview Widget */
.chat-preview-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: pulse-glow-primary 2s infinite ease-in-out;
}

@keyframes pulse-glow-primary {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px var(--color-primary); }
  50% { transform: scale(1.15); box-shadow: 0 0 12px var(--color-primary); }
}

.chat-preview-container {
  background: transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 420px;
  height: 640px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  margin: 0 auto;
}

.chat-preview-container::after {
  content: 'TESTER WIDGETU (LIVE)';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.01);
  pointer-events: none;
  letter-spacing: 0.05em;
}

.chat-preview-header {
  padding: 1.1rem 1.25rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background var(--transition-fast);
}

.chat-preview-header .bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-preview-header .bot-status {
  width: 9px;
  height: 9px;
  background-color: var(--color-success);
  border-radius: 50%;
  position: absolute;
  bottom: 15px;
  left: 36px;
  border: 2px solid var(--color-primary);
}

.chat-preview-header .bot-info {
  display: flex;
  flex-direction: column;
}

.chat-preview-header .bot-name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
}

.chat-preview-header .bot-online {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
}

.chat-preview-messages {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f8fafc;
}

.chat-msg {
  max-width: 82%;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  animation: messageIn 0.25s ease-out forwards;
}

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

.chat-msg.bot {
  background-color: #ffffff;
  color: #334155;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chat-msg.user {
  background: var(--color-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.chat-preview-input-area {
  padding: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.04);
  background: var(--bg-card);
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.chat-preview-input {
  flex-grow: 1;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border var(--transition-fast);
}

.chat-preview-input:focus {
  border-color: var(--border-focus);
}

.chat-preview-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat-preview-send-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Modal Window styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 520px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: scale(0.96);
  transition: transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

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

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

.modal-title {
  font-size: 1.6rem;
  font-family: var(--font-title);
  color: #0f172a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: #0f172a;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-sm);
  border-left: 5px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 320px;
  max-width: 460px;
  color: #0f172a;
  animation: slideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.toast-success {
  border-left-color: var(--color-success);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
}

.toast.toast-error {
  border-left-color: var(--color-danger);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.08);
}

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive styles */
@media(max-width: 1200px) {
  .panel-layout {
    grid-template-columns: 220px 1fr;
  }
}

.integration-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  width: 100%;
  align-items: start;
}

@media(max-width: 1024px) {
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .chat-preview-column {
    max-width: 420px;
    width: 100%;
    margin: 1.5rem auto 0 auto;
  }
}

@media(max-width: 768px) {
  header {
    padding: 1rem 1.5rem;
  }
  .main-container {
    margin: 1.5rem auto;
  }
  .store-grid {
    grid-template-columns: 1fr;
  }
}

/* Custom Premium Toggle Switches */
.switch-container input:checked + .slider {
  background-color: var(--color-primary, #1979c3);
}
.switch-container input:checked + .slider::before {
  transform: translateX(24px);
}
.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Typing Indicator Animation */
.chatboot-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.chatboot-typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--text-color);
  opacity: 0.4;
  border-radius: 50%;
  animation: cb-bounce 1.4s infinite ease-in-out both;
}
.chatboot-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.chatboot-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes cb-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}
