﻿/* ═══════════════════════════════════════════════════
   INZOGA BREWERY — DESIGN SYSTEM
   Aesthetic: Industrial Luxury · Forest & Amber
   ═══════════════════════════════════════════════════ */
 
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600&display=swap');
 
:root {
  /* Core Palette */
  --forest:      #0b3d20;
  --forest-mid:  #145a30;
  --green:       #1e7d45;
  --green-light: #2ea85c;
  --green-pale:  #e8f5ed;
  --green-faint: #f2faf5;
 
  --amber:       #b8670a;
  --amber-mid:   #d4800f;
  --amber-light: #f0a32a;
  --amber-pale:  #fdf4e3;
  --amber-faint: #fffbf4;
 
  --red:         #a52525;
  --red-pale:    #fdf0f0;
 
  --charcoal:    #1a2820;
  --slate:       #2c3e30;
  --muted:       #5a7060;
  --muted-light: #8a9e90;
  --border:      #c8ddd0;
  --border-soft: #e0ece5;
  --surface:     #ffffff;
  --bg:          #f4f7f4;
  --bg-warm:     #f7f5f0;
 
  /* Typography */
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
 
  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(11,61,32,.06);
  --shadow-sm: 0 2px 8px rgba(11,61,32,.08);
  --shadow-md: 0 4px 20px rgba(11,61,32,.11);
  --shadow-lg: 0 8px 40px rgba(11,61,32,.14);
 
  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
}
 
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
html { font-size: 15px; scroll-behavior: smooth; }
 
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
 
/* ── SCROLLBAR ─────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-light); }
 
/* ── NAVIGATION ────────────────────────── */
.nav {
  background: var(--forest);
  display: flex;
  align-items: center;
  padding: 0 28px;
  flex-wrap: wrap;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber-light);
  letter-spacing: .03em;
  padding: 16px 20px 16px 0;
  border-right: 1px solid rgba(255,255,255,.12);
  margin-right: 8px;
  white-space: nowrap;
}
.nav a {
  color: rgba(255,255,255,.68);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 18px 14px;
  letter-spacing: .02em;
  transition: color .2s, background .2s;
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px;
  background: var(--amber-light);
  transform: scaleX(0);
  transition: transform .2s;
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { color: #fff; }
.nav a.active::after { transform: scaleX(1); }
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-user {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  font-family: var(--font-mono);
}
.nav-logout {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: all .2s;
}
.nav-logout:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}
 
/* ── PAGE HEADER ───────────────────────── */
.page-header {
  background: var(--forest);
  padding: 40px 32px 32px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 80% 50%, rgba(184,103,10,.15) 0%, transparent 60%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(255,255,255,.015) 20px,
      rgba(255,255,255,.015) 21px
    );
}
.page-header-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.page-header h1 span {
  display: block;
  font-size: .55em;
  font-weight: 400;
  color: rgba(255,255,255,.55);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.page-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
 
/* ── CLOSURE ALERT ─────────────────────── */
.closure-banner {
  background: var(--amber-pale);
  border-bottom: 1px solid #e6c07a;
  color: #7a4e08;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
}
.closure-banner.visible { display: flex; }
 
/* ── MAIN CONTAINER ────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
 
/* ── BUTTONS ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all .18s;
  letter-spacing: .01em;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,125,69,.25);
}
.btn-primary:hover { background: var(--forest-mid); box-shadow: 0 4px 12px rgba(30,125,69,.3); }
.btn-amber {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 2px 8px rgba(184,103,10,.25);
}
.btn-amber:hover { background: #9e5808; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--green-pale); color: var(--green); border-color: var(--green-light); }
.btn-light {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.btn-light:hover { background: rgba(255,255,255,.25); }
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #8a1e1e; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-sm);
}
.btn.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
 
/* ── CARDS ─────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--green-faint);
  flex-wrap: wrap;
  gap: 10px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-accent {
  display: inline-block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--green-light);
  flex-shrink: 0;
}
.card-accent.amber { background: var(--amber-mid); }
.card-accent.red   { background: var(--red); }
.card-body { padding: 0; }
 
/* ── KPI CARDS ─────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--green-light);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-card.amber { border-top-color: var(--amber-mid); }
.kpi-card.red   { border-top-color: var(--red); }
.kpi-card.blue  { border-top-color: #2a7ab8; }
.kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi-number {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}
.kpi-card.amber .kpi-number { color: var(--amber); }
.kpi-card.red   .kpi-number { color: var(--red); }
.kpi-card.blue  .kpi-number { color: #2a7ab8; }
.kpi-sub { font-size: 11.5px; color: var(--muted-light); margin-top: 6px; }
.kpi-bg-icon {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 2.8rem;
  opacity: .07;
  line-height: 1;
  font-family: var(--font-serif);
}
 
/* ── TABLES ─────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--green-pale);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--forest-mid);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  color: var(--charcoal);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--green-faint); }
.row-total td {
  background: var(--green-pale) !important;
  font-weight: 700;
  font-size: 13px;
  color: var(--forest);
}
.row-warning td { background: var(--amber-faint) !important; }
.row-danger td  { background: var(--red-pale) !important; }
 
/* ── BADGES ─────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: .01em;
}
.badge-green   { background: var(--green-pale);  color: var(--forest-mid); }
.badge-amber   { background: var(--amber-pale);  color: var(--amber); }
.badge-red     { background: var(--red-pale);    color: var(--red); }
.badge-gray    { background: var(--bg);          color: var(--muted); border: 1px solid var(--border); }
.badge-pending { background: #fff3cd;            color: #8a5c00; }
.badge-ok      { background: var(--green-pale);  color: var(--forest-mid); }
.badge-done    { background: #e0f7e9;            color: #1a6b38; }
 
/* ── FORMS ───────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--charcoal);
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}
.form-control:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,125,69,.1);
}
.form-control::placeholder { color: var(--muted-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 72px; }
 
/* ── TABS ───────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-soft);
  margin-bottom: 24px;
}
.tab-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: all .18s;
  letter-spacing: .01em;
}
.tab-btn.active {
  color: var(--forest);
  border-bottom-color: var(--green);
  background: var(--green-faint);
}
.tab-btn:hover:not(.active) { color: var(--charcoal); background: var(--bg-warm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
 
/* ── TOAST ───────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--charcoal);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.ok   { border-left: 4px solid var(--green-light); }
#toast.err  { border-left: 4px solid var(--red); }
#toast.info { border-left: 4px solid var(--amber-mid); }
 
/* ── EMPTY STATE ─────────────────────────── */
.empty-state {
  text-align: center;
  padding: 44px 24px;
  color: var(--muted-light);
}
.empty-state .empty-icon {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--border);
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}
.empty-state p { font-size: 14px; }
 
/* ── UTILITY ─────────────────────────────── */
.text-muted   { color: var(--muted-light); }
.text-green   { color: var(--green); font-weight: 600; }
.text-amber   { color: var(--amber); font-weight: 600; }
.text-red     { color: var(--red);   font-weight: 600; }
.text-mono    { font-family: var(--font-mono); }
.text-serif   { font-family: var(--font-serif); }
.fw-bold      { font-weight: 700; }
.gap-10       { gap: 10px; }
.mt-4         { margin-top: 24px; }
.mb-4         { margin-bottom: 24px; }
 
/* ── PROGRESS BARS ───────────────────────── */
.prog-wrap {
  background: var(--bg);
  border-radius: 4px;
  height: 7px;
  width: 80px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: var(--green-light);
  border-radius: 4px;
  transition: width .5s ease;
}
.prog-fill.low      { background: var(--amber-mid); }
.prog-fill.very-low { background: var(--red); }
 
/* ── DIVIDERS ────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 24px 0;
}
 
/* ── RETURN LOG ENTRIES ──────────────────── */
.return-log { border-top: 1px solid var(--border-soft); }
.return-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.return-entry:last-child { border-bottom: none; }
.return-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-light);
  margin-top: 5px;
  flex-shrink: 0;
}
.return-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
 
/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .page-header { padding: 24px 20px 20px; }
  .page-header h1 { font-size: 1.6rem; }
  .page-header-inner { flex-direction: column; align-items: flex-start; }
  .container { padding: 18px 14px 50px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prog-wrap { display: none; }
  .nav { padding: 0 16px; }
  .nav-brand { padding-left: 0; }
  table { font-size: 12.5px; }
  thead th, tbody td { padding: 9px 10px; }
  .form-grid { grid-template-columns: 1fr; }
}
 
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; padding: 10px 14px; font-size: 12px; }
}
 
/* ── ANIMATIONS ──────────────────────────── */
.fade-up {
  opacity: 0;
  animation: fadeUp .45s ease forwards;
}
.fade-up:nth-child(2) { animation-delay: .07s; }
.fade-up:nth-child(3) { animation-delay: .14s; }
.fade-up:nth-child(4) { animation-delay: .21s; }
 
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ── MODAL ───────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,61,32,.5);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--charcoal);
}
 
/* ── PRODUCT PILLS IN COVERS ─────────────── */
.product-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  color: var(--forest-mid);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  margin: 2px;
}
.product-pill .qty { color: var(--amber); font-weight: 700; }
 
/* ── DAY STATUS CHIP ─────────────────────── */
.day-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.day-chip.open   { background: var(--green-pale); color: var(--forest-mid); }
.day-chip.closed { background: var(--amber-pale); color: var(--amber); }
.day-chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
 
/* ── INLINE NUMERIC INPUT FOR RETURNS ───── */
.return-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.return-inline input {
  width: 70px;
  padding: 5px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-mono);
  background: var(--bg);
  outline: none;
  text-align: center;
}
.return-inline input:focus {
  border-color: var(--green);
  background: #fff;
}
 
/* ── HISTORY DRAWER ──────────────────────── */
.history-drawer {
  background: var(--green-faint);
  border-top: 1px solid var(--border-soft);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.history-drawer.open { max-height: 600px; overflow-y: auto; }
 
/* ── NUMBER HIGHLIGHT ────────────────────── */
.num-highlight {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}