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

:root {
  /* === MUTED PURPLE THEME === */
  --bg-dark: #0c0c14;
  --bg-gradient-1: #0f0a18;
  --bg-gradient-2: #12101a;
  --bg-sidebar: #0e0e16;

  /* Primary - Muted Purple (less neon) */
  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --primary-glow: rgba(139, 92, 246, 0.25);
  --primary-subtle: rgba(139, 92, 246, 0.1);
  --primary-dark: #6d28d9;

  /* Secondary - Soft Slate Blue */
  --secondary: #64748b;
  --secondary-glow: rgba(100, 116, 139, 0.2);

  /* Accent - Muted Lavender */
  --accent: #a78bfa;
  --accent-glow: rgba(167, 139, 250, 0.2);

  /* Glassmorphism */
  --glass-bg: rgba(22, 20, 30, 0.6);
  --glass-bg-solid: rgba(18, 16, 26, 0.95);
  --glass-border: rgba(139, 92, 246, 0.1);
  --glass-border-hover: rgba(139, 92, 246, 0.25);
  --glass-highlight: rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur: 16px;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Status */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.2);

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Layout */
  --sidebar-width: 240px;
  --chat-width: 380px;
  --header-height: 60px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== RESET ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-dark) 50%, var(--bg-gradient-2) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Purple ambient glow effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 20px var(--primary-glow);
  }

  50% {
    box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(168, 85, 247, 0.2);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.4s ease forwards;
}

/* Staggered animations */
.stagger-item {
  opacity: 0;
  animation: fadeSlideIn 0.4s ease forwards;
}

.stagger-item:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger-item:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger-item:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger-item:nth-child(6) {
  animation-delay: 0.3s;
}

.stagger-item:nth-child(n+7) {
  animation-delay: 0.35s;
}

/* ===================== LAYOUT ===================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* === LEFT SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-logo ion-icon {
  font-size: 1.8rem;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
}

.nav-item ion-icon {
  font-size: 1.25rem;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--primary-subtle);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--glass-border);
}

.nav-item.logout {
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-item.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content.with-chat {
  margin-right: var(--chat-width);
}

/* === PAGE HEADER === */
.page-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 10, 18, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === PAGE BODY === */
.page-body {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

/* === RIGHT CHAT SIDEBAR === */
.chat-sidebar {
  width: var(--chat-width);
  min-width: 320px;
  max-width: 600px;
  background: var(--glass-bg-solid);
  border-left: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.chat-sidebar.open {
  transform: translateX(0);
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20, 15, 35, 0.95);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
}

.chat-header-title ion-icon {
  color: var(--secondary);
}

.chat-sessions {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.session-btn {
  padding: 6px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.session-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.session-btn.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.session-btn.new-chat {
  background: transparent;
  border-style: dashed;
  color: var(--primary);
}

.session-btn.new-chat:hover:not(:disabled) {
  background: var(--primary-subtle);
}

.session-btn.new-chat:disabled,
.session-btn.new-chat.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--text-muted);
  border-color: var(--glass-border);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-input-area {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(to top, var(--bg-dark) 0%, rgba(20, 15, 35, 0.95) 100%);
  flex-shrink: 0;
}

.chat-input-area .chat-input-box {
  width: 100%;
}

/* ===================== TYPOGRAPHY ===================== */
h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-primary-color {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--error);
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

/* ===================== UTILITIES ===================== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.flex-1 {
  flex: 1;
}

.flex-wrap {
  flex-wrap: wrap;
}

.ml-auto {
  margin-left: auto;
}

.mt-auto {
  margin-top: auto;
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.p-16 {
  padding: 16px;
}

.p-24 {
  padding: 24px;
}

/* ===================== GLASS COMPONENTS ===================== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.1);
}

.glass-card.static:hover {
  transform: none;
}

/* ===================== BUTTONS ===================== */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-subtle);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--primary-hover);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
}

.glass-btn ion-icon {
  font-size: 1.1em;
}

.glass-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
  transform: translateY(-1px);
}

.glass-btn:active {
  transform: translateY(0);
}

.glass-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.glass-btn.btn-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.glass-btn.btn-success:hover:not(:disabled) {
  background: var(--success);
  color: white;
  box-shadow: 0 0 24px var(--success-glow);
}

.glass-btn.btn-success:disabled {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: rgba(16, 185, 129, 0.4);
}

.glass-btn.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.glass-btn.btn-danger:hover {
  background: var(--error);
  color: white;
  box-shadow: 0 0 24px var(--error-glow);
}

.glass-btn.btn-ghost {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--text-muted);
}

.glass-btn.btn-ghost:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
  box-shadow: none;
}

.glass-btn.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
}

.glass-btn.loading {
  pointer-events: none;
  color: transparent;
  position: relative;
}

.glass-btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.glass-btn.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ===================== CLUSTER CALENDAR ===================== */
.cluster-calendar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cluster-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cluster-pill:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.cluster-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
}

.cluster-pill.active:hover {
  cursor: default;
  transform: none;
}

.cluster-pill.pending {
  border-color: var(--warning);
}

.cluster-pill.pending:not(.active) {
  border-color: rgba(245, 158, 11, 0.4);
}

.cluster-pill.approved {
  border-color: var(--accent);
}

.cluster-pill.approved:not(.active) {
  border-color: rgba(167, 139, 250, 0.4);
}

.cluster-pill.published {
  border-color: var(--success);
}

.cluster-pill.published:not(.active) {
  border-color: rgba(16, 185, 129, 0.4);
}

.cluster-pill .day-num {
  font-weight: 600;
}

.text-warning {
  color: var(--warning);
}

/* ===================== DASHBOARD LAYOUT ===================== */
.cluster-hero {
  position: relative;
}

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

.cluster-hero-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cluster-hero-title h2 {
  margin: 0;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cluster-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cluster-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.cluster-blocker {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--warning);
  font-size: 0.9rem;
}

.cluster-blocker ion-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* Status Card */
.dashboard-status-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-indicator {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-indicator ion-icon {
  font-size: 1.8rem;
  color: var(--primary);
}

.status-indicator.success {
  background: rgba(16, 185, 129, 0.15);
}

.status-indicator.success ion-icon {
  color: var(--success);
}

.status-indicator.warning {
  background: rgba(245, 158, 11, 0.15);
}

.status-indicator.warning ion-icon {
  color: var(--warning);
}

.status-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Actions Card */
.dashboard-actions-card {
  display: flex;
  flex-direction: column;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.action-buttons a {
  display: block;
}

/* ===================== INPUTS ===================== */
.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.glass-input {
  width: 100%;
  background: rgba(20, 15, 35, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition-base);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:hover {
  border-color: rgba(168, 85, 247, 0.3);
}

.glass-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

textarea.glass-input {
  resize: vertical;
  min-height: 100px;
}

select.glass-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a855f7' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ===================== TOOLBAR ===================== */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  margin-bottom: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.toolbar-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar .glass-input {
  width: auto;
  min-width: 160px;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ===================== DRAFT CARDS ===================== */
.draft-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.draft-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--glass-border);
  transition: var(--transition-base);
}

.draft-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.15);
}

.draft-card:hover::before {
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary);
}

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

.draft-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

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

.draft-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary-subtle);
  color: var(--primary-hover);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-secondary {
  background: rgba(34, 211, 238, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===================== MODALS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

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

.modal-content {
  background: linear-gradient(180deg, rgba(30, 20, 50, 0.98) 0%, rgba(15, 10, 30, 0.98) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 25px 80px -12px rgba(0, 0, 0, 0.6), 0 0 50px rgba(168, 85, 247, 0.1);
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 20, 50, 0.5);
}

.modal-header h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 ion-icon {
  color: var(--primary);
}

.modal-body {
  padding: 24px;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-base);
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--error);
  color: var(--error);
}

/* ===================== DETAIL SECTIONS ===================== */
.detail-section {
  margin-bottom: 20px;
}

.detail-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.detail-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.highlight-box {
  background: var(--primary-subtle);
  border-left: 3px solid var(--primary);
  padding: 14px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight-box.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.stat-item {
  text-align: center;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.85rem;
}

input[type=checkbox] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ===================== CHAT MESSAGES ===================== */
.chat-msg {
  display: flex;
  animation: fadeSlideIn 0.3s ease forwards;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-msg.assistant {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 90%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant .msg-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--glass-border);
}

/* ===================== CHAT DELETE BUTTONS ===================== */

/* Session item wrapper for button + delete */
.session-item-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.session-item-wrapper .session-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Session delete button */
.session-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.session-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  opacity: 1;
}

/* Message delete button */
.chat-msg {
  position: relative;
}

.msg-delete-btn {
  position: absolute;
  top: 0;
  right: -4px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transform: scale(0.8);
}

.chat-msg:hover .msg-delete-btn {
  opacity: 1;
  transform: scale(1);
}

.chat-msg.user .msg-delete-btn {
  right: auto;
  left: -4px;
}

.msg-delete-btn:hover {
  background: var(--error);
  color: white;
}

/* ===================== MARKDOWN IN CHAT ===================== */
.markdown-content {
  line-height: 1.6;
}

.markdown-content p {
  margin: 0 0 0.75em 0;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  margin: 1em 0 0.5em 0;
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
  margin-top: 0;
}

.markdown-content h1 {
  font-size: 1.3em;
}

.markdown-content h2 {
  font-size: 1.15em;
}

.markdown-content h3 {
  font-size: 1.05em;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.markdown-content li {
  margin: 0.25em 0;
}

.markdown-content code {
  background: rgba(139, 92, 246, 0.15);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  color: var(--primary-hover);
}

.markdown-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  margin: 0.75em 0;
}

.markdown-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8em;
  color: var(--text-primary);
}

.markdown-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 0.75em 0;
  padding-left: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 0.85em;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid var(--glass-border);
  padding: 8px 10px;
  text-align: left;
}

.markdown-content th {
  background: rgba(139, 92, 246, 0.1);
  font-weight: 600;
}

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

.markdown-content a:hover {
  color: var(--primary);
}

.markdown-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content em {
  font-style: italic;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 1em 0;
}

/* ===================== CHATGPT-STYLE UI ===================== */

/* Welcome State */
.chat-welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
}

.welcome-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
}

.suggestion-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggestion-chip:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* Typing Indicator */
.typing-bubble {
  display: flex;
  align-items: center;
  padding: 12px 16px !important;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Message Avatars */
.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-msg.user .msg-avatar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  order: 2;
  margin-left: 10px;
}

.chat-msg.assistant .msg-avatar {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  margin-right: 10px;
}

.chat-msg {
  align-items: flex-start;
  gap: 0;
}

/* Resize Handle */
.chat-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  transition: background 0.2s;
}

.chat-resize-handle:hover {
  background: var(--primary);
}

/* ChatGPT-style Input Box - Dynamic */
.chat-input-box {
  position: relative;
  background: var(--bg-card);
  border-radius: 24px;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
  overflow: hidden;
}

/* Animated gradient border */
.chat-input-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(90deg,
      var(--primary) 0%,
      var(--secondary) 25%,
      var(--primary) 50%,
      var(--secondary) 75%,
      var(--primary) 100%);
  background-size: 200% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  /* Allow clicks to pass through */
}

.chat-input-box:focus-within::before {
  opacity: 1;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* Glow effect on focus */
.chat-input-box:focus-within {
  box-shadow:
    0 0 20px rgba(139, 92, 246, 0.2),
    0 0 40px rgba(139, 92, 246, 0.1);
}

.chat-input-box input,
.chat-input-box textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  resize: none;
  font-family: inherit;
  line-height: 1.5;
}

.chat-input-box input::placeholder,
.chat-input-box textarea::placeholder {
  color: var(--text-muted);
  transition: color 0.2s;
}

.chat-input-box:focus-within input::placeholder,
.chat-input-box:focus-within textarea::placeholder {
  color: var(--text-secondary);
}

.chat-input-box .send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
  flex-shrink: 0;
  margin-right: 2px;
}

.chat-input-box .send-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.chat-input-box .send-btn:active {
  transform: scale(0.95);
}

/* Pulse animation when empty */
.chat-input-box .send-btn.pulse {
  animation: sendPulse 2s infinite;
}

@keyframes sendPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }
}

/* Input area container */
.chat-input-area {
  padding: 16px 20px 20px;
  background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
}

/* Add icon prefix */
.chat-input-prefix {
  padding-left: 12px;
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.2s;
}

.chat-input-box:focus-within .chat-input-prefix {
  color: var(--primary);
}

/* ===================== DASHBOARD ===================== */
.dashboard-stat {
  text-align: center;
  position: relative;
  padding: 40px 24px;
}

.dashboard-stat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: var(--primary);
  filter: blur(60px);
  opacity: 0.2;
  z-index: -1;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  margin: 12px 0 8px;
  background: linear-gradient(135deg, #fff 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.stat-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===================== PROGRESS ===================== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  box-shadow: 0 0 12px var(--primary-glow);
  transition: width 0.4s ease;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--text-muted);
}

.empty-state ion-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
  color: var(--primary);
}

.empty-state h4 {
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: pulse 6s ease-in-out infinite;
}

.login-page::before {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.login-page::after {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  right: -50px;
  animation-delay: 3s;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--glass-bg-solid);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(168, 85, 247, 0.1);
  position: relative;
  z-index: 10;
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--primary-glow);
}

.login-logo ion-icon {
  font-size: 2rem;
  color: white;
}

.login-card h2 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.login-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.85rem;
}

.login-card form {
  text-align: left;
}

.login-card .glass-btn {
  margin-top: 8px;
}

/* ===================== SKELETON ===================== */
.skeleton {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.04) 0%, rgba(168, 85, 247, 0.08) 50%, rgba(168, 85, 247, 0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
}

.skeleton-card {
  height: 160px;
}

/* ===================== TAGS ===================== */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.25));
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .chat-sidebar {
    width: 100%;
    max-width: 400px;
  }

  .main-content.with-chat {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .page-body {
    padding: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .filter-bar {
    flex-direction: column;
  }
}

/* ===================== QUEUE CARDS ===================== */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-base);
}

.queue-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.3);
}

.queue-card.expanded {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.queue-card.has-error {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.05);
}

/* Header */
.queue-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.queue-primary-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  /* for text truncation */
}

.queue-order {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 24px;
}

.queue-type-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.queue-info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 16px;
}

.queue-title {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.queue-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.queue-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-queued {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.3);
}

.status-processing {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
  animation: pulse 2s infinite;
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-cancelled {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

/* Details Section */
.queue-details {
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  animation: fadeSlideIn 0.3s ease;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-item label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-item p {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
}

.prompt-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
}

.error-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.actions-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}