/* ═══════════════════════════════════════════════════════════════════════════
   CHEF ATELIER — WARM GOURMET ATELIER DESIGN SYSTEM
   A bespoke, artisanal culinary interface. Non-generic, editorial, and tactile.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Atelier Color Palette */
  --bg-deep: #0a0d14;
  --bg-surface: #121620;
  --bg-surface-raised: #181e2b;
  --bg-surface-hover: #1f2737;
  --bg-glass: rgba(18, 22, 32, 0.78);
  --bg-glass-card: rgba(24, 30, 43, 0.65);

  /* Warm Gourmet Accents */
  --terracotta: #d95d39;
  --terracotta-hover: #ea6b47;
  --terracotta-glow: rgba(217, 93, 57, 0.25);
  
  --amber: #e9a84c;
  --amber-soft: rgba(233, 168, 76, 0.15);
  --amber-glow: rgba(233, 168, 76, 0.3);

  --olive-sage: #5a7d65;
  --olive-light: #7da58a;
  
  --charcoal: #2a3344;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-warm: rgba(233, 168, 76, 0.18);
  --border-terracotta: rgba(217, 93, 57, 0.35);

  /* Typography Colors */
  --text-main: #f5f3ef;
  --text-sub: #cbd2dc;
  --text-muted: #8391a5;
  --text-highlight: #fde8c8;

  /* Font Families */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-display: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-warm-glow: 0 0 20px rgba(233, 168, 76, 0.12);

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── BASE RESET & BOX MODEL ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle Kitchen Studio Background Motif */
body.atelier-app {
  background-image: 
    radial-gradient(ellipse at 15% 15%, rgba(217, 93, 57, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(233, 168, 76, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(90, 125, 101, 0.03) 0%, transparent 65%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.serif {
  font-family: var(--font-serif);
  letter-spacing: 0;
}

p {
  color: var(--text-sub);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  transition: all var(--transition-fast);
}

input, textarea {
  font-family: inherit;
  outline: none;
}

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 13, 20, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amber);
}

/* ── ATELIER TOP HEADER ─────────────────────────────────────────────────── */
.atelier-header {
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.brand-crest {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--terracotta), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px var(--terracotta-glow);
}

.crest-icon {
  font-size: 16px;
  color: #fff;
  font-weight: bold;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-highlight);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Active Dish Indicator in Header */
.header-active-dish {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(233, 168, 76, 0.08);
  border: 1px solid var(--border-warm);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.active-dish-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.active-dish-name {
  color: var(--text-highlight);
  font-weight: 600;
}

.header-dish-clear {
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
}
.header-dish-clear:hover {
  background: var(--terracotta);
  color: #fff;
}

/* Utilities in Header */
.header-utilities {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-dot.online {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}
.status-dot.offline {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6);
}

.util-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  font-size: 13px;
  border: 1px solid var(--border-hairline);
}
.util-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── BUTTON STYLES ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition-smooth);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: var(--radius-xs);
}

.btn-primary {
  background: linear-gradient(135deg, var(--terracotta), #c04925);
  color: #fff;
  box-shadow: 0 4px 14px var(--terracotta-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--terracotta-hover), var(--terracotta));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--terracotta-glow);
}

.btn-terracotta {
  background: var(--terracotta);
  color: #fff;
}
.btn-terracotta:hover {
  background: var(--terracotta-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  border: 1px solid var(--border-hairline);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-main);
}

.btn-outline {
  border: 1px solid var(--border-warm);
  color: var(--amber);
  background: rgba(233, 168, 76, 0.05);
}
.btn-outline:hover {
  background: rgba(233, 168, 76, 0.15);
  border-color: var(--amber);
  color: #fff;
}

.btn-ghost {
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-amber {
  background: rgba(233, 168, 76, 0.15);
  color: var(--amber);
  border: 1px solid var(--border-warm);
}

.badge-cuisine {
  background: rgba(90, 125, 101, 0.2);
  color: #9cd5ae;
  border: 1px solid rgba(90, 125, 101, 0.4);
}

.badge-difficulty {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-sub);
  border: 1px solid var(--border-hairline);
}

.badge-time {
  background: rgba(217, 93, 57, 0.15);
  color: #f7a48d;
  border: 1px solid rgba(217, 93, 57, 0.3);
}

/* ── TRI-COLUMN MAIN WORKSPACE ──────────────────────────────────────────── */
.atelier-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 380px;
  height: calc(100vh - 64px);
  overflow: hidden;
  position: relative;
}

.col-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--border-hairline);
  position: relative;
}

.col-panel:last-child {
  border-right: none;
}

.panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.panel-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-highlight);
  margin-top: 4px;
}

.panel-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEFT COLUMN: SOUTH INDIAN EXCLUSIVE SLM SHOWCASE
   ═══════════════════════════════════════════════════════════════════════════ */
.col-slm {
  background: rgba(14, 18, 26, 0.85);
}

.slm-header {
  background: linear-gradient(180deg, rgba(24, 30, 43, 0.8), rgba(18, 22, 32, 0.9));
}

.slm-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.training-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulse 1.6s infinite ease-in-out;
}

.slm-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
}

/* Telemetry Card */
.slm-telemetry-card {
  margin: 16px 20px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.t-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.t-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}

.accent-amber {
  color: var(--amber) !important;
  font-weight: 700;
}

/* Domain Chips */
.slm-domain-section {
  padding: 0 20px 12px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tag-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  background: rgba(233, 168, 76, 0.1);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.slm-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slm-chip-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-hairline);
  color: var(--text-sub);
  font-size: 12.5px;
  transition: all var(--transition-fast);
}

.slm-chip-btn:hover {
  background: rgba(217, 93, 57, 0.1);
  border-color: var(--border-terracotta);
  color: var(--text-highlight);
  transform: translateX(2px);
}

.chip-tag {
  font-size: 10px;
  color: var(--amber);
  background: rgba(233, 168, 76, 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  margin-left: 8px;
}

/* Console Box */
.slm-console-wrap {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.slm-input-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: border-color var(--transition-fast);
}
.slm-input-box:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 12px var(--amber-soft);
}

.slm-input-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  resize: none;
}
.slm-input-box textarea::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.slm-output-box {
  background: #0d1017;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-sub);
}

.slm-output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  height: 100%;
  color: var(--text-muted);
  padding: 20px 10px;
}
.output-icon {
  font-size: 24px;
  opacity: 0.6;
}

.slm-output-text strong, .slm-output-text b {
  color: var(--text-highlight);
}
.slm-output-text ul, .slm-output-text ol {
  padding-left: 18px;
  margin: 8px 0;
}
.slm-output-text li {
  margin-bottom: 4px;
}

.slm-footer-note {
  margin: auto 20px 20px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(90, 125, 101, 0.1);
  border: 1px solid rgba(90, 125, 101, 0.25);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 11.5px;
}

.note-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.note-copy strong {
  display: block;
  color: #a8d5b5;
  font-weight: 600;
  margin-bottom: 2px;
}

.note-copy span {
  color: var(--text-muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MIDDLE COLUMN: CAMERA CAPTURE & MODULAR COOKING CANVAS
   ═══════════════════════════════════════════════════════════════════════════ */
.col-center {
  background: rgba(12, 15, 22, 0.95);
  padding: 24px 30px;
}

/* Discovery State (Hub) */
.capture-hub-view {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hub-hero {
  text-align: center;
  margin-top: 12px;
}

.hub-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.hub-title {
  font-size: 28px;
  color: var(--text-highlight);
  line-height: 1.25;
}

.hub-sub {
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 10px auto 0;
  line-height: 1.55;
}

/* Dropzone */
.dropzone-atelier {
  border: 2px dashed rgba(233, 168, 76, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(24, 30, 43, 0.4);
  padding: 40px 24px;
  text-align: center;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone-atelier:hover, .dropzone-atelier.dragover {
  border-color: var(--amber);
  background: rgba(233, 168, 76, 0.05);
  box-shadow: var(--shadow-warm-glow);
}

.camera-lens-graphic {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(217, 93, 57, 0.12);
  border: 1px solid var(--border-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
}

.lens-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(233, 168, 76, 0.4);
}

.lens-icon {
  font-size: 26px;
}

.dropzone-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dropzone-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Dropzone Preview */
.dropzone-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preview-img-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-warm);
  box-shadow: var(--shadow-md);
}

.preview-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-remove-btn:hover {
  background: var(--terracotta);
}

.preview-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.preview-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-classify {
  padding: 12px 28px;
  font-size: 15px;
}

/* Spinner during classification */
.analyzing-atelier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 0;
}

.gourmet-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(233, 168, 76, 0.15);
  border-top-color: var(--terracotta);
  border-right-color: var(--amber);
  animation: spin 0.9s linear infinite;
}

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

.analyzing-text {
  text-align: center;
}
.analyzing-text strong {
  display: block;
  font-size: 16px;
  color: var(--text-highlight);
  margin-bottom: 4px;
}
.analyzing-text span {
  font-size: 13px;
  color: var(--text-muted);
}

/* Prediction Multiple Candidates Confirmation */
.prediction-confirm-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.confirm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.pred-cand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-align: left;
}
.pred-cand-btn:hover {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}

/* Quick Dishes Strip */
.quick-dishes-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.strip-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.strip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strip-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-sub);
  font-size: 12.5px;
}
.strip-pill:hover {
  background: rgba(233, 168, 76, 0.12);
  border-color: var(--border-warm);
  color: var(--text-highlight);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEDICATED COOKING SCREEN WORKSPACE (OPENS ALONE UPON DISH SELECTION)
   ═══════════════════════════════════════════════════════════════════════════ */
.cooking-screen-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 20px 32px 60px;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

.cooking-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cooking-nav-left, .cooking-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cooking-nav-center {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.cooking-status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: pulse 1.8s infinite ease-in-out;
}

.cooking-nav-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cooking-nav-dish-name {
  color: var(--text-highlight);
  font-size: 15px;
  font-weight: 600;
}

.back-to-dishes-btn {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.back-to-dishes-btn:hover {
  transform: translateX(-2px);
}

.cooking-canvas-view {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Dish Banner Card */
.dish-banner-card {
  position: relative;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-warm);
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
}

.dish-banner-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.dish-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.65);
}

.dish-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.2) 0%, rgba(10, 13, 20, 0.88) 100%);
}

.dish-banner-info {
  position: relative;
  z-index: 2;
  flex: 1;
}

.dish-meta-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.dish-banner-title {
  font-size: 24px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dish-banner-desc {
  font-size: 13px;
  color: #e2e8f0;
  max-width: 640px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-banner-actions {
  position: relative;
  z-index: 2;
}

/* ── MODULAR 5-SEGMENT GRID ─────────────────────────────────────────────── */
.modular-segments-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-auto-flow: dense;
  gap: 20px;
}

/* Card Shell for Each Segment */
.segment-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.segment-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seg-icon {
  font-size: 17px;
}

.segment-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-highlight);
}

.segment-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ── SEGMENT 1: SERVING SCALER ─────────────────────────────────────────── */
.segment-serving {
  grid-column: 1;
}

.scale-factor-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  background: rgba(233, 168, 76, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-warm);
}

.serving-controls-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.serving-stepper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper-btn:hover {
  background: var(--terracotta);
  color: #fff;
}

.stepper-value {
  padding: 0 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stepper-value .num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-highlight);
  line-height: 1.1;
}

.stepper-value .unit {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.serving-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hairline);
  color: var(--text-sub);
  font-size: 12px;
}
.preset-pill:hover, .preset-pill.active {
  background: rgba(233, 168, 76, 0.15);
  border-color: var(--amber);
  color: var(--amber);
  font-weight: 600;
}

/* ── SEGMENT 2: SCALED INGREDIENTS CHECKLIST ───────────────────────────── */
.segment-ingredients {
  grid-column: 1;
}

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

.ing-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.ingredients-list-stream {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.ingredient-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  transition: all var(--transition-fast);
}

.ingredient-item-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.ingredient-item-row.checked {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.2);
}
.ingredient-item-row.checked .ing-name {
  text-decoration: line-through;
}

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

.ing-checkbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--terracotta);
}

.ing-name {
  font-size: 13.5px;
  color: var(--text-main);
}

.ing-allergen-tag {
  font-size: 10px;
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  margin-left: 6px;
}

.ing-substitute-pill {
  font-size: 10px;
  color: var(--amber);
  background: rgba(233, 168, 76, 0.1);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  margin-left: 6px;
}

.ing-measure {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-highlight);
  background: rgba(233, 168, 76, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

/* ── SEGMENT 3: PRE-COOKING PREPARATION (Below ingredients) ────────────── */
.segment-prep {
  grid-column: 1;
}

.prep-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.prep-tasks-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.prep-task-card {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  line-height: 1.45;
}

.prep-index {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--amber);
  font-size: 11px;
  background: rgba(233, 168, 76, 0.1);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prep-text strong {
  color: var(--text-highlight);
}

/* ── SEGMENT 4: DEDICATED SCROLLABLE PROCEDURE COLUMN ──────────────────── */
.segment-procedure {
  grid-column: 2;
  grid-row: 1 / span 3; /* Spans cleanly beside serving, ingredients, and prep */
}

.procedure-progress-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--terracotta);
}

.cooking-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  overflow: hidden;
}

.cooking-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terracotta), var(--amber));
  transition: width var(--transition-smooth);
}

/* Active Step Spotlight Card */
.active-step-spotlight {
  background: linear-gradient(180deg, rgba(28, 35, 49, 0.9), rgba(18, 22, 32, 0.95));
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spotlight-step-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spotlight-instruction {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 400;
}

.spotlight-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cue-tag {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  color: var(--text-sub);
}
.cue-tag.cue-temp {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
}
.cue-tag.cue-tech {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

/* Step Cooking Timer */
.step-timer-widget {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timer-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
}

.timer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.timer-actions {
  display: flex;
  gap: 8px;
}

/* Nav Actions */
.spotlight-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

/* Full Steps Timeline */
.all-steps-timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.timeline-header-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding-bottom: 4px;
}

.procedure-steps-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-step-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hairline);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.timeline-step-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.timeline-step-card.active-step {
  border-color: var(--terracotta);
  background: rgba(217, 93, 57, 0.08);
}

.step-num-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timeline-step-card.active-step .step-num-badge {
  background: var(--terracotta);
  color: #fff;
}

.step-timeline-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-phase-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
}

.step-action-text {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHT COLUMN: 25 DISHES INTERNET GALLERY BROWSER
   ═══════════════════════════════════════════════════════════════════════════ */
.col-dishes {
  background: rgba(14, 18, 26, 0.9);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* Lock column parent so inner stream scrolls independently */
  position: relative;
}

.dishes-header {
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(24, 30, 43, 0.95), rgba(18, 22, 32, 0.98));
  border-bottom: 1px solid var(--border-hairline);
  padding: 18px 20px 14px;
}

.dishes-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dishes-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  background: rgba(233, 168, 76, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Search & Filters */
.dishes-filter-bar {
  flex-shrink: 0;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(18, 22, 32, 0.85);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  gap: 8px;
}
.search-input-wrap:focus-within {
  border-color: var(--amber);
}

.search-icon {
  font-size: 13px;
  opacity: 0.6;
}

.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 12.5px;
}
.search-input-wrap input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  font-size: 11px;
  color: var(--text-muted);
}

/* Dedicated Scrollable Gallery Stream Specific to this Panel */
.dishes-gallery-stream {
  flex: 1;
  min-height: 0;
  padding: 14px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: scroll;   /* always reserve the track, not just when content overflows */
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;                               /* Firefox */
  scrollbar-color: var(--amber) rgba(10, 13, 20, 0.6); /* Firefox */
}

/* Custom Sleek Scrollbar Specific to Right Panel — solid colour, not a faint
   translucent one, so it's clearly visible rather than "not there". */
.dishes-gallery-stream::-webkit-scrollbar {
  width: 10px;
}
.dishes-gallery-stream::-webkit-scrollbar-track {
  background: rgba(10, 13, 20, 0.6);
  border-radius: var(--radius-full);
}
.dishes-gallery-stream::-webkit-scrollbar-thumb {
  background: var(--amber);
  border-radius: var(--radius-full);
  border: 2px solid rgba(10, 13, 20, 0.6);
}
.dishes-gallery-stream::-webkit-scrollbar-thumb:hover {
  background: var(--terracotta);
}

/* Bottom fade shadow showing slide/scroll down affordance */
.dishes-scroll-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(to top, rgba(14, 18, 26, 0.95), transparent);
  pointer-events: none;
  z-index: 10;
}

/* Category Stream Banner Header */
.category-stream-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(233, 168, 76, 0.08);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.cat-banner-icon {
  font-size: 22px;
  line-height: 1;
}
.cat-banner-text {
  display: flex;
  flex-direction: column;
}
.cat-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.01em;
}
.cat-banner-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Right column, name-only design: one box per cuisine (.dish-category-box),
   re-using the same .category-stream-banner header already used elsewhere in
   this file, each followed by a plain list of clickable name rows. No photos,
   no filter tabs — every box renders at once and the panel just scrolls. */
.dish-category-box {
  margin-bottom: 4px;
}

.dish-name-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.dish-name-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: rgba(22, 28, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dish-name-chip:hover {
  background: rgba(28, 36, 52, 0.95);
  border-color: rgba(233, 168, 76, 0.55);
  transform: translateX(2px);
}

.dish-name-chip.current-active {
  border-color: var(--terracotta);
  background: rgba(217, 93, 57, 0.15);
  box-shadow: 0 0 16px var(--terracotta-glow);
}

.dish-name-chip-text {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: -0.01em;
  /* Clear, readable names: wrap rather than truncate long ones. */
  white-space: normal;
}

.dish-name-chip .chip-arrow {
  flex-shrink: 0;
  color: var(--terracotta);
  font-size: 13px;
  transition: transform 0.2s ease;
}

.dish-name-chip:hover .chip-arrow {
  transform: translateX(4px);
}

.active-cooking-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  background: var(--terracotta);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── PREVIEW CROP BUTTONS & STATUS ──────────────────────────────────────── */
.preview-img-frame {
  position: relative;
}

.preview-crop-badge-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(14, 18, 26, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-warm);
  color: var(--amber);
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 5;
}
.preview-crop-badge-btn:hover {
  background: var(--amber);
  color: #0d1117;
}

.preview-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.preview-crop-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  border-color: var(--border-warm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-crop-btn:hover {
  background: rgba(233, 168, 76, 0.15);
  border-color: var(--amber);
  color: #fff;
}

/* ── CROPPER MODAL DIALOG ────────────────────────────────────────────────── */
.cropper-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.cropper-modal-dialog {
  background: #141923;
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(233, 168, 76, 0.12);
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.cropper-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(20, 26, 37, 0.95);
  border-bottom: 1px solid var(--border-hairline);
}

.cropper-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cropper-modal-title .icon {
  font-size: 18px;
}
.cropper-modal-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-highlight);
  margin: 0;
}

.cropper-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.cropper-modal-close:hover {
  color: #fff;
}

.cropper-modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.cropper-help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.cropper-canvas-wrapper {
  width: 100%;
  height: 380px;
  max-height: 50vh;
  background: #090c10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cropper-canvas-wrapper img {
  max-width: 100%;
  display: block;
}

.cropper-modal-footer {
  padding: 14px 20px;
  background: rgba(20, 26, 37, 0.95);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cropper-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crop-ratio-btn.active {
  background: rgba(233, 168, 76, 0.18);
  border-color: var(--amber);
  color: var(--amber);
  font-weight: 700;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM DOCKED RAG CHATBOT WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */
.rag-chat-dock {
  position: fixed;
  bottom: 20px;
  left: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Floating Dock Trigger Capsule */
.rag-dock-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e2535, #141822);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md), 0 0 16px rgba(233, 168, 76, 0.15);
  transition: all var(--transition-smooth);
}
.rag-dock-trigger:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(233, 168, 76, 0.25);
}

.trigger-icon {
  font-size: 16px;
}

.trigger-pill {
  font-size: 10px;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 700;
}

/* Chat Slide-up Window */
.rag-chat-window {
  width: 380px;
  height: 500px;
  background: rgba(18, 22, 32, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
}

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

.chat-win-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(24, 30, 43, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-win-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terracotta), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chat-title-copy strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.1;
}

.chat-status-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.chat-win-controls {
  display: flex;
  gap: 6px;
}

.chat-ctrl-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.chat-quick-chips {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(0, 0, 0, 0.2);
}

.quick-chip {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-sub);
  font-size: 11px;
  white-space: nowrap;
}
.quick-chip:hover {
  background: rgba(233, 168, 76, 0.12);
  color: var(--amber);
  border-color: var(--amber);
}

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

.chat-bubble {
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-bubble.bot {
  align-self: flex-start;
}
.chat-bubble.bot .bubble-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-xs);
  color: var(--text-main);
}

.chat-bubble.user {
  align-self: flex-end;
}
.chat-bubble.user .bubble-content {
  background: linear-gradient(135deg, var(--terracotta), #bf4b28);
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) var(--radius-xs) var(--radius-md);
}

.bubble-content {
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.45;
}

.bubble-time {
  font-size: 10px;
  color: var(--text-muted);
  align-self: flex-end;
}

.chat-input-bar {
  padding: 10px 12px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  display: flex;
  gap: 8px;
}

.chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
}
.chat-input-bar input:focus {
  border-color: var(--amber);
}

.btn-send {
  padding: 0 14px;
  border-radius: var(--radius-sm);
}

/* ── ACCESS KEY MODAL ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

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

.modal-close {
  color: var(--text-muted);
  font-size: 16px;
}

.modal-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.atelier-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.atelier-input:focus {
  border-color: var(--amber);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.atelier-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-warm);
  color: var(--text-highlight);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  z-index: 250;
  pointer-events: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── RESPONSIVE ADAPTATIONS ─────────────────────────────────────────────── */
@media (max-width: 1360px) {
  .atelier-workspace {
    grid-template-columns: 300px minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1100px) {
  .atelier-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .col-dishes {
    display: none; /* Can be toggled or accessed via drawer on tablet */
  }
  .modular-segments-grid {
    grid-template-columns: 1fr;
  }
  .segment-procedure {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 768px) {
  .atelier-workspace {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .col-slm {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline);
    max-height: 480px;
  }
  .col-center {
    padding: 16px;
  }
  .rag-chat-window {
    width: calc(100vw - 32px);
    left: 16px;
    right: auto;
  }
}
