/*
 * "Your basket" Design System & Stylesheet
 * Inspiration: Mixborder.com UI/UX
 * Copyright (c) Smissenbroek
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --bg: #fcfbf6;
  --paper: #ffffff;
  --ink: #1a1a18;
  --muted: #78756c;
  --line: #ebe6d8;
  --line2: #f4f0e6;
  --soft: #faf8f1;
  --accent: #2c5530;
  --accent-bg: #e7efe0;
  --accent-border: #9ab8a0;
  --accent-hover: #1e3d22;
  --peak-bg: #e8f5e9;
  --peak-color: #2e7d32;
  --harvest-bg: #f1f8e9;
  --harvest-color: #558b2f;
  --storage-bg: #fff3e0;
  --storage-color: #e65100;
  --gold: #d8a830;
  --gold-bg: #fef9e7;
  --sh-sm: 0 1px 2px rgba(38, 33, 18, 0.05);
  --sh-md: 0 1px 2px rgba(38, 33, 18, 0.04), 0 4px 12px -2px rgba(38, 33, 18, 0.08);
  --sh-lg: 0 12px 32px -8px rgba(22, 32, 22, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── TOP HEADER (Mixborder inspired) ── */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sh-sm);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand-copy {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--sh-sm);
  white-space: nowrap;
}

.btn:hover {
  background: var(--soft);
  border-color: #d0cbbd;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-accent {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 600;
}

.btn-accent:hover {
  background: #d6e5cc;
}

.btn-icon-only {
  padding: 8px;
  border-radius: var(--radius-md);
}

.badge-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

/* ── VIEW MODE TOGGLE SWITCH ── */
.view-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: var(--radius-md);
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  background: var(--paper);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--sh-sm);
}

/* ── MAIN TOOLBAR (Controls Bar) ── */
#controls-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 90;
}

.controls-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 91;
}

.location-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1.2;
  min-width: 320px;
  max-width: 600px;
  position: relative;
  z-index: 92;
}

.location-input-container {
  position: relative;
  flex: 1;
  z-index: 93;
}

.location-input-container input {
  width: 100%;
  padding: 9px 34px 9px 34px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--sh-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.location-input-container input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.12);
}

.location-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 14px;
  pointer-events: none;
}

.location-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.location-clear-btn:hover {
  color: var(--ink);
}

/* Autocomplete Dropdown List */
.location-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px -4px rgba(22, 32, 22, 0.25);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.location-dropdown.open {
  display: block;
}

.location-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line2);
  transition: background 0.12s ease;
  background: var(--paper);
}

.location-item:last-child {
  border-bottom: none;
}

.location-item:hover, .location-item.highlighted {
  background: var(--accent-bg);
}

.location-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.location-item-sub {
  font-size: 11px;
  color: var(--muted);
}

.location-item-zone {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-border);
}

.select-custom {
  position: relative;
  flex: 0 0 auto;
}

.select-custom select {
  width: 100%;
  padding: 9px 36px 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--sh-sm);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.select-custom select:focus {
  border-color: var(--accent-border);
}

.select-custom::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 12px;
}

/* Week Timeline & Slider Control */
.week-slider-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 2;
  min-width: 320px;
  background: var(--paper);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}

.week-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.week-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.week-date-range {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.week-slider-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.week-slider-controls input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--line2);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}

.week-slider-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.week-slider-controls input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.season-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.season-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.season-btn:hover, .season-btn.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

/* Secondary Controls Row (Filter & Search) */
.controls-row-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--sh-sm);
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.chip.active {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  font-weight: 600;
}

.search-box {
  position: relative;
  width: 240px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  outline: none;
  box-shadow: var(--sh-sm);
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  border-color: var(--accent-border);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

/* Summary Banner */
.basket-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--accent-bg);
  border-bottom: 1px solid var(--accent-border);
  font-size: 13px;
  color: var(--accent);
}

.summary-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* ── VIEW CONTENT CONTAINER ── */
#app-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ── VISUAL / EDUCATIVE GRID VIEW ── */
.produce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.produce-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.produce-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: 0 10px 24px -6px rgba(22, 32, 22, 0.12);
}

.card-media {
  height: 168px;
  background: var(--soft);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line2);
}

.card-photo-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--soft);
}

.card-photo-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.table-photo-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.detail-photo-hero {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.produce-card:hover .card-photo-hero img {
  transform: scale(1.06);
}

.card-badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.status-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.peak {
  background: var(--peak-bg);
  color: var(--peak-color);
  border: 1px solid #c8e6c9;
}

.status-badge.harvest {
  background: var(--harvest-bg);
  color: var(--harvest-color);
  border: 1px solid #dbedc8;
}

.status-badge.storage {
  background: var(--storage-bg);
  color: var(--storage-color);
  border: 1px solid #ffe0b2;
}

.carbon-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-group {
  margin-bottom: 8px;
}

.produce-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

.produce-latin {
  font-size: 11.5px;
  font-style: italic;
  color: var(--muted);
}

.card-nutrition {
  font-size: 11.5px;
  color: #5a574f;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Micro 52-Week Harvest Heatmap */
.heatmap-wrap {
  margin-top: auto;
  margin-bottom: 14px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.heatmap-bar {
  display: flex;
  height: 6px;
  gap: 1px;
  background: var(--line2);
  border-radius: 3px;
  overflow: hidden;
}

.heatmap-seg {
  flex: 1;
  background: #e0dcd0;
  transition: background 0.15s ease;
}

.heatmap-seg.active-harvest {
  background: #81c784;
}

.heatmap-seg.active-peak {
  background: var(--accent);
}

.heatmap-seg.active-storage {
  background: #ffb74d;
}

.heatmap-seg.current-week {
  box-shadow: 0 0 0 1px #000;
}

/* Card Actions Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line2);
}

.btn-add-basket {
  flex: 1;
  justify-content: center;
  font-size: 12.5px;
}

.btn-add-basket.added {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-detail {
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ── COMPACT / PRINTABLE TABLE VIEW ── */
.compact-view-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-md);
  overflow: hidden;
}

.printable-header-banner {
  padding: 20px 24px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.printable-title-group h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
}

.printable-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.category-group-header {
  background: var(--accent-bg);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

table.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.compact-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

table.compact-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line2);
  vertical-align: middle;
}

table.compact-table tr:hover {
  background: var(--soft);
}

.table-produce-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-emoji {
  font-size: 22px;
}

.table-name-wrap {
  display: flex;
  flex-direction: column;
}

.table-name {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
}

.table-latin {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}

.table-qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.qty-btn:hover {
  background: var(--line2);
}

.qty-val {
  font-weight: 600;
  width: 20px;
  text-align: center;
}

/* ── MODALS (Produce Detail & Recipes) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 32, 22, 0.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

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

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

.modal-close-btn {
  border: none;
  background: var(--soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
}

.modal-close-btn:hover {
  background: var(--line2);
  color: var(--ink);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-hero-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--soft);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.detail-emoji {
  font-size: 64px;
}

.detail-title-group h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--accent);
}

.detail-latin {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.pairs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pair-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
}

/* ── HOW TO CONTRIBUTE MODAL STYLES ── */
.contribute-intro {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--accent);
  line-height: 1.5;
}

.contribute-steps {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.contribute-steps h4, .contribute-builder h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 8px;
}

.contribute-list {
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

.contribute-list li {
  margin-bottom: 6px;
}

.contribute-builder {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 6px;
}

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

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group input, .form-group select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 8px 12px;
  background: var(--soft);
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
}

.checkbox-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-transform: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.json-code-box {
  background: #1e241e;
  color: #a3e635;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
}

/* ── MY BASKET DRAWER ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: var(--paper);
  z-index: 610;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.open .drawer-panel {
  transform: translateX(0);
}

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

.drawer-header h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--accent);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.basket-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
}

.basket-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basket-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Footer Copyright Notice */
#app-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--paper);
  margin-top: auto;
}

/* ── PRINT MEDIA STYLES (@media print) ── */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  #topbar, #controls-bar, .card-footer, .modal-overlay, .drawer-overlay, .view-toggle-wrap, .search-box, #app-footer, .btn {
    display: none !important;
  }

  #app-content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .compact-view-wrap {
    border: none !important;
    box-shadow: none !important;
  }

  .print-only-header {
    display: block !important;
    padding-bottom: 16px;
    border-bottom: 2px solid #000;
    margin-bottom: 20px;
  }

  .print-only-header h1 {
    font-family: Georgia, serif;
    font-size: 26pt;
  }

  table.compact-table th, table.compact-table td {
    padding: 6px 10px !important;
  }
}

.print-only-header {
  display: none;
}
