/* ── SYSTEM COLOR VARIANTS & ROOT SETTINGS ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --bg: #f5f3ee; 
  --surface: #ffffff; 
  --surface2: #eceae3; 
  --surface3: #e2dfd7;
  --border: rgba(0,0,0,0.08); 
  --border2: rgba(0,0,0,0.15);
  --text: #1c1b18; 
  --text2: #6b6860; 
  --text3: #a09e99;
  
  --green-bg: #e8f5d9; 
  --green-text: #2d5a0e; 
  --green-border: #b8dca0;
  
  --amber-bg: #fef3d8; 
  --amber-text: #754400; 
  --amber-border: #f5d078;
  
  --red-bg: #fde8e8;   
  --red-text: #911f1f;   
  --red-border: #f0a0a0;
  
  --blue-bg: #e8f0fe;  
  --blue-text: #1a4ac0;  
  --blue-border: #99b4f8;
  
  --accent: #2d6a2d; 
  --accent-light: #e8f5d9;
  
  --radius: 10px; 
  --radius-lg: 16px; 
  --radius-xl: 20px;
  
  --font: 'DM Sans', sans-serif; 
  --font-mono: 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171715; 
    --surface: #212120; 
    --surface2: #2a2a28; 
    --surface3: #333330;
    --border: rgba(255,255,255,0.08); 
    --border2: rgba(255,255,255,0.15);
    --text: #f0ede6; 
    --text2: #9a9890; 
    --text3: #635f5a;
    
    --green-bg: #162c07; 
    --green-text: #9fd070; 
    --green-border: #2d5a0e;
    
    --amber-bg: #2e1d00; 
    --amber-text: #f5c96a; 
    --amber-border: #7a4800;
    
    --red-bg: #2e0d0d;   
    --red-text: #f0a0a0;   
    --red-border: #911f1f;
    
    --blue-bg: #0d1e40;  
    --blue-text: #99b4f8;  
    --blue-border: #1a4ac0;
    
    --accent: #6bbb3e; 
    --accent-light: #162c07;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
  }
}

/* ── BASE INTERFACE ELEMENTS ── */
body {
  background: var(--bg); 
  color: var(--text);
  font-family: var(--font); 
  min-height: 100vh; 
  font-size: 15px;
}

::-webkit-scrollbar { 
  width: 6px; 
}
::-webkit-scrollbar-track { 
  background: transparent; 
}
::-webkit-scrollbar-thumb { 
  background: var(--surface3); 
  border-radius: 3px; 
}

/* ── AUTHENTICATION COMPONENT GRAPHICS ── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}

.back-link {
  background: none; 
  border: none; 
  color: var(--text3); 
  cursor: pointer; 
  font-size: 13px;
  text-decoration: none;
}
.back-link:hover {
  color: var(--text2);
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.8rem;
}

.auth-logo-icon {
  font-size: 44px;
  display: block;
  margin-bottom: 10px;
}

.auth-logo h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.auth-logo p {
  font-size: 13px;
  color: var(--text2);
  margin-top: 5px;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  font-size: 13px;
  font-family: var(--font);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
}

.form-field {
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 5px;
  display: block;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: var(--accent);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.btn-primary:hover {
  opacity: 0.85;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
}
.link-btn:hover {
  text-decoration: underline;
}

.auth-error {
  font-size: 13px;
  color: var(--red-text);
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 12px;
  display: none;
}
.auth-error.show { display: block; }

.auth-success {
  font-size: 13px;
  color: var(--green-text);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 12px;
  display: none;
}
.auth-success.show { display: block; }


/* ── SHELL MASTER CORE HEADER ── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1200px; /* EXPANDED FOR LAPTOPS */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo-icon { font-size: 24px; }

.logo h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 12px;
  color: var(--text2);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.15s;
  font-family: var(--font);
}
.icon-btn:hover {
  background: var(--surface2);
  border-color: var(--border2);
}

.logout-btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  font-family: var(--font);
  transition: background 0.15s;
}
.logout-btn:hover {
  background: var(--surface2);
}


/* ── NAVIGATION ELEMENT SYSTEMS ── */
.nav-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.nav-tabs::-webkit-scrollbar { height: 0; }

.nav-tab-wrap {
  max-width: 1200px; /* EXPANDED FOR LAPTOPS */
  margin: 0 auto;
  display: flex;
  width: 100%;
}

.nav-tab {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-tab:hover:not(.active) {
  color: var(--text);
}


/* ── MAIN CONTENT CONTAINERS ── */
.main {
  max-width: 1200px; /* EXPANDED FOR LAPTOPS */
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.view-section {
  animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ── DASHBOARD STATISTICS GRAPHICS ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 1.5rem;
}
/* RESPONSIVE STATS FOR TABLETS AND PHONES */
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 11px;
  color: var(--text2);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
  font-family: var(--font-mono);
}
.stat-value.red { color: var(--red-text); }
.stat-value.amber { color: var(--amber-text); }
.stat-value.green { color: var(--green-text); }
.stat-value.blue { color: var(--blue-text); }


/* ── TOOLBARS & DYNAMIC FILTERS ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.search-bar {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}
.search-bar:focus {
  border-color: var(--border2);
}

.filter-dropdown {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
}


/* ── ACTION INTERFACE SYSTEM BUTTONS ── */
.action-btn {
  padding: 9px 15px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.1s;
}

.action-btn.primary {
  background: var(--text);
  color: var(--bg);
}
.action-btn.primary:hover { opacity: 0.9; }

.action-btn.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text2);
}
.action-btn.secondary:hover {
  background: var(--surface2);
  color: var(--text);
}
.action-btn.secondary.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}


/* ── MASTER INVENTORY CARDS & RENDERING STRUCTURES ── */
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.6rem 0;
}

/* RESPONSIVE FOOD GRID FOR DESKTOP/LAPTOPS */
.food-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  .food-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
  }
}

.food-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.15s ease;
}

.food-card:hover {
  border-color: var(--border2);
}

/* Bulk Selection Visual Matrix overrides */
.food-select {
  width: 0;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: bold;
  overflow: hidden;
  transition: width 0.2s ease, margin 0.2s ease;
}

body.bulk-active .food-card { cursor: pointer; }
body.bulk-active .food-select {
  width: 20px;
  margin-right: 2px;
  border: 1px solid var(--border2);
  background: transparent;
  color: transparent;
}
body.bulk-active .food-card.selected .food-select {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.food-emoji {
  font-size: 26px;
  width: 38px;
  height: 38px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.food-info {
  flex: 1;
  min-width: 0;
}

.food-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-name {
  font-weight: 500;
  color: var(--text);
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-qty {
  font-size: 11px;
  background: var(--surface2);
  color: var(--text2);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
  flex-shrink: 0;
}

.food-meta {
  font-size: 12px;
  color: var(--text2);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.food-meta .dot { color: var(--text3); }

.food-note {
  font-size: 12px;
  color: var(--text2);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 5px;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.badge-red { background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-border); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); border: 1px solid var(--amber-border); }
.badge-green { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }


/* ── CONTEXTUAL CARD ACTIONS OVERLAYS ── */
.card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.food-card:hover .card-actions {
  opacity: 1;
}
@media (max-width: 768px) {
  /* On touch devices, keep actions visible */
  .card-actions { opacity: 1; }
}
body.bulk-active .card-actions {
  display: none !important;
}

.card-actions .action-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  justify-content: center;
}
.card-actions .action-btn.check:hover { background: var(--green-bg); border-color: var(--green-border); color: var(--green-text); }
.card-actions .action-btn.trash:hover { background: var(--red-bg); border-color: var(--red-border); color: var(--red-text); }


/* ── BULK DOCK Action Panel ── */
.bulk-bar {
  background: var(--surface);
  border: 1px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  font-weight: 500;
  flex-wrap: wrap;
  gap: 10px;
}

.bulk-btn {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.bulk-btn.success { background: var(--green-bg); color: var(--green-text); }
.bulk-btn.danger { background: var(--red-bg); color: var(--red-text); }
.bulk-btn.secondary { background: var(--surface2); color: var(--text2); }
.bulk-btn:hover { opacity: 0.85; }


/* ── VIEW COMPONENT: SHOPPING MATRIX ── */
.shop-item {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-check {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: transparent;
  transition: all 0.1s;
}
.shop-check.checked {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.shop-name {
  flex: 1;
  font-size: 14.5px;
}
.shop-name.done {
  color: var(--text3);
  text-decoration: line-through;
}

.shop-del {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}
.shop-del:hover { color: var(--red-text); }

.shop-add-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.shop-add-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}

.shop-add-btn {
  padding: 0 16px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ghost-btn:hover {
  background: var(--surface2);
  color: var(--text);
}


/* ── VIEW COMPONENT: HISTORICAL WASTE TRACKER ── */
.waste-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .waste-stat-grid { grid-template-columns: 1fr; }
}

.waste-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.waste-stat-card h3 {
  font-size: 12px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.waste-stat-card .num {
  font-size: 32px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.waste-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.waste-emoji { font-size: 20px; }
.waste-name { flex: 1; font-size: 14px; font-weight: 500; }
.waste-item-date { font-size: 12px; color: var(--text3); }


/* ── RECURSIVE DISCOVER TAB ARCHITECTURE ── */
.discover-hero-banner {
  background: linear-gradient(135deg, #f6f9fc 0%, #eef2f7 100%);
  border: 1px dashed #cbd5e1;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
@media (prefers-color-scheme: dark) {
  .discover-hero-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
  }
}

.discover-hero-banner h3 {
  margin: 0 0 4px 0;
  color: var(--text);
  font-size: 1.15rem;
}

.discover-hero-banner p {
  margin: 0;
  color: var(--text2);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* AI Generated Recipes Markup Styling Mapping */
.ai-generated-html h3 {
  font-size: 1.15rem;
  margin: 20px 0 10px 0;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-generated-html h3:first-of-type { margin-top: 0; }

.ai-generated-html ul, .ai-generated-html ol {
  margin: 10px 0 16px 20px;
  padding: 0;
}

.ai-generated-html li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text);
}


/* ── GLOBAL MODALS & SETTINGS PANELS OVERLAYS ── */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
@media (prefers-color-scheme: dark) {
  .overlay { background: rgba(0,0,0,0.5); }
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}
.overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { font-size: 16px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text3);
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 1.4rem;
}

/* Inline Dynamic Grid Picker Asset Selector */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-height: 110px;
  overflow-y: auto;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: var(--radius);
  background: var(--bg);
}

.emoji-opt {
  font-size: 22px;
  text-align: center;
  padding: 4px 0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.1s;
}
.emoji-opt:hover { background: var(--surface2); }
.emoji-opt.sel {
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--text);
}


/* Slide-Out Parameters Options Configurations Utility Drawer Panel */
.side-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.overlay.open .side-panel {
  transform: translateX(0);
}

.panel-header {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-header h2 { font-size: 15px; font-weight: 600; }

.panel-body {
  padding: 1.4rem;
  flex: 1;
  overflow-y: auto;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.setting-label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.setting-desc { font-size: 11.5px; color: var(--text2); margin-top: 2px; line-height: 1.3; }

/* Custom Form Parameters Asset Toggles */
.toggle {
  width: 40px; height: 22px;
  border-radius: 20px;
  background: var(--surface3);
  border: none; cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }

.notif-days-input {
  width: 54px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  outline: none;
}

.export-btn {
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
  font-family: var(--font);
}
.export-btn:hover {
  background: var(--surface2);
  color: var(--text);
}


/* ── UNIVERSAL EMPTY STATE STATEMENTS ── */
.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.85;
}

.empty p {
  font-size: 13.5px;
  color: var(--text2);
}

.loading {
  text-align: center;
  padding: 2.5rem;
  color: var(--text2);
  font-size: 13.5px;
  font-style: italic;
}

/* Toast Message Node Styling */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  animation: toastFade 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  10%, 90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* Confetti Particle Layer */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  z-index: 999;
  pointer-events: none;
  animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60vh) rotate(720deg); opacity: 0; }
}

/* 📱 TAB HAMBURGER MENU (Mobile Only) */
@media (max-width: 600px) {
  .nav-hamburger {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--surface);
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    color: var(--text);
  }
  .nav-tab-wrap {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    width: 100%;
    background: var(--surface);
  }
  .nav-tab-wrap.show {
    display: flex;
  }
  .nav-tab {
    width: 100%;
    text-align: left;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .nav-tab.active {
    border-bottom-color: transparent;
    border-left-color: var(--accent);
    background: var(--surface2);
  }
}

@media (min-width: 601px) {
  .nav-hamburger { display: none; }
}

/* ADD TO THE BOTTOM OF YOUR STYLE.CSS */
.receipt-data-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.receipt-data-table-wrapper th {
  text-align: left;
  padding: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-weight: 600;
  border-bottom: 2px solid var(--border2);
}

.receipt-data-table-wrapper td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.receipt-data-table-wrapper tr:last-child td {
  border-bottom: none;
}

.receipt-data-table-wrapper strong {
  color: var(--accent);
  font-size: 1.1rem;
}


/* fix for white box thingy when generate recipe */
.ai-generated-html,
.ai-generated-html * {
  color: var(--text) !important;
  background-color: transparent !important;
}

.ai-generated-html h3 {
  color: var(--accent) !important;
}

.ai-generated-html li {
  color: var(--text) !important;
}
