/* ===========================
   BiteSleuth — style.css
   Health-tech dark aesthetic
   Fonts: Syne (display) + DM Mono (data)
   =========================== */

:root {
  --bg-base: #0d0f12;
  --bg-surface: #141720;
  --bg-elevated: #1c2030;
  --bg-card: #1a1e2e;
  --border: #252a3a;
  --border-light: #2e3550;

  --accent-amber: #f5a623;
  --accent-amber-dim: #c8851a;
  --accent-green: #2ecc71;
  --accent-green-dim: #27ae60;
  --accent-red: #e74c3c;
  --accent-blue: #5b9ef7;
  --accent-purple: #8b6ff7;

  --text-primary: #f0f2f8;
  --text-secondary: #8892aa;
  --text-dim: #4a5270;

  --carbs-color: #f5a623;
  --protein-color: #2ecc71;
  --fat-color: #5b9ef7;
  --cals-color: #8b6ff7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);

  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-display);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  /* subtle grain texture */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,166,35,0.08) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ── HEADER ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,18,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-accent { color: var(--accent-amber); }

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

.diet-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(245,166,35,0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245,166,35,0.25);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ── PREMIUM BANNER ── */
.premium-banner {
  background: linear-gradient(135deg, rgba(245,166,35,0.1) 0%, rgba(139,111,247,0.08) 100%);
  border-bottom: 1px solid rgba(245,166,35,0.2);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 480px;
  margin: 0 auto;
}

.banner-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.banner-text strong { color: var(--accent-amber); }

.btn-upgrade {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--accent-amber);
  background: rgba(245,166,35,0.12);
  color: var(--accent-amber);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-upgrade:hover { background: rgba(245,166,35,0.22); transform: translateY(-1px); }

.premium-banner.hidden { display: none; }

/* ── MAIN ── */
.app-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

/* ── DATE / STREAK ── */
.date-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.date-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.date-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.streak-display { text-align: right; }

.streak-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent-amber);
  line-height: 1;
}

.streak-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── MACRO GRID ── */
.macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.macro-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.macro-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.macro-carbs::before { background: var(--carbs-color); }
.macro-protein::before { background: var(--protein-color); }
.macro-fat::before { background: var(--fat-color); }
.macro-calories::before { background: var(--cals-color); }

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

.macro-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.macro-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.macro-numbers {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 10px;
}

.macro-current {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-primary);
  transition: color 0.3s;
}

.macro-separator {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
}

.macro-goal {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.progress-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-carbs  { background: var(--carbs-color); }
.progress-protein { background: var(--protein-color); }
.progress-fat    { background: var(--fat-color); }
.progress-cals   { background: var(--cals-color); }

/* Over-limit flash */
.macro-current.over { color: var(--accent-red) !important; }
.progress-fill.over { background: var(--accent-red) !important; }

/* ── ADD MEAL BUTTON ── */
.add-meal-row {
  margin-bottom: 24px;
}

.btn-add-meal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--accent-amber);
  background: rgba(245,166,35,0.05);
  color: var(--accent-amber);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-add-meal:hover {
  background: rgba(245,166,35,0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245,166,35,0.15);
}

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

.btn-add-icon {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

/* ── MEAL LOG ── */
.meal-log-section { }

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

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-clear {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.btn-clear:hover { color: var(--accent-red); background: rgba(231,76,60,0.1); }

.meal-list { display: flex; flex-direction: column; gap: 8px; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
}
.empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; line-height: 1.6; }

/* Meal item card */
.meal-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  animation: slideIn 0.3s ease;
  transition: border-color 0.2s;
}

.meal-item:hover { border-color: var(--border-light); }

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

.meal-item-left { flex: 1; min-width: 0; }

.meal-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-item-macros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.macro-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.pill-carbs  { background: rgba(245,166,35,0.12); color: var(--carbs-color); }
.pill-protein { background: rgba(46,204,113,0.12); color: var(--protein-color); }
.pill-fat    { background: rgba(91,158,247,0.12); color: var(--fat-color); }
.pill-cals   { background: rgba(139,111,247,0.12); color: var(--cals-color); }

.meal-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.meal-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.btn-delete-meal {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.btn-delete-meal:hover { color: var(--accent-red); background: rgba(231,76,60,0.1); }

.meal-warning {
  font-size: 11px;
  color: var(--accent-red);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 24px 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--border-light); color: var(--text-primary); }

.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.input-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.example-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.example-chip:hover {
  background: rgba(245,166,35,0.1);
  border-color: rgba(245,166,35,0.3);
  color: var(--accent-amber);
}

.meal-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 14px 16px;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
}
.meal-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.12);
}
.meal-input::placeholder { color: var(--text-dim); }

.modal-error {
  font-size: 13px;
  color: var(--accent-red);
  margin-bottom: 8px;
  min-height: 18px;
  font-family: var(--font-mono);
}

.btn-parse {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--accent-amber) 0%, #e8920a 100%);
  color: #0d0f12;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-parse:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,166,35,0.3); }
.btn-parse:active { transform: translateY(0); }
.btn-parse:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #0d0f12;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.parsed-preview {
  margin-top: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.preview-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.preview-item { }

.preview-label {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.preview-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.sugar-warning {
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--accent-red);
  margin-bottom: 12px;
}

.btn-confirm {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-green);
  color: #0d0f12;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-confirm:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── SETTINGS MODAL ── */
.settings-group {
  margin-bottom: 24px;
}

.settings-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.diet-options {
  display: flex;
  gap: 8px;
}

.diet-opt {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.diet-opt.active,
.diet-opt:hover {
  border-color: var(--accent-amber);
  background: rgba(245,166,35,0.1);
  color: var(--accent-amber);
}

.goals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.goal-input-wrap label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-family: var(--font-mono);
}

.goal-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.goal-input:focus { border-color: var(--accent-amber); }
.goal-input::-webkit-inner-spin-button { opacity: 0.5; }

.sub-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sub-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.sub-badge.free {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.sub-badge.premium {
  background: rgba(245,166,35,0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245,166,35,0.3);
}

.sub-detail { font-size: 13px; color: var(--text-secondary); }

.btn-upgrade-settings {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-amber);
  background: rgba(245,166,35,0.08);
  color: var(--accent-amber);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-upgrade-settings:hover {
  background: rgba(245,166,35,0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,166,35,0.2);
}

.btn-save-settings {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: background 0.2s;
}
.btn-save-settings:hover { background: var(--border-light); }

/* ── CHATBOT WIDGET ── */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-bubble-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, #1a2035 0%, #252a42 100%);
  border: 1px solid var(--accent-amber);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 20px rgba(245,166,35,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-bubble-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.5), 0 0 28px rgba(245,166,35,0.2);
}

.chat-icon { font-size: 20px; }
.chat-label { font-size: 13px; font-weight: 700; color: var(--accent-amber); }

.chat-panel {
  width: calc(100vw - 32px);
  max-width: 360px;
  height: 450px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-header {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-title {
  font-size: 14px;
  font-weight: 700;
}

.chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}
.chat-close:hover { color: var(--text-primary); }

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

.chat-msg { display: flex; }

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

.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.chat-msg.user .msg-bubble {
  background: var(--accent-amber);
  color: #0d0f12;
  border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
  font-weight: 600;
}

.chat-msg.assistant .msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
}

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

.typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: dotBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

.chat-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent-amber); }
.chat-input::placeholder { color: var(--text-dim); }

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-amber);
  color: #0d0f12;
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.chat-send:hover { opacity: 0.85; }

.chat-disclaimer {
  padding: 6px 12px 10px;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.4;
}

/* ── UTILITY ── */
.hidden { display: none !important; }

/* ── DESKTOP ADJUSTMENTS ── */
@media (min-width: 500px) {
  .premium-banner,
  .app-main {
    padding-left: 24px;
    padding-right: 24px;
  }

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

  .modal-card {
    border-radius: var(--radius-xl);
    margin: 20px;
  }

  .chat-widget {
    bottom: 28px;
    right: 28px;
  }
}
