/* Fumari Wholesale — shared styles. Brand: fumari.com (lime #80bc00, charcoal #202020, Jost + Open Sans). */
:root {
  --lime: #80bc00;
  --lime-600: #6fa300;
  --lime-700: #5a8500;
  --lime-50: #f3f9e6;
  --lime-100: #e4f2c7;
  --char: #1b1b1b;
  --char-2: #2a2a2a;
  --ink: #1f1f1f;
  --ink-2: #474747;
  --muted: #737373;
  --line: #e7e7e3;
  --line-2: #d9d9d4;
  --bg: #f5f5f1;
  --surface: #ffffff;
  --red: #c8372d;
  --red-50: #fdecea;
  --amber-50: #fff6df;
  --amber: #8a5a00;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 2px 8px rgba(20, 20, 20, .04);
  --shadow-lg: 0 12px 40px rgba(20, 20, 20, .14);
  --head: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --body: "Open Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: var(--lime-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--char); color: #fff;
  border-bottom: 3px solid var(--lime);
}
.site-header .inner {
  max-width: 1680px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.brand img { height: 34px; width: auto; display: block; }
.brand .brand-tag {
  font: 600 11px/1 var(--head); letter-spacing: .18em; text-transform: uppercase;
  color: var(--lime); border-left: 1px solid #444; padding-left: 12px;
}
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #cfcfcf; font: 500 14px/1 var(--head); letter-spacing: .02em; white-space: nowrap;
  padding: 9px 12px; border-radius: 999px; text-decoration: none;
}
.nav a:hover { color: #fff; background: var(--char-2); }
.nav a.active { color: var(--char); background: var(--lime); }
.account { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #bdbdbd; white-space: nowrap; }
.account .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.account button {
  background: transparent; border: 1px solid #444; color: #ddd; border-radius: 999px;
  padding: 7px 14px; font: 500 13px/1 var(--head); cursor: pointer;
}
.account button:hover { border-color: var(--lime); color: #fff; }
/* Many dashboard links: drop the extras first, then give the links their own row. */
@media (max-width: 1560px) { .brand .brand-tag { display: none; } }
@media (max-width: 1400px) { .account .who { display: none; } }
@media (max-width: 1240px) and (min-width: 721px) {
  :root { --header-h: 110px; }
  .site-header .inner { flex-wrap: wrap; align-content: center; gap: 6px 20px; }
  .account { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -12px; }
}

/* -------------------------------------------------------------------- page */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 12px; padding: 5px 12px 5px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 13px/1 var(--head); text-decoration: none !important; }
.back-link:hover { border-color: var(--ink); color: var(--ink); }
.back-link[hidden] { display: none; }
main { max-width: 1360px; margin: 0 auto; padding: 28px 24px 80px; }
main.narrow { max-width: 1100px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font: 600 12px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--lime-700); margin: 0 0 8px; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; }
.lede { color: var(--ink-2); margin-top: 6px; }
.muted { color: var(--muted); font-size: 13px; }
footer.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 24px 40px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card > h1:first-child, .card > h2:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font: 600 11px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-2); background: transparent;
}
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafaf7; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--char); color: #fff; border: 1px solid var(--char); border-radius: 999px;
  padding: 11px 20px; font: 600 14px/1 var(--head); letter-spacing: .02em; cursor: pointer;
  text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.gold, .btn.primary { background: var(--lime); border-color: var(--lime); color: #111; }
.btn.gold:hover, .btn.primary:hover { background: var(--lime-600); border-color: var(--lime-600); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .4; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------- forms */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: 14px/1.4 var(--body); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(128, 188, 0, .2);
}
input[type=file] { font: 14px var(--body); }
label { font: 600 12px/1.2 var(--head); letter-spacing: .04em; color: var(--ink-2); display: block; margin: 14px 0 6px; }
.error, .ok, .notice {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid;
}
.error { background: var(--red-50); color: #8f241c; border-color: #f5c6c1; }
.ok { background: var(--lime-50); color: #3d5c00; border-color: var(--lime-100); }
.notice { background: var(--amber-50); color: var(--amber); border-color: #f3dfaa; }

/* ---------------------------------------------------------------- statuses */
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font: 600 11px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-received { background: #eef0ff; color: #3b44b0; }
.st-quoted { background: var(--amber-50); color: var(--amber); }
.st-approved { background: #e7f1ff; color: #1e56b0; }
.st-in_fulfillment { background: #f3ebff; color: #6b2fb0; }
.st-shipped { background: var(--lime-50); color: var(--lime-700); }
.st-cancelled { background: var(--red-50); color: var(--red); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qty { width: 80px !important; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--lime-50);
  color: var(--lime-700); font: 600 12px/1.4 var(--head); letter-spacing: .02em;
}
.pill.dark { background: var(--char); color: var(--lime); }

/* ------------------------------------------------------------- auth pages */
body.auth { background: var(--char); }
body.auth .site-header { display: none; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 0% 100%, rgba(128, 188, 0, .28), transparent 60%), var(--char);
}
.auth-hero .brand img { height: 46px; }
.auth-hero h1 { color: #fff; font-size: 44px; line-height: 1.05; font-weight: 700; max-width: 520px; }
.auth-hero h1 em { color: var(--lime); font-style: normal; }
.auth-hero p { color: #bdbdbd; max-width: 440px; font-size: 15px; margin-top: 16px; }
.auth-hero .shots { position: absolute; right: 56px; bottom: 56px; display: flex; gap: 0; opacity: .95; pointer-events: none; }
.auth-hero .shots img { width: 170px; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)); margin-left: -40px; }
.auth-hero .fine { color: #8a8a8a; font-size: 12px; }
.auth-panel { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.auth-card form { margin-top: 18px; }
.auth-card .btn { width: 100%; margin-top: 22px; padding: 14px; font-size: 15px; }
.auth-card .links { margin-top: 18px; font-size: 13px; display: flex; justify-content: space-between; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; min-height: 220px; }
  .auth-hero h1 { font-size: 30px; }
  .auth-hero .shots, .auth-hero .fine { display: none; }
}
@media (max-width: 720px) {
  :root { --header-h: 104px; }
  .site-header .inner { padding: 10px 16px 0; gap: 8px 14px; flex-wrap: wrap; align-content: flex-start; }
  .brand img { height: 30px; }
  .account { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px 8px; }
  .nav a { padding: 8px 12px; font-size: 13px; }
  .brand .brand-tag, .account .who { display: none; }
  main { padding: 20px 16px 120px; }
  h1 { font-size: 24px; }
  .card { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .grid2 { grid-template-columns: 1fr; }
}

.upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.upload-row input[type=file] {
  flex: 1 1 260px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); background: #fafaf7;
}
main.wide { max-width: 1360px; }

/* Click-to-sort table headers (static/sortable.js) */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink, #111); }
th.sortable::after { content: "↕"; margin-left: 4px; opacity: .3; font-size: .9em; }
th.sorted-desc::after { content: "↓"; opacity: .9; }
th.sorted-asc::after { content: "↑"; opacity: .9; }
th.sortable:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Tabs inside a section (Inventory: Stock analysis / Products / Flavor availability) */
.section-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 18px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.section-tabs a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font: 500 13.5px/1 var(--head); text-decoration: none !important; white-space: nowrap; }
.section-tabs a:hover { background: var(--bg); }
.section-tabs a.on { background: var(--char); color: #fff; }
