/* ============================================================
   THE BEER STUDIO — EDITORIAL THEME
   Warm · serif accents · printable on B&W
   ============================================================ */

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

:root {
  /* Surfaces — deep dark slate & obsidian brewhouse feel */
  --bg-base: #121212;             /* Deep rich dark background */
  --bg-surface: #1E1E1E;          /* Dark slate for cards/header */
  --bg-raised: #282828;           /* Slightly lighter gray for active rows/tiles */
  --bg-sunken: #181818;           /* Darker sunken elements */

  /* Ink — crisp whites and warm grays */
  --text-primary: #F3F4F6;        /* Clear primary text */
  --text-secondary: #D1D5DB;      /* Readable description text */
  --text-muted: #9CA3AF;          /* Subdued notes/labels */
  --text-inverse: #121212;        /* Dark text for inside highlighted badges */

  /* Accent — warm copper */
  --copper: #D97706;              /* Amber/Copper primary */
  --copper-hover: #F59E0B;        /* High-contrast amber */
  --copper-light: rgba(217, 119, 6, 0.12); /* Subtle warm highlight */
  --copper-ring: rgba(217, 119, 6, 0.25);

  /* Semantic — forest green + crimson */
  --green: #10B981;               /* Vibrant emerald */
  --green-light: rgba(16, 185, 129, 0.1);
  --red: #EF4444;                 /* Vibrant red */
  --red-light: rgba(239, 68, 68, 0.1);
  --amber: #F59E0B;
  --amber-light: rgba(245, 158, 11, 0.1);

  /* Lines & focus */
  --border: #2D2D2D;              /* Sleek dark borders */
  --border-strong: #3F3F46;       /* Higher contrast borders */
  --ring: rgba(217, 119, 6, 0.35);

  /* Geometry — slightly softer rounded modern corners */
  --radius: 8px;                  /* Rounded card corners */
  --radius-sm: 6px;               /* Button/Badge corners */
  --radius-pill: 100px;           /* Full pills */

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}


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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }


body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--text-primary);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 40px; width: auto; border-radius: 2px; }
.brand-mark { font-size: 24px; }
.brand h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-transform: none;
}
.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 3px;
  font-family: var(--font-sans);
}

.tabs { display: flex; gap: 2px; }
.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.tab:hover { color: var(--text-primary); background: var(--bg-raised); }
.tab.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  font-weight: 600;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.app-main { max-width: 1120px; margin: 0 auto; padding: 36px 28px 120px; }
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeInAppScreen 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Buttery-smooth fade and slide! */
}

/* The magic fade-and-slide keyframe animation */
@keyframes fadeInAppScreen {
  from {
    opacity: 0;
    transform: translateY(6px); /* Softly slide up from the bottom */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-head h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1.1;
}

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

/* ============================================================
   KPI BAR
   ============================================================ */
.kpi-bar {
  position: sticky;
  top: 72px;
  z-index: 95;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.kpi-items { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.kpi-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; white-space: nowrap; }
.kpi-icon { font-size: 12px; opacity: 0.7; }
.kpi-label {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.kpi-sub { font-size: 10px; font-weight: 500; color: var(--text-muted); font-family: var(--font-mono); margin-left: 6px; }
.kpi-period {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
}
.kpi-saved-wrap { margin-left: auto; }
.kpi-saved {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.kpi-saved.stale { color: var(--amber); font-weight: 600; }
.kpi-saved.very-stale { color: var(--red); font-weight: 600; }

/* ============================================================
   LIVE STATE BAR
   ============================================================ */
.live-state-bar {
  position: sticky;
  top: 116px;
  z-index: 94;
  background-color: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 8px 28px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.live-zone { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.live-zone-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 2px;
}
.live-zone-bottles { flex: 0 0 auto; }
.live-zone-kegs { flex: 0 0 auto; justify-content: center; }
.live-zone-fermenters { flex: 1; min-width: 0; }
.live-divider { width: 1px; background: var(--border-strong); flex-shrink: 0; margin: 4px 0; }
.live-kegs-line {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  height: 100%;
  padding: 0 4px;
  font-family: var(--font-mono);
}

.selling-tiles { display: flex; gap: 8px; flex-wrap: nowrap; align-items: stretch; }
.selling-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: border-color 0.12s ease, background-color 0.12s ease;
  min-width: 0;
  flex-shrink: 0;
}
button.selling-tile:hover { border-color: var(--text-primary); }
.selling-tile.is-current { border-color: var(--copper); background: var(--copper-light); }
.selling-tile.is-empty { border-color: var(--red); background: var(--red-light); cursor: pointer; }
.selling-tile-icon { font-size: 14px; flex-shrink: 0; opacity: 0.75; }
.selling-tile-body { flex: 1; min-width: 0; }
.selling-tile-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.selling-tile-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selling-tile.is-current .selling-tile-value { color: var(--copper-hover); }
.selling-tile.is-empty .selling-tile-value { color: var(--red); }
.selling-tile-empty-hint { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.fermenter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  min-height: 32px;
  align-items: center;
  scrollbar-width: thin;
}
.fermenter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}
.fermenter-chip.empty { color: var(--text-muted); }
.fermenter-chip.occupied { border-color: var(--copper); background: var(--copper-light); }
.fermenter-chip-name {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.fermenter-chip-batch { color: var(--text-secondary); font-weight: 500; }
.fermenter-chip.empty .fermenter-chip-batch { color: var(--text-muted); font-style: italic; }
.fermenter-chip-day {
  font-size: 9px;
  font-weight: 600;
  color: var(--copper-hover);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: -0.01em;
}

/* ============================================================
   TARGET TRACKERS
   ============================================================ */
.target-card { padding: 24px; border-top: 2px solid var(--text-primary); }
.target-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.target-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: none;
}
.target-head span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.target-row { margin-bottom: 16px; }
.target-row:last-child { margin-bottom: 0; }
.target-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  gap: 12px;
  flex-wrap: wrap;
}
.target-labels strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
}
.target-bar-bg {
  height: 12px;
  background-color: var(--bg-sunken);
  border-radius: var(--radius-pill);
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--border-strong);
  position: relative;
}
.target-bar-fill {
  height: 100%;
  transition: width 0.4s ease-out;
  min-width: 2px;
  background: var(--copper);
}
.target-bar-fill.amber { background-color: var(--copper); }
.target-bar-fill.green { background-color: var(--green); }
.overhead-bar { height: 14px; }
.pace-line {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.pace-line.ahead   { color: var(--green); }
.pace-line.behind  { color: var(--copper); }
.pace-line.met     { color: var(--green); }
.pace-line.not-started { color: var(--text-muted); }
.overhead-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

.bottle-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bottle-delta.up      { color: var(--green); background: var(--green-light); border-color: #A7D4B5; }
.bottle-delta.down    { color: var(--red);   background: var(--red-light);   border-color: #E5B5B5; }
.bottle-delta.flat    { color: var(--text-muted); background: var(--bg-sunken); border-color: var(--border); }
.bottle-delta.first   { color: var(--copper-hover); background: var(--copper-light); border-color: var(--copper); }
.bottle-delta.nodata  { color: var(--text-muted); background: var(--bg-sunken); border-color: var(--border); }

/* ============================================================
   FLOW / P&L BARS
   ============================================================ */
.flow-card { padding: 24px; }
.flow-stack { margin-bottom: 16px; }
.flow-bar-bg {
  display: flex;
  width: 100%;
  height: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.flow-seg {
  height: 100%;
  transition: flex-basis 0.4s ease-out;
  flex-basis: 0;
  flex-grow: 0;
  flex-shrink: 0;
}
.flow-cogs   { background: #6B5E4D; }
.flow-exp    { background: var(--red); }
.flow-oh     { background: var(--copper); }
.flow-profit { background: var(--green); }
.flow-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.flow-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  margin-right: 6px;
  vertical-align: middle;
}
.dot-cogs   { background: #6B5E4D; }
.dot-exp    { background: var(--red); }
.dot-oh     { background: var(--copper); }
.dot-profit { background: var(--green); }

.flow-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.flow-table td {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.flow-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.flow-table tr.neg td:last-child { color: var(--red); }
.flow-table tr.subtotal td {
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--text-primary);
}
.flow-table tr.total td {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: none;
  font-size: 12px;
}
.flow-table tr.total td:last-child { font-size: 18px; }
.flow-table tr.warn td { color: var(--red); font-weight: 600; }
.flow-table tr.warn td:last-child { color: var(--red); }
.flow-table tr.muted-row td {
  color: var(--text-muted);
  font-size: 12px;
  border-bottom: none;
  padding-top: 10px;
}
.flow-table tr.muted-row td:last-child { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }
.flow-table.cash-collapsed tr.cash-detail-row { display: none; }
#btn-toggle-cash-details.active { color: var(--copper-hover); font-weight: 600; }

.shortfall-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  background: var(--red-light);
  color: var(--red);
  border: 1px solid #E5B5B5;
  vertical-align: middle;
}

.cash-warning { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; line-height: 1.55; }
.cash-warning.warn {
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
  color: var(--copper-hover);
}
.cash-warning.danger {
  background: var(--red-light);
  border-left: 3px solid var(--red);
  color: var(--red);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input, select, textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-ring);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--bg-sunken);
  color: var(--text-muted);
  cursor: not-allowed;
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  text-transform: none;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.checkbox-label input { width: auto; accent-color: var(--copper); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
  gap: 6px;
}
.btn:hover { background: var(--bg-raised); border-color: var(--text-primary); }
.btn-primary {
  background: var(--copper);
  color: var(--text-inverse);
  border-color: var(--copper);
  font-weight: 600;
}
.btn-primary:hover { background: var(--copper-hover); border-color: var(--copper-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-raised); color: var(--text-primary); }
.btn-small { padding: 5px 11px; font-size: 12px; }
.btn-danger { color: var(--red); border-color: #E5B5B5; background: var(--bg-surface); }
.btn-danger:hover { background: var(--red-light); border-color: var(--red); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.file-btn { position: relative; cursor: pointer; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   TOTALS CARD
   ============================================================ */
.totals-card { max-width: 560px; margin-left: auto; }
.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.totals-row:last-child { border-bottom: none; }
.totals-row span:last-child {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.totals-row.highlight-amber span { color: var(--copper-hover); }
.totals-row.divider { border-bottom: 1px solid var(--text-primary); margin: 8px 0; padding: 0; }
.totals-row.total-line {
  border-top: none;
  border-bottom: none;
  margin-top: 6px;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.totals-row.total-line span:last-child {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}
.totals-row.muted { color: var(--text-muted); font-size: 12px; border-bottom: none; }
.totals-row.muted span:last-child { font-size: 12px; color: var(--text-muted); }
.text-green { color: var(--green) !important; }

/* ============================================================
   LISTS
   ============================================================ */
.list { display: flex; flex-direction: column; gap: 10px; }
.list .empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-display);
  font-style: italic;
}
.list-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.list-row:hover { border-color: var(--text-primary); background: var(--bg-raised); }
.list-row .info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.list-row .info span { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.list-row .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Continue in Message 2 */
/* ============================================================
   TABLES
   ============================================================ */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--text-primary);
  padding: 10px 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.items-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.items-table tbody tr:last-child td { border-bottom: none; }
.items-table tbody tr { transition: background-color 0.1s ease; }
.items-table tbody tr:hover td { background: var(--bg-raised); }
.items-table input { padding: 6px 8px; font-size: 13px; }

/* ============================================================
   BADGES — colors on screen; shapes survive print
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.draft { background: var(--bg-sunken); color: var(--text-secondary); border-color: var(--border-strong); border-style: dashed; }
.badge.sent { background: var(--amber-light); color: #78350F; border-style: solid; }
.badge.paid { background: var(--text-primary); color: var(--text-inverse); border-style: solid; }
.badge.source-operating { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }
.badge.source-cogs { background: var(--copper-light); color: var(--copper-hover); border: 1px solid var(--copper); }

/* ============================================================
   ITEM CARDS (Invoice Editor)
   ============================================================ */
.item-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.item-card-grid {
  display: grid;
  grid-template-columns: 2fr 100px 140px 120px 36px;
  gap: 12px;
  align-items: end;
}
.item-card-grid .line-total {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  padding-bottom: 8px;
  color: var(--text-primary);
}
.mix-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mix-warn { margin-top: 10px; font-size: 12px; color: var(--red); font-weight: 600; }
.style-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.custom-desc-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ============================================================
   PRINT PREVIEW PAPER (screen)
   ============================================================ */
.print-toolbar { display: flex; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.print-paper {
  background: #FFFFFF;
  padding: 56px;
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.inv-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--text-primary);
  padding-bottom: 22px;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
}
.inv-header .biz-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.inv-header .biz-meta { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.65; }
.inv-header .inv-title { text-align: right; }
.inv-header .inv-title h2 {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.inv-header .inv-title p { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

/* PAID stamp box — used on paid invoices/receipts */
.paid-stamp {
  position: absolute;
  top: 12px;
  right: 0;
  display: inline-block;
  padding: 6px 14px;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  transform: rotate(-6deg);
  text-transform: uppercase;
  opacity: 0.85;
}

.inv-meta-grid { display: flex; justify-content: space-between; margin-bottom: 30px; gap: 24px; flex-wrap: wrap; }
.inv-meta-grid h4 {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.inv-meta-grid p { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.inv-meta-grid strong { color: var(--text-primary); font-weight: 600; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.inv-table th {
  text-align: left;
  border-bottom: 1px solid var(--text-primary);
  padding: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.inv-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}
.inv-table .r { text-align: right; font-family: var(--font-mono); }
.inv-totals { max-width: 320px; margin-left: auto; }
.inv-totals .row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.inv-totals .row span:last-child { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.inv-totals .row.big {
  border-top: 2px solid var(--text-primary);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}
.inv-totals .row.big span:last-child { color: var(--text-primary); font-size: 20px; }
.inv-totals .row.alt { font-size: 12px; color: var(--text-muted); }
.inv-notes {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.inv-notes strong { color: var(--text-primary); font-weight: 600; }

/* Signature line — receipts + invoices */
.inv-signature {
  margin-top: 60px;
  display: flex;
  justify-content: flex-end;
}
.inv-signature-line {
  width: 260px;
  border-top: 1px solid var(--text-primary);
  padding-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
}

/* ============================================================
   TOASTS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}
.toast {
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  border-left: 3px solid var(--copper);
  max-width: 380px;
}
.toast-error { border-left-color: var(--red); }
.toast-hide { opacity: 0; transition: opacity 0.3s; }

/* ============================================================
   UTILITY
   ============================================================ */
.muted { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.danger-zone { border: 1px solid #E5B5B5; background: var(--red-light); }
.danger-zone h3 { color: var(--red); }

/* ============================================================
   SUB-TABS
   ============================================================ */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.sub-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: -1px;
}
.sub-tab:hover { color: var(--text-primary); }
.sub-tab.active { color: var(--text-primary); border-bottom-color: var(--copper); }
.inv-panel { display: none; }
.inv-panel.active { display: block; }
.brew-panel { display: none; }
.brew-panel.active { display: block; }

/* ============================================================
   RAW MATERIAL CATEGORY BADGES
   ============================================================ */
.badge.cat-malt       { background: #FEF3C7; color: #78350F; }
.badge.cat-hop        { background: var(--green-light); color: #14532D; }
.badge.cat-yeast      { background: #DBEAFE; color: #1E3A8A; }
.badge.cat-packaging  { background: #EDE9FE; color: #4C1D95; }
.badge.cat-other      { background: var(--bg-sunken); color: var(--text-secondary); border-color: var(--border); }

/* ============================================================
   STICKY SETTINGS HEAD
   ============================================================ */
.screen-head.sticky-head {
  position: sticky;
  top: 72px;
  z-index: 90;
  background-color: var(--bg-base);
  padding: 12px 0;
  margin-top: 0;
  transition: box-shadow 0.15s ease;
}
.screen-head.sticky-head.scrolled { box-shadow: 0 1px 0 var(--text-primary); }

/* ============================================================
   FERMENTERS SUB-TAB
   ============================================================ */
.fermenters-list { display: flex; flex-direction: column; gap: 10px; }
.fermenters-list .empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-display);
  font-style: italic;
}
.fermenter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-left: 3px solid var(--border-strong);
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.fermenter-card:hover { border-color: var(--text-primary); background: var(--bg-raised); }
.fermenter-card.occupied { border-left-color: var(--copper); }
.fermenter-card-info { flex: 1; min-width: 200px; }
.fermenter-card-name {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.fermenter-card-status { font-size: 12px; color: var(--text-secondary); font-weight: 500; line-height: 1.6; }
.fermenter-card-status strong { color: var(--text-primary); font-weight: 600; }
.fermenter-card-status .fermenter-empty { color: var(--text-muted); font-style: italic; }
.fermenter-card-status .fermenter-day { color: var(--copper-hover); font-weight: 600; font-family: var(--font-mono); }
.fermenter-card-status .fermenter-last { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.fermenter-card-status .fermenter-freed { display: block; margin-top: 2px; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.fermenter-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.batch-fermenter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}
.batch-fermenter-chip.active { background: var(--copper-light); border-color: var(--copper); color: var(--copper-hover); }
.batch-fermenter-chip.historical { background: var(--bg-raised); color: var(--text-muted); }
.batch-fermenter-chip.missing { background: var(--red-light); border-color: #E5B5B5; color: var(--red); }

.recipe-card.recipe-card-flash { animation: recipe-flash 2s ease-out; }
@keyframes recipe-flash {
  0%   { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.5); border-color: var(--copper); }
  30%  { box-shadow: 0 0 0 6px rgba(180, 83, 9, 0.15); border-color: var(--copper); }
  100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0); border-color: var(--border); }
}
.recipe-link {
  color: var(--copper-hover);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed var(--copper);
  transition: color 0.12s ease;
}
.recipe-link:hover { color: var(--text-primary); border-bottom-style: solid; }

/* ============================================================
   BATCH SALES HISTORY MODAL
   ============================================================ */
.batch-sales-summary {
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.batch-sales-summary strong { color: var(--text-primary); font-weight: 700; }
.batch-sales-row {
  display: grid;
  grid-template-columns: 110px 70px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.batch-sales-row:last-child { border-bottom: none; }
.batch-sales-row .bsr-date { color: var(--text-muted); font-size: 11px; font-weight: 500; font-family: var(--font-mono); }
.batch-sales-row .bsr-qty { font-family: var(--font-mono); font-weight: 700; text-align: right; color: var(--text-primary); }
.batch-sales-row .bsr-qty.positive { color: var(--red); }
.batch-sales-row .bsr-qty.negative { color: var(--green); }
.batch-sales-row .bsr-source { color: var(--text-secondary); font-weight: 500; }
.batch-sales-row .bsr-source.link { color: var(--copper-hover); cursor: pointer; border-bottom: 1px dotted var(--copper); }
.batch-sales-row .bsr-source.link:hover { color: var(--text-primary); }
.batch-sales-row .bsr-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.batch-sales-row .bsr-type.sale { background: var(--copper-light); color: var(--copper-hover); }
.batch-sales-row .bsr-type.adjustment { background: var(--bg-sunken); color: var(--text-muted); border: 1px dashed var(--border-strong); }
.batch-sales-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* ============================================================
   IMPORT SUMMARY MODAL
   ============================================================ */
.import-summary-header {
  background: var(--bg-raised);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  font-family: var(--font-mono);
}
.import-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.import-summary-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px;
  border-bottom: 1px solid var(--text-primary);
  letter-spacing: 0.08em;
}
.import-summary-table th.r { text-align: right; }
.import-summary-table td { padding: 8px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 500; }
.import-summary-table td.r { text-align: right; font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--text-primary); }
.import-summary-warning {
  background: var(--red-light);
  border-left: 3px solid var(--red);
  color: var(--red);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  margin-top: 8px;
}

/* ============================================================
   SNAPSHOT MODAL
   ============================================================ */
.snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--bg-raised);
  flex-wrap: wrap;
}
.snapshot-row-meta { flex: 1; min-width: 180px; font-size: 12px; color: var(--text-secondary); }
.snapshot-row-meta strong { font-size: 13px; color: var(--text-primary); font-weight: 600; display: block; margin-bottom: 2px; font-family: var(--font-mono); }
.snapshot-row-meta .snapshot-counts { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.snapshot-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* ============================================================
   EVENT CORRECTIONS
   ============================================================ */
.event-corrections-section { margin-top: 16px; }
.event-corrections-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.event-corrections-title {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-primary);
}
.correction-row {
  display: grid;
  grid-template-columns: 90px 80px 100px 1fr 36px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.correction-row:last-child { border-bottom: none; }
.correction-row .cr-date { color: var(--text-muted); font-size: 11px; font-weight: 500; font-family: var(--font-mono); }
.correction-row .cr-direction {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-align: center;
}
.correction-row .cr-direction.income { background: var(--green-light); color: var(--green); }
.correction-row .cr-direction.expense { background: var(--red-light); color: var(--red); }
.correction-row .cr-amount { font-family: var(--font-mono); font-weight: 600; text-align: right; color: var(--text-primary); }
.correction-row .cr-reason { color: var(--text-secondary); }
.correction-row .cr-del { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.correction-row .cr-del:hover { color: var(--red); }
.correction-form {
  display: grid;
  grid-template-columns: 130px 100px 130px 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 12px 10px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
.correction-form label { margin: 0; font-size: 10px; }
.correction-form input, .correction-form select { padding: 6px 8px; font-size: 12px; }
.correction-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 11px; font-style: italic; }

/* ============================================================
   BATCH PICKER MODAL
   ============================================================ */
.batch-picker-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; scrollbar-width: thin; }
.batch-picker-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: border-color 0.12s ease, background-color 0.12s ease;
  width: 100%;
}
.batch-picker-option:hover { border-color: var(--text-primary); background: var(--bg-sunken); }
.batch-picker-option.current { border-color: var(--copper); background: var(--copper-light); }
.batch-picker-option-left { flex: 1; min-width: 0; }
.batch-picker-option-name { font-weight: 600; color: var(--text-primary); font-size: 13px; margin-bottom: 2px; }
.batch-picker-option-meta { font-size: 11px; color: var(--text-secondary); }
.batch-picker-option-right {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--copper-hover);
  font-size: 16px;
  white-space: nowrap;
}
.batch-picker-option-right .bp-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.batch-picker-empty { padding: 24px 20px; text-align: center; color: var(--text-muted); font-size: 12px; font-style: italic; }

/* ============================================================
   DELETE BATCH MODAL
   ============================================================ */
.delete-batch-section { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.delete-batch-section:last-child { border-bottom: none; padding-bottom: 0; }
.delete-batch-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.delete-batch-section-body { font-size: 12px; color: var(--text-primary); line-height: 1.65; }
.delete-batch-section-body strong { color: var(--text-primary); font-weight: 600; }
.delete-batch-warning {
  background: var(--red-light);
  border-left: 3px solid var(--red);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 14px;
}

/* ============================================================
   CUSTOMER STATS MODAL
   ============================================================ */
.cust-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.cust-stat {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cust-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.cust-stat-value { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--text-primary); }
.cust-stats-section { margin-top: 22px; }
.cust-stats-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.cust-bars { display: flex; flex-direction: column; gap: 6px; }
.cust-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.cust-bar-row.cust-bar-total { background: var(--copper-light); font-weight: 700; color: var(--copper-hover); }
.cust-bar-label { color: var(--text-secondary); font-weight: 500; }
.cust-bar-value { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-primary); }

/* ============================================================
   EVENTS MODULE
   ============================================================ */
.events-dashboard-list { display: flex; flex-direction: column; gap: 8px; }
.event-dashboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.12s ease;
  gap: 12px;
  flex-wrap: wrap;
}
.event-dashboard-row:hover { border-color: var(--text-primary); }
.event-dashboard-row .ev-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.event-dashboard-row .ev-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.event-dashboard-row .ev-dates { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.event-dashboard-row .ev-net { font-family: var(--font-mono); font-size: 18px; font-weight: 700; }
.event-dashboard-row .ev-net.profit { color: var(--green); }
.event-dashboard-row .ev-net.loss   { color: var(--red); }

.event-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color 0.12s ease;
}
.event-row:hover { border-color: var(--text-primary); }
.event-row .ev-info { flex: 1; min-width: 200px; }
.event-row .ev-info strong { font-size: 15px; color: var(--text-primary); display: block; font-weight: 600; }
.event-row .ev-info span { font-size: 12px; color: var(--text-secondary); }
.event-row .ev-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.event-status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.event-status-badge.draft  { background: var(--bg-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); }
.event-status-badge.active { background: var(--amber-light); color: #78350F; border-color: var(--copper); }
.event-status-badge.ended  { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }

.event-product-row, .event-expense-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 36px;
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.event-expense-row { grid-template-columns: 2fr 140px 140px 36px; }
.event-product-row:last-child, .event-expense-row:last-child { border-bottom: none; }

.event-mode-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.event-product-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
  font-family: var(--font-sans);
}
.event-product-btn:hover { border-color: var(--copper); background: var(--copper-light); }
.event-product-btn .ep-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.event-product-btn .ep-price { font-size: 14px; font-weight: 700; color: var(--copper-hover); font-family: var(--font-mono); }
.event-product-btn .ep-stock { font-size: 10px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }
.event-product-btn.out-of-stock { opacity: 0.4; cursor: not-allowed; }

.event-cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.event-cart-line:last-child { border-bottom: none; }
.event-cart-line .ecl-name { font-weight: 500; color: var(--text-primary); font-size: 13px; }
.event-cart-line .ecl-qty { font-family: var(--font-mono); font-weight: 700; color: var(--copper-hover); font-size: 14px; }
.event-cart-line .ecl-total { font-family: var(--font-mono); font-weight: 600; min-width: 80px; text-align: right; color: var(--text-primary); }
.event-cart-line .ecl-remove { background: transparent; border: none; color: var(--red); cursor: pointer; font-size: 14px; padding: 4px 8px; }
.event-sale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 12px;
}
.event-sale-row .esr-time { color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); }
.event-sale-row .esr-total { font-family: var(--font-mono); font-weight: 600; color: var(--green); }

.event-details-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.event-details-table th, .event-details-table td {
  padding: 9px 10px;
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.event-details-table th {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.event-details-table td.r { text-align: right; font-family: var(--font-mono); }
.event-details-summary {
  background: var(--bg-raised);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  flex-wrap: wrap;
  gap: 12px;
}
.event-details-summary .eds-label { font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.06em; }
.event-details-summary .eds-value { font-family: var(--font-mono); font-size: 18px; font-weight: 700; }
.event-details-summary .eds-value.profit { color: var(--green); }
.event-details-summary .eds-value.loss   { color: var(--red); }

#kpi-event-pill {
  animation: pulse-copper 2s infinite;
  background: var(--copper);
  border-color: var(--copper);
  color: var(--text-inverse);
}
@keyframes pulse-copper {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(180, 83, 9, 0); }
}

/* ============================================================
   CASH / NEO SPLIT — misc
   ============================================================ */
#cash-collected-breakdown-row td,
#cash-opex-breakdown-row td,
#cash-cogs-exp-breakdown-row td { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
#btn-transfer { font-size: 12px; }

/* ============================================================
   BREWING ASSISTANT
   ============================================================ */
.batches-list { display: flex; flex-direction: column; gap: 14px; }
.batches-list .empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-display);
  font-style: italic;
}
.batch-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  border-left: 3px solid var(--copper);
  transition: border-color 0.12s ease;
}
.batch-card:hover { border-color: var(--text-primary); border-left-color: var(--copper-hover); }
.batch-card.status-packaged  { border-left-color: var(--green); }
.batch-card.status-archived  { border-left-color: var(--border-strong); opacity: 0.85; }
.batch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.batch-head-left { flex: 1; min-width: 200px; }
.batch-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.batch-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
}
.batch-meta span { display: inline-flex; align-items: center; gap: 4px; }
.batch-meta .sep { color: var(--border-strong); }
.batch-status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.batch-status-pill.fermenting { background: var(--amber-light); color: #78350F; border-color: var(--copper); }
.batch-status-pill.conditioned { background: #DBEAFE; color: #1E3A8A; border-color: #93C5FD; }
.batch-status-pill.packaged { background: var(--green-light); color: var(--green); border-color: #A7D4B5; }
.batch-status-pill.archived { background: var(--bg-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); }
.batch-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.batch-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.batch-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.batch-bom-list { font-size: 12px; color: var(--text-secondary); }
.batch-bom-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.batch-bom-line:last-child { border-bottom: none; }
.batch-bom-line .bom-stage {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.readings-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.reading-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.reading-row .rd-date { color: var(--text-muted); font-size: 11px; font-weight: 500; font-family: var(--font-mono); }
.reading-row .rd-values { color: var(--text-primary); font-weight: 500; font-family: var(--font-mono); }
.reading-row .rd-notes { color: var(--text-secondary); font-weight: 400; font-style: italic; }
.reading-row .rd-del { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.reading-row .rd-del:hover { color: var(--red); }

.packaging-sessions-list { display: flex; flex-direction: column; gap: 6px; }
.packaging-session-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.packaging-session-row .ps-date { color: var(--text-muted); font-size: 11px; font-weight: 500; font-family: var(--font-mono); }
.packaging-session-row .ps-kegs { color: var(--text-primary); font-weight: 500; font-family: var(--font-mono); }
.packaging-session-row .ps-bottles { color: var(--text-primary); font-weight: 500; font-family: var(--font-mono); }
.packaging-session-row .ps-ready { color: var(--copper-hover); font-weight: 600; font-size: 11px; font-family: var(--font-mono); }
.packaging-session-row .ps-ready.keg-ready { color: var(--green); }
.packaging-session-row .ps-materials { grid-column: 1 / -1; font-size: 10px; color: var(--text-muted); padding-left: 4px; font-family: var(--font-mono); }
.packaging-session-row .ps-del { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.packaging-session-row .ps-del:hover { color: var(--red); }

.recipes-list { display: flex; flex-direction: column; gap: 10px; }
.recipes-list .empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-display);
  font-style: italic;
}
.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color 0.12s ease;
}
.recipe-card:hover { border-color: var(--text-primary); }
.recipe-card .recipe-info { flex: 1; min-width: 240px; }
.recipe-card .recipe-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.recipe-card .recipe-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); }
.recipe-card .recipe-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.recipe-style-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--copper-light);
  color: var(--copper-hover);
  border: 1px solid var(--copper);
  font-family: var(--font-sans);
}
.recipe-ingredient-row {
  display: grid;
  grid-template-columns: 2fr 100px 80px 120px 100px 36px;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.recipe-ingredient-row:last-child { border-bottom: none; }
.recipe-ingredient-row .ri-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  padding: 9px;
  height: 38px;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}
.recipe-ingredient-row .ri-cost { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-secondary); padding-bottom: 10px; text-align: right; }
.recipe-ingredient-row .ri-remove {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--red);
  cursor: pointer;
  height: 38px;
  width: 38px;
  padding: 0;
  font-size: 14px;
}
.recipe-ingredient-row .ri-remove:hover { background: var(--red-light); border-color: var(--red); }
.brew-bom-line {
  display: grid;
  grid-template-columns: 2fr 100px 80px 100px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.brew-bom-line:last-child { border-bottom: none; }
.brew-bom-line .bom-name { font-weight: 500; color: var(--text-primary); }
.brew-bom-line .bom-qty { text-align: right; font-family: var(--font-mono); font-weight: 600; }
.brew-bom-line .bom-stock { text-align: right; color: var(--text-secondary); font-family: var(--font-mono); }
.brew-bom-line.short { background: var(--red-light); }
.brew-bom-line.short .bom-stock { color: var(--red); font-weight: 600; }
.batch-empty-msg { padding: 16px; text-align: center; color: var(--text-muted); font-size: 12px; font-style: italic; }
#transfers-card { margin-top: 0; }
#transfers-card .items-table td { font-size: 12px; }

/* ============================================================
   BOTTLE CONDITIONING TRACKER
   ============================================================ */
.conditioning-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.conditioning-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-top: 2px solid var(--copper);
  padding: 20px 22px;
}
.conditioning-summary-card.ready { border-top-color: var(--green); }
.conditioning-summary-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.conditioning-summary-value { font-family: var(--font-mono); font-size: 36px; font-weight: 700; line-height: 1; color: var(--text-primary); }
.conditioning-summary-card.ready .conditioning-summary-value { color: var(--green); }
.conditioning-summary-sub { font-size: 12px; color: var(--text-secondary); margin-top: 8px; font-weight: 500; }
.conditioning-groups { display: flex; flex-direction: column; gap: 10px; }
.conditioning-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  border-left: 3px solid var(--copper);
}
.conditioning-group.ready-today { border-left-color: var(--green); background: #F4FAF6; }
.conditioning-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.conditioning-group-date {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.conditioning-group-count { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--copper-hover); }
.conditioning-group.ready-today .conditioning-group-count { color: var(--green); }
.conditioning-group-count span {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-left: 4px;
  letter-spacing: 0.04em;
}
.conditioning-group-batches { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.conditioning-batch-line { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; gap: 12px; }
.conditioning-batch-line .cb-name { color: var(--text-primary); font-weight: 500; }
.conditioning-batch-line .cb-style { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 500; margin-left: 6px; }
.conditioning-batch-line .cb-qty { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.conditioning-empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-display);
  font-style: italic;
}

.packaging-material-row {
  display: grid;
  grid-template-columns: 2fr 100px 80px 36px;
  gap: 10px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.packaging-material-row:last-child { border-bottom: none; }
.packaging-material-row .pm-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  padding: 9px;
  font-family: var(--font-mono);
}
.packaging-material-row .pm-remove {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--red);
  cursor: pointer;
  height: 38px;
  width: 38px;
  padding: 0;
  font-size: 14px;
}
.packaging-material-row .pm-remove:hover { background: var(--red-light); border-color: var(--red); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .app-header { flex-direction: column; height: auto; padding: 14px 16px; align-items: flex-start; gap: 12px; }
  .tabs { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .tab { padding: 6px 10px; font-size: 12px; }
  .list-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .item-card-grid { grid-template-columns: 1fr 1fr; }
  .print-paper { padding: 24px; }
  .kpi-bar { top: 0; padding: 8px 16px; }
  .kpi-items { gap: 14px; }
  .kpi-label { display: none; }
  .kpi-saved-wrap { margin-left: 0; }
  .live-state-bar { top: 0; padding: 6px 16px; gap: 8px; }
  .live-zone-label { display: none; }
  .selling-tile-label { display: none; }
  .selling-tile-value { font-size: 11px; }
  .selling-tile { padding: 4px 8px; }
  .selling-tile-icon { font-size: 12px; }
  .fermenter-chip { font-size: 10px; padding: 3px 8px; }
  .recipe-ingredient-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }
  .recipe-ingredient-row .ri-remove { justify-self: end; width: 100%; height: 34px; }
  .reading-row { grid-template-columns: 1fr; gap: 4px; }
  .packaging-session-row { grid-template-columns: 1fr; gap: 4px; }
  .brew-bom-line { grid-template-columns: 1fr 1fr; }
  .batch-head { flex-direction: column; }
  .conditioning-summary { grid-template-columns: 1fr; }
  .conditioning-summary-value { font-size: 28px; }
  .packaging-material-row { grid-template-columns: 1fr; gap: 6px; }
  .packaging-material-row .pm-remove { justify-self: end; width: 100%; height: 34px; }
  .cust-stats-grid { grid-template-columns: 1fr 1fr; }
  .event-mode-products { grid-template-columns: repeat(2, 1fr); }
  .event-product-row, .event-expense-row { grid-template-columns: 1fr; gap: 8px; }
  .event-product-row button, .event-expense-row button { justify-self: flex-end; }
  #event-mode-overlay > div { padding: 12px 12px 100px; }
  .screen-head.sticky-head { top: 0; }
  #toast-container { left: 12px; right: 12px; bottom: 12px; }
  .toast { width: 100%; font-size: 12px; padding: 10px 14px; }
  .paid-stamp { position: static; display: inline-block; margin-top: 12px; transform: none; }
}

@media (max-width: 480px) {
  .app-main { padding: 20px 16px 100px; }
  .card { padding: 16px; }
  .screen-head h2 { font-size: 24px; }
  .totals-card { max-width: 100%; }
  .inv-totals { max-width: 100%; }
  .inv-signature { margin-top: 40px; }
  .inv-signature-line { width: 100%; }
}

/* ============================================================
   PRINT — STRICT MONOCHROME (laser printer)
   Everything becomes black on white, or is hidden.
   No color, no patterns — pure typographic rules only.
   ============================================================ */
@media print {
  /* Reset surfaces */
  html, body { background: #FFFFFF !important; color: #000 !important; }
  body * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; }

  /* Hide app chrome */
  .app-header, .print-toolbar, .tabs, .brand-logo,
  .kpi-bar, .live-state-bar, .screen-head.sticky-head,
  #toast-container, .toast,
  .btn, button, .form-actions,
  .screen:not(#screen-print) { display: none !important; }

  /* Print paper */
  .print-paper {
    border: none !important;
    padding: 20mm !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Header: thick rule */
  .inv-header {
    border-bottom: 2px solid #000 !important;
    padding-bottom: 16px;
    margin-bottom: 24px;
  }
  .inv-header .biz-name { font-size: 22px !important; color: #000 !important; }
  .inv-header .biz-meta { color: #000 !important; }
  .inv-header .inv-title h2 { font-size: 26px !important; color: #000 !important; }
  .inv-header .inv-title p { color: #000 !important; }

  /* PAID stamp — pure black outline box */
  .paid-stamp {
    border: 2px solid #000 !important;
    color: #000 !important;
    background: transparent !important;
    opacity: 1 !important;
    transform: rotate(-6deg) !important;
  }

  /* Meta grid */
  .inv-meta-grid h4 { color: #000 !important; font-weight: 700; }
  .inv-meta-grid p, .inv-meta-grid strong { color: #000 !important; }

  /* Table */
  .inv-table { border-collapse: collapse !important; }
  .inv-table th {
    border-bottom: 1px solid #000 !important;
    color: #000 !important;
    background: transparent !important;
    font-weight: 700;
  }
  .inv-table td {
    border-bottom: 1px solid #999 !important;
    color: #000 !important;
    background: transparent !important;
  }
  .inv-table .r { color: #000 !important; }

  /* Totals */
  .inv-totals .row { color: #000 !important; }
  .inv-totals .row span:last-child { color: #000 !important; }
  .inv-totals .row.big {
    border-top: 2px solid #000 !important;
    color: #000 !important;
    font-weight: 700;
  }
  .inv-totals .row.big span:last-child { color: #000 !important; }
  .inv-totals .row.alt { color: #000 !important; }

  /* Notes */
  .inv-notes { border-top: 1px solid #000 !important; color: #000 !important; }
  .inv-notes strong { color: #000 !important; }

  /* Signature */
  .inv-signature-line {
    border-top: 1px solid #000 !important;
    color: #000 !important;
  }

  /* Any badges that somehow reach print — force outline only */
  .badge,
  .event-status-badge,
  .batch-status-pill,
  .recipe-style-badge,
  .bottle-delta,
  .shortfall-badge,
  .bsr-type,
  .cr-direction {
    background: transparent !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
  }

  /* Text utilities */
  .muted { color: #000 !important; font-weight: 500; }
  .text-green { color: #000 !important; }

  /* Prevent page break inside invoice/receipt header block */
  .inv-header, .inv-meta-grid { page-break-inside: avoid; }
  .inv-table { page-break-inside: auto; }
  .inv-table tr { page-break-inside: avoid; }
} /* <--- THIS CORRECTLY CLOSES THE @MEDIA PRINT BLOCK */

/* ============================================================
   LIGHT THEME OVERRIDES (Your original editorial theme)
   ============================================================ */
body.light-theme {
  --bg-base: #FBF8F1;
  --bg-surface: #FFFFFF;
  --bg-raised: #F5EFE1;
  --bg-sunken: #EFE7D5;

  --text-primary: #1C1410;
  --text-secondary: #4A3B2E;
  --text-muted: #8A7A66;
  --text-inverse: #FBF8F1;

  --copper: #B45309;
  --copper-hover: #92400E;
  --copper-light: #FEF3E2;
  --copper-ring: rgba(180, 83, 9, 0.18);

  --green: #2F6F42;
  --green-light: #E6F4EA;
  --red: #8B1E1E;
  --red-light: #FBE9E9;
  --amber: #B45309;
  --amber-light: #FEF3E2;

  --border: #E6DBC5;
  --border-strong: #CBB999;
  --ring: rgba(180, 83, 9, 0.35);
  
  --radius: 2px;
  --radius-sm: 2px;
  --radius-pill: 2px;
}

/* Ensure the on-screen invoice print preview remains dark-on-white */
.print-paper, .print-paper * {
  color: #121212 !important;
}
/* Sleek theme-matching scrollbars globally */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
/* Smoothly hover and float cards */
.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px); /* Gently lift card up */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); /* Deeper, soft shadow */
}
