/* LA VITA GOLF — Dealer Portal
   Near-black + off-white, one fairway-green accent, serif display, grotesk body. */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&f[]=gambetta@400,500,600&display=swap");

:root {
  --ink: #0e100f;
  --ink-soft: #232725;
  --paper: #f7f5f0;
  --paper-2: #fffdf9;
  --line: #d9d5cb;
  --line-strong: #bdb8ac;
  --muted: #6c6f6a;
  --accent: #14512f;
  --accent-hover: #0d3d23;
  --accent-tint: #e7efe9;
  --danger: #9c2f22;
  --danger-tint: #fbeae7;
  --warn: #8a5d0a;
  --warn-tint: #fbf1dc;
  --radius: 3px;
  --shadow: 0 1px 2px rgba(14, 16, 15, .05), 0 12px 32px rgba(14, 16, 15, .06);
  --sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Gambetta", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: .01em; }
h1 { font-size: 27px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
.eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.serif { font-family: var(--serif); }
.mono-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; padding: 28px 0 72px; }
.page-head {
  display: flex; flex-wrap: wrap; gap: 14px 20px;
  align-items: flex-end; justify-content: space-between; margin-bottom: 20px;
}

/* --------------------------------------------------------------------- nav */
.topbar {
  background: var(--ink); color: var(--paper-2);
  border-bottom: 1px solid #000; position: sticky; top: 0; z-index: 40;
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--paper-2); }
.brand:hover { text-decoration: none; }
.brand-text { line-height: 1.05; }
.brand-text b {
  display: block; font-family: var(--serif); font-size: 15px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
}
.brand-text span { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: #9ca39d; }
nav.links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.links a {
  color: #cfd3ce; padding: 7px 11px; border-radius: var(--radius);
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
}
nav.links a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
nav.links a.active { color: var(--ink); background: var(--paper-2); }
nav.links a .pill {
  display: inline-block; margin-left: 6px; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 0 6px; font-size: 11px;
}
.who { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #9ca39d; }
.who b { color: var(--paper-2); font-weight: 500; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 9px 16px; border-radius: var(--radius); cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--ink-soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: #ece9e2; }
.btn.danger { background: transparent; color: var(--danger); border-color: #dcc4bf; }
.btn.danger:hover { background: var(--danger-tint); }
.btn.sm { padding: 6px 10px; font-size: 11.5px; }
.btn.block { width: 100%; }
.btn.link {
  background: none; border: none; color: var(--accent); text-transform: none;
  letter-spacing: 0; padding: 2px 0; font-size: 13px;
}
.btn.link:hover { text-decoration: underline; background: none; }

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.stat { border: 1px solid var(--line); background: var(--paper-2); padding: 14px 16px; border-radius: var(--radius); }
.stat .v { font-family: var(--serif); font-size: 25px; line-height: 1.1; }
.stat .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------------ tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 9px 10px;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--paper);
}
tbody td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr.group-head td {
  background: #f1eee7; border-top: 1px solid var(--line-strong); padding: 10px;
}
tbody tr.oos { color: var(--muted); background: #f5f3ee; }
tbody tr.critical td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.retail { color: var(--muted); text-decoration: line-through; }
.wholesale { font-weight: 700; }
.thumb {
  width: 42px; height: 42px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: 2px; flex: 0 0 auto;
}
.prow { display: flex; align-items: center; gap: 11px; }
.prow .t { font-family: var(--serif); font-size: 15px; }
.sku { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
  font-weight: 500;
}
.badge.ok { background: var(--accent-tint); color: var(--accent); border-color: #c6dccd; }
.badge.low { background: var(--warn-tint); color: var(--warn); border-color: #e8d3a6; }
.badge.critical { background: var(--danger-tint); color: var(--danger); border-color: #e6c4bd; font-weight: 700; }
.badge.out { background: #ecebe6; color: var(--muted); border-color: var(--line); }
.badge.neutral { background: #ecebe6; color: var(--ink-soft); border-color: var(--line); }

/* ------------------------------------------------------------------- forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(20, 81, 47, .12); }
input.qty { width: 66px; min-width: 66px; text-align: right; padding: 7px 8px; margin-left: auto; }
td.num input.qty { display: inline-block; }
.qty-cell { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.qty::placeholder { color: #b3afa6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hint { font-size: 12.5px; color: var(--muted); }
.notice {
  border: 1px solid var(--line); background: #f1eee7; padding: 12px 14px;
  border-radius: var(--radius); font-size: 13px;
}
.notice.warn { background: var(--warn-tint); border-color: #e8d3a6; color: #6c4a08; }
.notice.error { background: var(--danger-tint); border-color: #e6c4bd; color: #7d2519; }
.notice.ok { background: var(--accent-tint); border-color: #c6dccd; color: var(--accent); }

/* -------------------------------------------------------------------- auth */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--ink); color: var(--paper-2);
}
.auth-side { padding: 56px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 40px; color: var(--paper-2); max-width: 12em; }
.auth-side p { color: #a9afa9; max-width: 34em; }
.auth-side ul { list-style: none; padding: 0; margin: 26px 0 0; }
.auth-side li {
  padding: 11px 0; border-top: 1px solid #262a27; color: #cfd3ce; font-size: 13.5px;
  display: flex; gap: 10px; align-items: baseline;
}
.auth-side li b { font-family: var(--serif); font-weight: 500; color: var(--paper-2); }
.auth-main {
  background: var(--paper); color: var(--ink); padding: 56px 52px;
  display: flex; align-items: center; justify-content: center;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------- empty/error */
.empty { text-align: center; padding: 54px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-2); }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 auto 16px; max-width: 40ch; font-size: 13.5px; }

/* ------------------------------------------------------------------ assets */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.asset-card { border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.asset-card .shot { aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 12px; }
.asset-card .shot img { max-height: 100%; object-fit: contain; }
.asset-card .body { padding: 13px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.asset-card .body .t { font-family: var(--serif); font-size: 15px; }
.asset-files { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.asset-files a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px dotted var(--line); }
.asset-files a span { color: var(--muted); flex: 0 0 auto; }

/* ----------------------------------------------------------------- toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar input[type=text] { max-width: 320px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; letter-spacing: .04em;
}
.chip:hover { background: #ece9e2; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------------ totals */
.totals { display: grid; gap: 7px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; gap: 18px; }
.totals .grand { border-top: 1px solid var(--line-strong); padding-top: 9px; font-size: 19px; font-family: var(--serif); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.split > * { min-width: 0; }
.card { min-width: 0; }

/* ------------------------------------------------------------------ toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  background: var(--ink); color: #fff; padding: 11px 14px; border-radius: var(--radius);
  box-shadow: var(--shadow); font-size: 13px; animation: rise .18s ease;
}
.toast.bad { background: var(--danger); }
.toast.good { background: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.skeleton { background: linear-gradient(90deg, #eae7e0, #f3f1ea, #eae7e0); background-size: 200% 100%; animation: sheen 1.2s linear infinite; border-radius: 2px; height: 14px; }
@keyframes sheen { to { background-position: -200% 0; } }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }

footer.site { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 12px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 40px 24px; }
  .auth-side h1 { font-size: 31px; }
  .auth-main { padding: 34px 24px 56px; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .topbar .wrap { min-height: 56px; padding: 8px 16px; }
  nav.links { margin-left: 0; order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  nav.links a { padding: 6px 9px; font-size: 11.5px; }
  .who { margin-left: auto; }
  h1 { font-size: 23px; }
  .two-col { grid-template-columns: 1fr; }
  .stat .v { font-size: 21px; }
  table { font-size: 13px; }
  tbody td, thead th { padding: 8px 7px; }
  input.qty { width: 58px; min-width: 58px; }
}
