/* ==========================================================================
   RoamSync — Premium Light Glassmorphic Design System
   Modern, elegant, high-contrast, editorial travel aesthetic
   ========================================================================== */

:root {
  --bg-canvas: #f6f8fc;
  --bg-glass-card: rgba(255, 255, 255, 0.82);
  --bg-glass-card-hover: rgba(255, 255, 255, 0.95);
  --bg-glass-subtle: rgba(255, 255, 255, 0.6);
  --bg-input: rgba(248, 250, 252, 0.9);

  --border-glass: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-focus: #3b82f6;

  --text-headline: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-accent: #6366f1;
  --brand-emerald: #059669;
  --brand-warning: #d97706;
  --brand-rose: #e11d48;

  /* Category Palette (Refined Editorial Pastels) */
  --cat-sightseeing-bg: #eff6ff;
  --cat-sightseeing-text: #1d4ed8;
  --cat-sightseeing-border: #bfdbfe;

  --cat-food-bg: #fff7ed;
  --cat-food-text: #c2410c;
  --cat-food-border: #fed7aa;

  --cat-transport-bg: #f5f3ff;
  --cat-transport-text: #6d28d9;
  --cat-transport-border: #ddd6fe;

  --cat-lodging-bg: #ecfdf5;
  --cat-lodging-text: #047857;
  --cat-lodging-border: #a7f3d0;

  --cat-shopping-bg: #fdf2f8;
  --cat-shopping-text: #be185d;
  --cat-shopping-border: #fbcfe8;

  --cat-leisure-bg: #f0fdfa;
  --cat-leisure-text: #0f766e;
  --cat-leisure-border: #99f6e4;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-glass: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 6px 20px -3px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-card-hover: 0 16px 32px -4px rgba(15, 23, 42, 0.1), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-drawer: 0 -15px 35px -5px rgba(15, 23, 42, 0.08);

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

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

body.light-glass-theme {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Light Orbs */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.7) 0%, rgba(224, 231, 255, 0.2) 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(254, 215, 170, 0.5) 0%, rgba(253, 230, 138, 0.1) 70%);
  top: 30%;
  right: -150px;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(204, 251, 241, 0.6) 0%, rgba(238, 242, 255, 0.2) 70%);
  bottom: 0;
  left: 20%;
}

/* Glass Utility Classes */
.glass-panel {
  background: var(--bg-glass-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
}

.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.app-header {
  height: 76px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border-subtle);
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-glass {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.logo-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-headline);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-pill-soft {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.logo-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.glass-select {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-headline);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.glass-select:hover, .glass-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Header Budget Pill */
.glass-budget-pill {
  width: 230px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.budget-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 5px;
}

.budget-title {
  color: var(--text-muted);
  font-weight: 500;
}

.budget-numbers {
  font-weight: 700;
  color: var(--text-headline);
}

.glass-progress-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.glass-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 999px;
  transition: width 0.4s ease, background 0.3s;
}

/* Status Pill */
.status-indicator-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #047857;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.live-dot.pulsing {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-primary-glass {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary-glass:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-headline);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.btn-glass:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   Main Workspace Layout
   ========================================================================== */

.app-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  padding: 28px 32px 170px;
  max-width: 1740px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Board Banner Card */
.board-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.board-banner-card {
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.banner-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}

.trip-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-headline);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.trip-sub-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.banner-toolbar {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-banner {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-headline);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-banner:hover {
  background: #ffffff;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Columns Container */
.columns-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}

.day-column-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 520px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.day-column-glass.drag-over {
  border-color: var(--brand-primary);
  background: rgba(239, 246, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.day-title-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-headline);
}

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

.day-spend-chip {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* Activity Cards with Real Photo Previews */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.activity-card-glass {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: grab;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.activity-card-glass:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(37, 99, 235, 0.3);
}

.activity-card-glass.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.activity-card-glass.has-conflict {
  border: 1.5px solid #f87171;
  background: #fff5f5;
}

.activity-card-glass.added-by-agent {
  border-left: 4px solid var(--brand-emerald);
}

/* Card Thumbnail Photo Header */
.card-photo-header {
  height: 100px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.card-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.activity-card-glass:hover .card-photo-img {
  transform: scale(1.05);
}

.card-floating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-floating-badge.sightseeing { background: rgba(239, 246, 255, 0.9); color: var(--cat-sightseeing-text); }
.card-floating-badge.food { background: rgba(255, 247, 237, 0.9); color: var(--cat-food-text); }
.card-floating-badge.transport { background: rgba(245, 243, 255, 0.9); color: var(--cat-transport-text); }
.card-floating-badge.lodging { background: rgba(236, 253, 245, 0.9); color: var(--cat-lodging-text); }
.card-floating-badge.shopping { background: rgba(253, 242, 248, 0.9); color: var(--cat-shopping-text); }
.card-floating-badge.leisure { background: rgba(240, 253, 250, 0.9); color: var(--cat-leisure-text); }

.card-cost-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.card-body-content {
  padding: 12px 14px;
}

.card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-headline);
  margin-bottom: 6px;
  line-height: 1.35;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.time-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: #475569;
}

.card-actions-group {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.activity-card-glass:hover .card-actions-group {
  opacity: 1;
}

.btn-card-icon {
  background: #f1f5f9;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.btn-card-icon:hover {
  background: #e2e8f0;
  color: var(--text-headline);
}

.btn-card-icon.delete:hover {
  background: #fee2e2;
  color: var(--brand-rose);
}

.card-notes-text {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.73rem;
  color: var(--text-muted);
  font-style: italic;
}

.card-conflict-tag {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Empty State */
.column-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 14px;
  color: var(--text-light);
  text-align: center;
  font-size: 0.82rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  margin: auto 0;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget-card {
  padding: 20px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.widget-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-headline);
}

.widget-header-title h3 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.budget-status-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.budget-status-tag.over-budget {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.category-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-body);
}

.cat-track {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.cat-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Conflict Alert Card */
.conflict-alert-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 16px;
}

.conflict-alert-card.hidden {
  display: none;
}

.alert-top {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-badge-icon {
  font-size: 1.3rem;
}

.alert-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: #92400e;
}

.alert-text {
  font-size: 0.78rem;
  color: #b45309;
}

.btn-resolve-alert {
  width: 100%;
  padding: 8px 12px;
  background: #d97706;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.btn-resolve-alert:hover {
  background: #b45309;
}

/* Real-Time Activity Feed */
.feed-card {
  max-height: 440px;
  display: flex;
  flex-direction: column;
}

.live-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
}

.widget-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.activity-feed-stream {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.feed-event-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.feed-event-item.agent-event {
  border-left: 3px solid var(--brand-emerald);
  background: #f0fdf4;
}

.feed-event-item.human-event {
  border-left: 3px solid var(--brand-primary);
  background: #eff6ff;
}

.feed-avatar-icon {
  font-size: 1rem;
}

.feed-desc {
  flex: 1;
  color: var(--text-headline);
}

.feed-time-text {
  font-size: 0.68rem;
  color: var(--text-light);
}

/* ==========================================================================
   WebMCP Bottom Drawer (Glassmorphic)
   ========================================================================== */

.webmcp-drawer-glass {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-drawer);
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.webmcp-drawer-glass.collapsed {
  transform: translateY(calc(100% - 50px));
}

.drawer-drag-handle {
  height: 50px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-testing-methods-bar {
  display: flex;
  gap: 10px;
  padding: 8px 28px 4px;
  background: rgba(241, 245, 249, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.test-method-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.test-method-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.test-method-chip.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 700;
}

.drawer-method-guide {
  padding: 16px 28px;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
}

.drawer-method-guide.hidden {
  display: none;
}

.guide-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-body);
}

.guide-box h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-headline);
  margin-bottom: 8px;
}

.guide-box ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-box code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #0f172a;
}

.guide-box pre {
  margin-top: 6px;
  background: #0f172a;
  color: #34d399;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  overflow-x: auto;
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.drawer-header-left h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-headline);
}

.badge-tools-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 2px 8px;
  border-radius: 999px;
}

.drawer-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-run-tests {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
  transition: all 0.2s;
}

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

.btn-toggle-arrow {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.webmcp-drawer-glass.collapsed .btn-toggle-arrow {
  transform: rotate(180deg);
}

.drawer-content-grid {
  height: 250px;
  padding: 16px 28px;
  display: grid;
  grid-template-columns: 290px 330px 1fr;
  gap: 24px;
  overflow: hidden;
}

.drawer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.drawer-col-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Simulation Action Cards */
.sim-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sim-action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-headline);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-action-card:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.sim-card-icon {
  font-size: 1.1rem;
}

.sim-card-body strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-headline);
}

.sim-card-body small {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Tool Schemas List */
.tool-schemas-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.tool-item-row.dynamic-tool {
  border-color: #fcd34d;
  background: #fffbeb;
}

.tool-mode-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.tool-mode-pill.read {
  background: #dbeafe;
  color: #1e40af;
}

.tool-mode-pill.write {
  background: #d1fae5;
  color: #065f46;
}

/* Telemetry Log Stream */
.log-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-clear-stream {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.telemetry-log {
  flex: 1;
  background: #0f172a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #34d399;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.45;
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-headline);
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-form {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-headline);
}

.glass-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-headline);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s;
}

.glass-input:focus {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.glass-input.textarea {
  resize: vertical;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1100px) {
  .app-main {
    grid-template-columns: 1fr;
  }

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

  .log-col {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    height: auto;
    padding: 14px 16px;
    gap: 12px;
  }

  .header-center {
    display: none;
  }

  .app-main {
    padding: 16px 16px 180px;
  }

  .drawer-content-grid {
    grid-template-columns: 1fr;
    height: 320px;
  }

  .log-col {
    grid-column: span 1;
  }
}
