/* SR Wholesale — brand hooks for flux-ui.css, plus the layout flux-ui.css
   deliberately doesn't provide (it's structural-only, see its own header).
   Palette direction: "quiet luxury" (deep espresso ink, warm nude paper,
   berry + muted gold accents) — researched against real premium hair-
   extension brand sites (minimalist, editorial, warm neutrals, serif
   display type) rather than a generic flat SaaS look. */
:root {
  --ui-ink: #2A1B14;
  --ui-paper: #FBF3EA;
  --ui-accent: #9A2846;
  --ui-ink-rgb: 42, 27, 20;
  --ui-gold: #A9793C;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ui-paper); color: var(--ui-ink); font-family: var(--font-body); }
a { color: var(--ui-accent); }
h1, h2, h3, .brand, .hero h1 { font-family: var(--font-display); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 243, 234, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ui-line); padding: .9rem 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.3rem; text-decoration: none; color: var(--ui-ink); letter-spacing: .01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--ui-ink); color: var(--ui-paper);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: .85rem; flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.1rem; }
.site-header nav a { text-decoration: none; color: var(--ui-ink); font-size: .92rem; opacity: .85; }
.site-header nav a:hover { opacity: 1; }

.btn { display: inline-block; padding: .65rem 1.2rem; border-radius: .4rem; border: 1px solid var(--ui-line-2);
  background: var(--ui-sunk); color: var(--ui-ink); text-decoration: none; cursor: pointer; font-size: .95rem;
  transition: background .15s ease, transform .1s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ui-ink); color: var(--ui-paper); border-color: var(--ui-ink); }
.btn-primary:hover { background: var(--ui-accent); border-color: var(--ui-accent); }
.btn-gold { background: var(--ui-gold); color: #fff; border-color: var(--ui-gold); }
.btn-danger { background: var(--ui-danger); color: #fff; border-color: var(--ui-danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Hero (public catalog) ---- */
.hero { padding: 3.5rem 0 2.5rem; text-align: center; border-bottom: 1px solid var(--ui-line); margin-bottom: 1rem; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--ui-gold); font-weight: 600; margin-bottom: .75rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; margin: 0 0 .6rem; line-height: 1.1; }
.hero p { font-size: 1.05rem; opacity: .8; max-width: 36rem; margin: 0 auto 1.5rem; }
.hero .btn { margin: 0 .25rem; }

/* ---- Public catalog ---- */
.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 2rem; }
.pill { padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--ui-line-2); color: var(--ui-ink);
  text-decoration: none; font-size: .82rem; background: #fff; transition: background .15s ease, color .15s ease; }
.pill.active, .pill:hover { background: var(--ui-ink); border-color: var(--ui-ink); color: var(--ui-paper); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; padding: 0 0 3rem; }
.catalog-card { border: 1px solid var(--ui-line); border-radius: .5rem; overflow: hidden; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease; }
.catalog-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(var(--ui-ink-rgb), .12); }
.catalog-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--ui-sunk); display: block; }
.catalog-card-placeholder { width: 100%; aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--ui-dim), var(--ui-sunk)); color: var(--ui-gold); font-family: var(--font-display);
  font-size: 2.75rem; font-weight: 500; }
.catalog-card .meta { padding: .9rem 1rem 1.1rem; }
.catalog-card .meta .name { font-weight: 600; font-size: .98rem; }
.category-badge { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ui-gold); font-weight: 700; margin-bottom: .35rem; }
.catalog-card .price { font-weight: 600; color: var(--ui-accent); margin-top: .3rem; font-family: var(--font-display); font-size: 1.05rem; }
.new-arrivals-banner { background: var(--ui-ink); color: var(--ui-paper); padding: .9rem 1rem; text-align: center;
  border-radius: .5rem; margin: 1rem 0 2rem; font-family: var(--font-display); letter-spacing: .02em; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--ui-line); margin-top: 2rem; padding: 2.5rem 0; text-align: center; color: var(--ui-muted); font-size: .85rem; }
.site-footer .brand { justify-content: center; margin-bottom: .75rem; font-size: 1.1rem; }
.site-footer a { color: var(--ui-ink); }

/* ---- Install prompt ---- */
#install-banner { display: none; background: var(--ui-ink); color: var(--ui-paper); padding: .7rem 1.25rem;
  font-size: .85rem; align-items: center; justify-content: center; gap: 1rem; text-align: center; }
#install-banner.show { display: flex; }
#install-banner button { background: var(--ui-gold); color: #fff; border: none; border-radius: .35rem; padding: .4rem .9rem; font-size: .8rem; cursor: pointer; }
#install-banner .dismiss { background: none; color: var(--ui-paper); opacity: .7; padding: 0 .3rem; }

/* ---- Till ---- */
.till-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem 0; }
@media (max-width: 720px) { .till-layout { grid-template-columns: 1fr; } }
#scanner-video { width: 100%; max-height: 320px; background: #000; border-radius: .5rem; }
.cart-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--ui-line); }
.cart-row .qty-controls button { width: 1.8rem; }
#sync-badge { display: inline-block; margin-bottom: 1rem; padding: .4rem .8rem; border-radius: 1rem; font-size: .85rem;
  background: var(--ui-sunk); border: 1px solid var(--ui-line-2); }
#sync-badge.online { background: #e6f7ed; border-color: #2a9d5c; }
#sync-badge.offline { background: #fff3cd; border-color: #c99a1f; }
#sync-badge.syncing { background: #e6f0ff; border-color: #3a66d6; }
#sync-badge.failed { background: #fde2e1; border-color: var(--ui-danger); }
.manual-code-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.manual-code-row input { flex: 1 1 140px; min-width: 0; border: 1px solid var(--ui-line-2); border-radius: .4rem; }

/* ---- Dashboard ---- */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.dash-card { border: 1px solid var(--ui-line); border-radius: .6rem; padding: 1.1rem; background: #fff; }
.dash-card .big { font-size: 1.8rem; font-weight: 600; font-family: var(--font-display); color: var(--ui-ink); }
.dash-card-title { font-weight: 600; margin-bottom: .75rem; color: var(--ui-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; align-items: start; }
@media (max-width: 720px) { .dash-row { grid-template-columns: 1fr; } }
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--ui-line); }

/* 7-day trend — single-hue magnitude bars, thin, rounded data-ends anchored
   to the baseline, 2px gaps, recessive baseline; value is the direct label
   (7 points, not a line with many — safe to label each per dataviz guidance). */
.trend-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 1.2rem; }
.trend-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.trend-value { font-size: .7rem; color: var(--ui-muted); margin-bottom: .25rem; white-space: nowrap; }
.trend-bar { width: 100%; max-width: 28px; background: var(--ui-accent); border-radius: 4px 4px 0 0; min-height: 2px; border-bottom: 2px solid var(--ui-line-2); }
.trend-label { font-size: .7rem; color: var(--ui-muted); margin-top: .35rem; }

/* ---- Label sheet (print) ---- */
.label-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; padding: 4mm; }
.label-card { border: 1px dashed #999; border-radius: 3mm; padding: 3mm; text-align: center; }
.label-card .qr-canvas { width: 28mm; height: 28mm; margin: 0 auto; }
.label-card .sku { font-size: 7pt; color: #666; }
@media print {
  .no-print { display: none !important; }
  .label-card { border: none; }
}

.login-form { max-width: 320px; margin: 3rem auto; display: flex; flex-direction: column; gap: .75rem; }
.login-form h1 { text-align: center; }
.login-form input { padding: .65rem .7rem; border: 1px solid var(--ui-line-2); border-radius: .4rem; font-family: var(--font-body); font-size: 1rem; }
