/* ==========================================================================
   DESIGN VARIABLES & SYSTEM
   ========================================================================== */
:root {
  --bg-primary: #030712;
  --bg-secondary: #0b0f19;
  --bg-sidebar: #090d16;
  
  --glass-bg: rgba(17, 24, 39, 0.45);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --color-primary: #3b82f6;
  --color-primary-glow: rgba(59, 130, 246, 0.25);
  --color-secondary: #8b5cf6;
  --color-secondary-glow: rgba(139, 92, 246, 0.25);
  --color-accent: #06b6d4;
  
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BASE STYLE & SCROLLBARS
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

code {
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #3b82f6;
}

/* Background Glowing Blobs */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.15;
}
.bg-glow-1 {
  background: var(--color-primary);
  top: -150px;
  left: -150px;
}
.bg-glow-2 {
  background: var(--color-secondary);
  bottom: -150px;
  right: -150px;
}

/* ==========================================================================
   LAYOUT STRUCTURE (GRID)
   ========================================================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  z-index: 10;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}
.logo-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.logo-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}
.nav-item i {
  width: 20px;
  height: 20px;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--color-primary);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-primary);
}
.profile-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.user-status-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.user-status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}
.user-status-pill.expired {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 16px;
  transition: var(--transition-smooth);
}
.logout-btn:hover {
  color: var(--color-error);
}
.logout-btn i {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 40px;
  height: 100vh;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 24px;
  margin-bottom: 30px;
}
.header-title h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.header-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.system-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
}
.system-time i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   VIEWS STATE
   ========================================================================== */
.content-view {
  display: none;
  flex-direction: column;
  gap: 30px;
}
.content-view.active {
  display: flex;
}

.view-actions {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   CARDS & GLOWING ELEMENTS
   ========================================================================== */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}
.card.shadow-none {
  box-shadow: none;
}
.card-header {
  margin-bottom: 20px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-title h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.card-title i {
  width: 20px;
  height: 20px;
}
.icon-primary { color: var(--color-primary); }
.icon-secondary { color: var(--color-secondary); }

/* ==========================================================================
   CHATBOTS GRID & LOADING
   ========================================================================== */
.chatbot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.chatbot-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
.chatbot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.bot-avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px var(--color-primary-glow);
  object-fit: cover;
}
.bot-card-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}
.badge-mini {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
  text-transform: uppercase;
}

.bot-card-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 20px;
  flex: 1;
}

.bot-card-footer {
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 16px;
}
.bot-card-footer button {
  flex: 1;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}
.btn i {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}
.btn-danger {
  background: var(--color-error);
  color: #ffffff;
}
.btn-danger:hover {
  background: #dc2626;
}

.w-100 { width: 100%; }
.w-fit { width: fit-content; }
.mb-20 { margin-bottom: 20px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* ==========================================================================
   BILLING & CONFIGURATION FORM
   ========================================================================== */
.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.detail-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}
.text-accent {
  color: var(--color-accent);
}

.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
}
.toggle-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.toggle-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider {
  background-color: var(--color-primary);
}
input:checked + .slider:before {
  transform: translateX(24px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* ==========================================================================
   TABS PANEL FOR CHATBOT MANAGEMENT
   ========================================================================== */
.chatbot-management-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chatbot-info-banner {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.bot-header-avatar {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px var(--color-primary-glow);
}
.bot-header-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.bot-header-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tab-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tab-header {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid var(--glass-border);
  padding-bottom: 1px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition-smooth);
}
.tab-btn i {
  width: 18px;
  height: 18px;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.management-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
  transition: var(--transition-smooth);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
  background: rgba(0, 0, 0, 0.35);
}
.help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   KNOWLEDGE BASE VIEW
   ========================================================================== */
.knowledge-grid {
  display: grid;
  grid-template-columns: 4.5fr 5.5fr;
  gap: 24px;
}
.description-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Drag drop area */
.file-drop-area {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  background: rgba(255,255,255,0.01);
  transition: var(--transition-smooth);
}
.file-drop-area:hover {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.03);
}
.upload-icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}
.file-drop-area:hover .upload-icon {
  color: var(--color-primary);
  transform: translateY(-2px);
}
.drop-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.selected-file-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 15px;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.selected-file-banner i {
  color: var(--color-primary);
  width: 20px;
  height: 20px;
}
.selected-file-banner span {
  font-size: 0.8rem;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-remove-file:hover {
  color: var(--color-error);
}

/* KB Files List */
.kb-files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  margin-top: 15px;
}
.empty-state-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}
.kb-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}
.kb-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kb-file-info i {
  color: var(--color-secondary);
  width: 20px;
  height: 20px;
}
.kb-file-detail h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.kb-file-detail span {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.btn-delete-kb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.08);
  border: none;
  color: var(--color-error);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.btn-delete-kb:hover {
  background: var(--color-error);
  color: white;
}
.btn-delete-kb i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   EMBED CODE & TEST WIDGET
   ========================================================================== */
.embed-grid {
  display: grid;
  grid-template-columns: 5.5fr 4.5fr;
  gap: 24px;
}

/* Code box display */
.code-box-container {
  position: relative;
  background: #010409;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 15px;
}
.code-box-container pre {
  overflow-x: auto;
  margin: 0;
}
.code-box-container code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #c9d1d9;
  background: transparent;
  padding: 0;
}
.btn-copy-code {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-copy-code:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.url-test-box {
  display: flex;
  gap: 10px;
}
.url-test-box input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8rem;
  outline: none;
}

/* Live Simulator */
.simulator-iframe-container {
  flex: 1;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: #0f172a;
  overflow: hidden;
  height: 520px;
  min-height: 480px;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}
.simulator-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalScaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}
.toast {
  background: rgba(17, 24, 39, 0.9);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  backdrop-filter: blur(8px);
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.success { border-color: var(--color-success); }
.toast.error { border-color: var(--color-error); }
.toast.info { border-color: var(--color-primary); }

/* ==========================================================================
   LOADING & UTILITIES
   ========================================================================== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  padding: 60px 0;
  gap: 16px;
}
.loader {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(255,255,255,0.05);
  border-top: 3.5px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE BREACKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .knowledge-grid, .embed-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none; /* simple bypass for responsiveness in code demo */
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
