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

:root {
  --ink: #0f172a;
  --text-main: #1e293b;
  --text-secondary: #475569;
  --muted: #64748b;
  --paper: #f8fafc;
  --card-bg: #ffffff;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --lime: #d4f24d;
  --lime-glow: #e4ff6b;
  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;
  --nvidia: #76b900;
  --nvidia-bg: #f2f9e6;
  --nvidia-glow: #88d600;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text-main);
  background: radial-gradient(circle at 90% 4%, #edf7e2 0, transparent 30%), var(--paper);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
}

.shell {
  max-width: 1720px;
  width: 96%;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* ========================================================= */
/* 3-COLUMN DASHBOARD CONTAINER (SYMMETRICAL 285PX SIDEBARS) */
/* ========================================================= */

.dashboard-container {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr) 285px;
  gap: 24px;
  align-items: start;
}

.dashboard-sidebar-left,
.dashboard-sidebar-right {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.dashboard-sidebar-left::-webkit-scrollbar,
.dashboard-sidebar-right::-webkit-scrollbar {
  width: 4px;
}
.dashboard-sidebar-left::-webkit-scrollbar-thumb,
.dashboard-sidebar-right::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.dashboard-main {
  min-width: 0;
}

/* Sidebar Panels - Smooth, Clean & Professional */
.sidebar-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  font-family: 'Inter', sans-serif;
}

.sidebar-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
}

.sidebar-stat-group {
  margin-bottom: 12px;
}

.sidebar-stat-group:last-child {
  margin-bottom: 0;
}

.stat-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 3px;
  text-transform: none;
}

.stat-val {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.stat-val.status-stable {
  color: var(--emerald);
}

.stat-val.status-drift {
  color: var(--warning);
}

.stat-val.status-healed {
  color: #4f46e5;
}

.stat-val.status-inactive {
  color: var(--muted);
}

.stat-sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 3px;
}

/* Dietary Progress Bar */
.diet-bar-wrap {
  margin: 6px 0 4px;
}

.diet-bar-track {
  height: 6px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.diet-bar-veg {
  background: #10b981;
  height: 100%;
  transition: width 0.3s ease;
}

.diet-bar-nonveg {
  background: #f43f5e;
  height: 100%;
  transition: width 0.3s ease;
}

/* Fallback Pricing Card */
.fallback-pricing-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
}

.fallback-pricing-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-bg);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 5px;
}

.fallback-pricing-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Sidebar Offers & Budget Lists */
.sidebar-offers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-offer-item {
  background: var(--warning-bg);
  border: 1px solid #fef08a;
  border-radius: 6px;
  padding: 8px 11px;
  font-family: 'Inter', sans-serif;
}

.sidebar-offer-badge {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #854d0e;
  margin-bottom: 2px;
}

.sidebar-offer-code {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  background: #ffffff;
  color: #713f12;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px dashed #eab308;
  display: inline-block;
  margin-bottom: 3px;
}

.sidebar-offer-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #854d0e;
  line-height: 1.35;
}

.sidebar-budget-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-budget-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  gap: 8px;
}

.budget-item-name {
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.budget-item-price {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-bg);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--emerald-border);
}

.sidebar-empty-note {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  padding: 4px 0;
  line-height: 1.4;
}

/* Header (Full-Width Horizontal Header) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding: 4px 0 18px;
  margin-bottom: 22px;
  gap: 20px;
  width: 100%;
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-title, h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-accent {
  background: var(--lime);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--ink);
}

.badge-nvidia {
  background: var(--nvidia);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* Buttons */
button, .btn-secondary {
  cursor: pointer;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.btn-primary {
  border: 1.5px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  padding: 10px 18px;
  font-size: 13.5px;
}

.btn-primary:hover {
  background: #c3e635;
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 13.5px;
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.btn-heal {
  border: 1.5px solid var(--nvidia);
  background: var(--nvidia-bg);
  color: #3b5f00;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
}

.btn-heal:hover {
  background: var(--nvidia);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(118, 185, 0, 0.4);
}

.btn-scrape {
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
}

.btn-scrape:hover {
  background: #253833;
}

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

.btn-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-close:hover {
  background: #eee;
  color: var(--ink);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Multi-Restaurant Cumulative Storage Tabs */
.restaurant-tabs-section {
  padding: 12px 0 4px;
}

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

.restaurant-tabs-title {
  font: 500 11px 'DM Mono', monospace;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.restaurant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  border-color: var(--ink);
  background: #fdfdfd;
}

.tab-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  border-radius: 12px;
}

.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.tab-del-btn {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.5;
  font-size: 11px;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-del-btn:hover {
  opacity: 1;
  background: rgba(255, 50, 50, 0.2);
  color: #ff3333;
}

.btn-del-action {
  background: #fff;
  border: 1px solid #fed7d7;
  color: #c53030;
  font: 600 11px 'DM Mono', monospace;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-del-action:hover {
  background: #fff5f5;
  border-color: #e53e3e;
  color: #9b2c2c;
}

/* Scrape Form */
.scrape-form {
  padding: 20px 0 6px;
}

.scrape-form label {
  display: block;
  margin-bottom: 8px;
  font: 500 12px 'DM Mono', monospace;
  text-transform: uppercase;
  color: var(--ink);
}

.label-sub {
  color: var(--muted);
  font-weight: 400;
}

.url-row {
  display: flex;
  gap: 10px;
}

.url-row input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 11px 16px;
  font: 14px 'Space Grotesk', sans-serif;
  background: #fff;
  outline: none;
}

.url-row input:focus {
  border-color: var(--ink);
}

.form-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.form-note code {
  font-family: 'DM Mono', monospace;
  background: #e4ebe4;
  padding: 2px 5px;
  border-radius: 3px;
}

/* ========================================================= */
/* STRAIGHT POINT-TO-POINT LINEAR PIPELINE MAP (WITH GLOW)    */
/* ========================================================= */

.pipeline-section {
  margin: 18px 0 22px;
  background: #ffffff;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.pipeline-title {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pipeline-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.pipeline-status-text {
  font: 600 12px 'DM Mono', monospace;
  color: var(--ink);
  background: #f1f5f3;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.pipeline-track-wrap {
  position: relative;
}

.pipeline-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 4px;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f8faf7;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.node-icon {
  font-size: 20px;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.node-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  transition: color 0.25s ease;
}

.node-sub {
  font: 500 11px 'DM Mono', monospace;
  color: var(--muted);
  transition: color 0.25s ease;
}

/* Connectors */
.pipeline-connector {
  flex: 1;
  height: 4px;
  background: var(--line);
  margin-top: -28px;
  position: relative;
  z-index: 1;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========================================================= */
/* LIVE GLOWING ANIMATIONS & ACTIVE STAGE HIGHLIGHTS         */
/* ========================================================= */

/* Active Glowing Node */
.pipeline-node.active .node-icon-wrap {
  background: #fff;
  border-color: #000;
  transform: scale(1.18);
  box-shadow: 
    0 0 0 3px rgba(212, 242, 77, 0.8),
    0 0 20px rgba(212, 242, 77, 0.9),
    0 0 40px rgba(118, 185, 0, 0.6),
    0 0 60px rgba(16, 185, 129, 0.4);
  animation: pulse-glow-ring 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.pipeline-node.active .node-icon {
  transform: scale(1.15);
  animation: bounce-subtle 1.2s infinite ease-in-out;
}

.pipeline-node.active .node-label {
  color: #0d1614;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(212, 242, 77, 0.8);
}

.pipeline-node.active .node-sub {
  color: #2e5900;
  font-weight: 700;
}

/* Active Pulsing Radar Ripple Effect */
.pipeline-node.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(212, 242, 77, 0.5);
  z-index: 1;
  animation: radar-ripple 1.6s infinite ease-out;
  pointer-events: none;
}

/* Flowing Laser Connector Leading to Active Node */
.pipeline-connector.flowing {
  height: 4px;
  background: linear-gradient(90deg, #10b981, #d4f24d, #76b900, #10b981);
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(212, 242, 77, 0.8), 0 0 20px rgba(118, 185, 0, 0.5);
  animation: laser-flow 1s linear infinite;
}

/* Completed Step State */
.pipeline-node.completed .node-icon-wrap {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 12px rgba(16, 185, 129, 0.2);
}

.pipeline-node.completed .node-label {
  color: #065f46;
}

.pipeline-node.completed .node-sub {
  color: #047857;
}

.pipeline-connector.completed {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Broken / Warning State */
.pipeline-node.broken .node-icon-wrap {
  background: var(--danger-bg);
  border-color: var(--danger);
  box-shadow: 
    0 0 0 3px rgba(239, 68, 68, 0.3),
    0 0 20px rgba(239, 68, 68, 0.4);
  animation: warning-shake 0.6s ease-in-out;
}

.pipeline-node.broken .node-label {
  color: var(--danger);
}

/* Keyframes */
@keyframes pulse-glow-ring {
  0% {
    box-shadow: 
      0 0 0 3px rgba(212, 242, 77, 0.9),
      0 0 15px rgba(212, 242, 77, 0.8),
      0 0 30px rgba(118, 185, 0, 0.5);
  }
  50% {
    box-shadow: 
      0 0 0 7px rgba(212, 242, 77, 0.5),
      0 0 28px rgba(212, 242, 77, 1),
      0 0 50px rgba(118, 185, 0, 0.8),
      0 0 70px rgba(16, 185, 129, 0.4);
  }
  100% {
    box-shadow: 
      0 0 0 3px rgba(212, 242, 77, 0.9),
      0 0 15px rgba(212, 242, 77, 0.8),
      0 0 30px rgba(118, 185, 0, 0.5);
  }
}

@keyframes radar-ripple {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes laser-flow {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0) scale(1.15); }
  50% { transform: translateY(-3px) scale(1.22); }
}

@keyframes warning-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ========================================================= */
/* AI HEALING SUB-BRANCH (GLOWING NVIDIA ACCENT)             */
/* ========================================================= */

.heal-branch {
  margin-top: 18px;
  border-top: 2px dashed #9fd13b;
  background: linear-gradient(135deg, #f2f9e6 0%, #e9f7d3 100%);
  border-radius: 6px;
  padding: 14px 18px;
  box-shadow: 0 0 20px rgba(118, 185, 0, 0.15);
  animation: fadeInDown 0.3s ease-out;
}

.heal-branch-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.heal-node {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  padding: 10px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.heal-node.active {
  border-color: var(--nvidia);
  background: #ffffff;
  transform: scale(1.05);
  box-shadow: 
    0 0 0 3px rgba(118, 185, 0, 0.4),
    0 0 22px rgba(118, 185, 0, 0.7),
    0 0 45px rgba(118, 185, 0, 0.3);
  animation: pulse-nvidia-glow 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.heal-node.completed {
  border-color: var(--emerald);
  background: var(--emerald-bg);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.heal-icon {
  font-size: 22px;
}

.heal-text strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.heal-text span {
  font: 500 11px 'DM Mono', monospace;
  color: var(--muted);
}

.heal-arrow {
  color: var(--nvidia);
  font-weight: bold;
  font-size: 18px;
  animation: pulse-arrow 1s infinite alternate;
}

.heal-live-msg {
  text-align: center;
  margin-top: 10px;
  font: 600 12px 'DM Mono', monospace;
  color: #2e5900;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  width: 100%;
}

@keyframes pulse-nvidia-glow {
  0%, 100% {
    box-shadow: 
      0 0 0 3px rgba(118, 185, 0, 0.4),
      0 0 18px rgba(118, 185, 0, 0.6);
  }
  50% {
    box-shadow: 
      0 0 0 6px rgba(118, 185, 0, 0.6),
      0 0 30px rgba(118, 185, 0, 0.9),
      0 0 50px rgba(118, 185, 0, 0.4);
  }
}

@keyframes pulse-arrow {
  0% { transform: translateX(-3px); opacity: 0.7; }
  100% { transform: translateX(3px); opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================= */
/* SUMMARY GRID & RESTAURANT INFO                            */
/* ========================================================= */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.metric-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font: 500 11px 'DM Mono', monospace;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.sub-metric {
  margin-top: 4px;
  font: 500 11px 'DM Mono', monospace;
  color: var(--muted);
}

.status-pill-ok {
  color: #065f46 !important;
  font-weight: 600;
}

.status-pill-broken {
  color: var(--danger) !important;
  font-weight: 600;
}

/* Menu Section */
.menu-section {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.search-wrap input {
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 8px 14px;
  font: 13.5px 'Space Grotesk', sans-serif;
  width: 260px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--ink);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pill {
  background: #f5f7f2;
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--ink);
  border-radius: 20px;
  font-weight: 500;
}

.pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Items Grid */
.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.item-card {
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  background: #fff;
}

.item-meta {
  flex: 1;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.diet-tag {
  font: 600 10.5px 'DM Mono', monospace;
  padding: 2px 6px;
  border-radius: 3px;
}

.tag-veg {
  background: var(--emerald-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.tag-nonveg {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.item-category {
  font: 500 10.5px 'DM Mono', monospace;
  background: #eef2f0;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 3px;
}

.item-inferred-tag {
  font: 500 10px 'DM Mono', monospace;
  background: #fffbeb;
  color: #b45309;
  padding: 2px 5px;
  border-radius: 3px;
}

.item-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}

.item-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.item-price-col {
  text-align: right;
  flex-shrink: 0;
}

.item-price {
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
}

.price-curr {
  font: 500 10px 'DM Mono', monospace;
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 12px;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Footer */
.source-footer {
  margin-top: 28px;
  text-align: center;
}

.source-footer p {
  font: 500 11.5px 'DM Mono', monospace;
  color: var(--muted);
}

.source-footer code {
  background: #e4ebe4;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ========================================================= */
/* JSON OUTPUT MODAL                                         */
/* ========================================================= */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(13, 22, 20, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #111a18;
  border: 1.5px solid #2b3d38;
  border-radius: 8px;
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  color: #e5e7eb;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #24332f;
}

.modal-header h3 {
  margin: 0 0 2px;
  font-size: 1.1rem;
  color: #fff;
}

.json-meta {
  font: 500 11px 'DM Mono', monospace;
  color: #94a3b8;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  background: #090e0d;
}

.modal-body pre {
  margin: 0;
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
  line-height: 1.45;
  color: #7dd3fc;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ========================================================= */
/* REAL-TIME SCRAPER & DOM INTELLIGENCE ANALYTICS           */
/* ========================================================= */

.analytics-section {
  margin: 18px 0 22px;
  background: #ffffff;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 16px 20px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.analytics-title {
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.analytics-badge {
  font: 600 11px 'DM Mono', monospace;
  color: #047857;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.analytics-card {
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analytics-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-icon {
  font-size: 14px;
}

.card-label {
  font: 600 11px 'DM Mono', monospace;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.analytics-main-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.analytics-main-val.status-stable {
  color: #047857;
}

.analytics-main-val.status-drift {
  color: #d97706;
}

.analytics-main-val.status-healed {
  color: #2563eb;
}

.analytics-main-val.status-inactive {
  color: #64748b;
}

.analytics-sub-val {
  font-size: 11.5px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

/* ========================================================= */
/* ACTIVE RESTAURANT OFFERS & DISCOUNTS                     */
/* ========================================================= */

.offers-section {
  margin: 16px 0 20px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 6px;
  padding: 14px 18px;
}

.offers-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

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

.offers-title {
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.06em;
  color: #92400e;
}

.offers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.offer-card {
  background: #ffffff;
  border: 1px solid #fcd34d;
  border-radius: 5px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.offer-badge {
  font-weight: 700;
  font-size: 12.5px;
  color: #b45309;
}

.offer-code {
  font: 600 11px 'DM Mono', monospace;
  background: #fef3c7;
  color: #78350f;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px dashed #d97706;
}

/* ========================================================= */
/* ⚖️ CROSS-RESTAURANT COMPARISON ENGINE & VISUAL GRAPH      */
/* ========================================================= */

.modal-card.modal-lg {
  max-width: 960px;
}

.modal-card.modal-md {
  max-width: 580px;
}

.compare-modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding: 20px 24px;
}

.compare-selectors-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.compare-select-col {
  flex: 1;
}

.compare-select-label {
  display: block;
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 6px;
}

.compare-select {
  width: 100%;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

.compare-vs-badge {
  font: 800 13px 'DM Mono', monospace;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 18px;
}

/* Scoreboard */
.compare-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.compare-score-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.compare-score-card.winner-card {
  border-color: #10b981;
  background: #f0fdf4;
}

.compare-score-label {
  display: block;
  font: 700 10.5px 'DM Mono', monospace;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.compare-score-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.compare-score-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  margin-top: 3px;
}

/* Comparison Filters */
.compare-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}

.compare-filter-title {
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.05em;
  color: var(--ink);
}

/* Dish Comparison Items & Graphical Bars */
.compare-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-dish-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  transition: all 0.15s ease;
}

.compare-dish-card:hover {
  border-color: var(--ink);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.compare-dish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-dish-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.price-delta-badge {
  font: 700 11px 'DM Mono', monospace;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.price-delta-badge.cheaper-a {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.price-delta-badge.cheaper-b {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.price-delta-badge.equal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Comparative Graph Bars */
.compare-graph-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.compare-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-row-label {
  width: 140px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-bar-track {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.compare-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.compare-bar-fill.bar-a {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.compare-bar-fill.bar-b {
  background: linear-gradient(90deg, #a855f7, #7c3aed);
}

.compare-price-tag {
  font: 700 13px 'DM Mono', monospace;
  color: var(--ink);
  width: 60px;
  text-align: right;
}

.compare-empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ========================================================= */
/* ⏰ AUTOMATED SCRAPING SCHEDULE TIMER STYLES              */
/* ========================================================= */

.timer-live-badge {
  font: 800 9px 'DM Mono', monospace;
  background: #ef4444;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  animation: timerPulse 1.5s infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.timer-banner {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.timer-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #065f46;
}

.timer-pulse-icon {
  font-size: 18px;
  animation: timerRotate 4s linear infinite;
}

@keyframes timerRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.banner-countdown-val {
  font: 800 13px 'DM Mono', monospace;
  color: #047857;
  background: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
}

.banner-sub {
  font-size: 10.5px;
  color: #047857;
  opacity: 0.85;
}

.timer-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px;
}

/* Timer Modal Components */
.timer-modal-body {
  padding: 20px 24px;
}

.timer-countdown-card {
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.timer-ring-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.timer-countdown-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #10b981;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.timer-clock-digits {
  font: 800 1.6rem 'DM Mono', monospace;
  color: var(--ink);
  line-height: 1.1;
}

.timer-status-caption {
  font: 700 10px 'DM Mono', monospace;
  color: #047857;
  margin-top: 2px;
}

.timer-controls-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.timer-settings-group {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}

.timer-interval-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.timer-exec-log {
  background: #0f172a;
  color: #38bdf8;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  max-height: 130px;
  overflow-y: auto;
  line-height: 1.5;
}

.timer-log-entry {
  margin-bottom: 4px;
  word-break: break-all;
}

.timer-log-time {
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-container {
    grid-template-columns: 260px minmax(0, 1fr) 270px;
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar-left,
  .dashboard-sidebar-right {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 840px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pipeline-track {
    flex-wrap: wrap;
    gap: 12px;
  }
  .pipeline-connector {
    display: none;
  }
  .topbar {
    flex-direction: column;
  }
}