/* ==========================================================================
   SmartCart AI - Modern Glassmorphism & Agentic Theme Design System
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-base: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-glass: rgba(17, 24, 39, 0.75);
  --bg-overlay: rgba(10, 14, 23, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(52, 211, 153, 0.4);
  --border-glow: rgba(56, 189, 248, 0.6);

  --primary: #10b981;        /* Emerald / Fresh Green */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.3);

  --accent-cyan: #06b6d4;     /* WebMCP Tech Cyan */
  --accent-violet: #8b5cf6;   /* AI Agent Violet */
  --accent-amber: #f59e0b;    /* Warm Amber */
  --accent-rose: #f43f5e;     /* Alert Rose */

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows & Glass */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.35);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.35);
  --shadow-glow-violet: 0 0 25px rgba(139, 92, 246, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Glass Surface Utilities */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* App Header & Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.875rem 1.5rem;
}

.header-container {
  max-width: 1700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-emerald);
}

.brand-icon-wrapper svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  letter-spacing: 0.05em;
}

/* Header Search & Actions */
.header-search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Budget & Status Capsule */
.budget-capsule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  transition: var(--transition);
}

.budget-capsule:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.budget-capsule input:focus {
  border-color: var(--primary) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.budget-val {
  font-weight: 600;
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-webmcp {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.35);
}

.btn-webmcp:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-icon-cart {
  position: relative;
}

.cart-badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-rose);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-base);
}

/* Main Layout Grid */
.main-layout {
  max-width: 1700px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  align-items: start;
}

/* Left Panel: Store & Recipes */
.store-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero Showcase Banner */
.hero-banner {
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.12) 50%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-title span {
  background: linear-gradient(90deg, #34d399, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.scenario-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.scenario-chip {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.scenario-chip:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chip-icon {
  font-size: 1.35rem;
}

.chip-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.chip-subtitle {
  font-size: 0.725rem;
  color: var(--primary);
}

/* Category & Filter Navigation Bar */
.filter-bar {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.category-tab {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-tab:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-tab.active {
  background: var(--primary);
  color: #0a0e17;
  border-color: var(--primary);
  font-weight: 700;
}

.dietary-tags-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dietary-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.dietary-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
}

.dietary-chip.active {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* Chef Recipe Studio Section */
.recipe-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.recipe-image-wrap {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.recipe-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .recipe-image-wrap img {
  transform: scale(1.05);
}

.recipe-badge-cuisine {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.recipe-body {
  padding: 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recipe-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.recipe-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.recipe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.recipe-cost {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Product Catalog Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.15rem;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Agent Action Pulse Glow Animation */
@keyframes agentPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    border-color: var(--accent-cyan);
  }
  50% {
    box-shadow: 0 0 25px 6px rgba(16, 185, 129, 0.5);
    border-color: var(--primary);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    border-color: var(--border-subtle);
  }
}

.product-card.agent-active {
  animation: agentPulseGlow 2.5s infinite;
}

.agent-action-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
  color: #0a0e17;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-md);
}

.product-img-wrap {
  height: 150px;
  position: relative;
  background: #161f30;
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

.stock-tag {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.product-info {
  padding: 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-tags {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.tag-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.tag-pill.tag-organic { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.tag-pill.tag-keto { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.tag-pill.tag-gluten_free { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.tag-pill.tag-vegan { color: #a3e635; background: rgba(163, 230, 53, 0.12); }

.product-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.product-unit {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.product-action-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.btn-add-cart {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--primary);
  color: #0a0e17;
  border-color: var(--primary);
}

/* ==========================================================================
   Right Panel: AI Agent Studio & Cart Drawer
   ========================================================================== */
.agent-panel-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 5rem;
}

/* Active Cart Drawer */
.cart-widget {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-items-scroll {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
}

.cart-item-meta {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  color: var(--text-main);
}

.cart-item-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-qty {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-qty:hover {
  background: var(--primary);
  color: #000;
}

.cart-totals-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.825rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.total-row.grand-total {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-subtle);
}

.total-row.promo-row {
  color: var(--primary);
}

/* Nutrition Macro Meter */
.nutrition-meter-box {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.macro-pill {
  flex: 1;
  background: var(--bg-surface-elevated);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.macro-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.macro-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   AI Agent Chat Assistant
   ========================================================================== */
.agent-chat-card {
  height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agent-chat-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(139, 92, 246, 0.08);
}

.agent-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}

.agent-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.status-dot.busy {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-bubble {
  max-width: 92%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.45;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-bubble.agent {
  align-self: flex-start;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.chat-bubble.thought {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.8rem;
  color: #d8b4fe;
}

.tool-call-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  margin: 0.2rem 0;
}

.chat-input-wrapper {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

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

/* ==========================================================================
   WebMCP Live Inspector & DevTools Modal / Drawer
   ========================================================================== */
.inspector-drawer {
  position: fixed;
  right: -520px;
  top: 0;
  width: 500px;
  height: 100vh;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-subtle);
  z-index: 100;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.inspector-drawer.open {
  right: 0;
}

.inspector-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 182, 212, 0.08);
}

.inspector-logs-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mcp-log-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.mcp-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.mcp-tool-name {
  color: var(--accent-cyan);
  font-weight: 700;
}

.mcp-latency-tag {
  color: var(--primary);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.mcp-json-block {
  background: #06090e;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  overflow-x: auto;
  color: #94a3b8;
  max-height: 140px;
}

/* ==========================================================================
   Human-in-the-Loop Checkout Approval Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.approval-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-glow-emerald), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-security-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.shield-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.approval-details-box {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .agent-panel-container {
    position: static;
  }
  .inspector-drawer {
    width: 100%;
    right: -100%;
  }
}
