/* === Vino Veritas — style partagé === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vv-red:       #4a7c4e;
  --vv-red-light: #4a7c4e1c;
  --vv-red-hover: #3a6440;
  --vv-silver:    #c4cbc4;
  --bg:           #0c0f0d;
  --bg-card:      #141815;
  --bg-card2:     #1a1f1b;
  --border:       #232a25;
  --border-light: #34403689;
  --text:         #e6e9e5;
  --text-muted:   #5f6b62;
  --text-dim:     #98a399;
  --green:        #7cc88f;
  --radius:       8px;
  --radius-lg:    12px;
}

html, body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 35px;
  line-height: 1.5;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/assets/logo.png');
  background-repeat: no-repeat;
  background-position: center 60%;
  background-size: 900px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
#navbar, .page-wrap, .admin-wrap {
  position: relative;
  z-index: 1;
}
/* Navbar */
#navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12,15,13,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
#navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 8px 8px, #7cc88f22 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}
#navbar::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #4a7c4e14 0%, transparent 70%);
  pointer-events: none;
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
}
.nav-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo svg { flex-shrink: 0; }
.logo-vino { color: var(--vv-red); }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 20px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: #ffffff0a; }
.nav-link.nav-active { color: var(--text); background: #ffffff0f; font-weight: 500; }
.nav-admin {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 20px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-admin:hover { color: var(--text); border-color: var(--text-dim); }

/* Layout */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}
.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 25px; font-weight: 600; margin-bottom: 4px; }
.page-sub { font-size: 20px; color: var(--text-muted); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 10px 16px;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vv-red);
  text-align: center;
}

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--bg-card2);
}
.tbl th.c { text-align: center; }
.tbl th.r { text-align: right; }
.tbl td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 20px;
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td.c { text-align: center; }
.tbl td.r { text-align: right; }

/* Inputs */
.qty {
  width: 62px;
  padding: 4px 6px;
  background: #0f0f0f;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 20px;
  text-align: center;
  display: block;
  margin: 0 auto;
  transition: border-color 0.15s;
}
.qty:focus { outline: none; border-color: var(--vv-red); }
.qty:disabled { opacity: 0.25; cursor: not-allowed; }

/* Badges */
.badge {
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-recel { background: #4a7c4e22; color: #7cc88f; }
.badge-dope  { background: #5b4a8b22; color: #a290e0; }
.badge-arme  { background: #c4cbc422; color: #c4cbc4; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.stat-card {
  background: var(--bg-card2);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.stat-label { font-size: 20px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.stat-val { font-size: 25px; font-weight: 600; }
.stat-val.green { color: var(--green); }

/* Recap rows */
.recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.recap-row:last-child { border-bottom: none; font-weight: 600; color: var(--text); }
.recap-row span:last-child { color: var(--green); }

/* Mini progress bar */
.bar-wrap { height: 3px; background: var(--border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--vv-red); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 20px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-dim);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:hover { color: var(--text); border-color: var(--text-dim); }
.btn-red {
  border-color: var(--vv-red);
  color: var(--vv-red);
}
.btn-red:hover { background: var(--vv-red); color: #fff; }

/* Loading / error */
.loading { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 13px; }
.error { color: #e06060; font-size: 20px; padding: 1rem; text-align: center; }

/* Ingredient tags */
.tag {
  display: inline-block;
  font-size: 20px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  margin: 2px;
}

/* Avatar */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--vv-red-light);
  color: var(--vv-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0;
}
