/* ============================================================
   Evans Equipment & Environmental — Employee Web Store
   Design tokens + base system
   ============================================================ */

:root {
  /* Brand — teal derived from the existing Evans store */
  --teal-800: #084a49;
  --teal-700: #0a5f5e;
  --teal-600: #0e7c7b;   /* primary */
  --teal-500: #14918f;
  --teal-100: #cfe6e4;
  --teal-50:  #ecf5f4;
  --forest:   #2f5d4f;

  --ink:      #16201f;
  --ink-2:    #36433f;
  --muted:    #6a7773;
  --faint:    #98a4a0;

  --line:     #e3eae8;
  --line-2:   #eef2f1;
  --bg:       #f4f6f5;
  --surface:  #ffffff;
  --surface-2:#f9fbfa;

  --amber:    #b9760e;
  --amber-bg: #fbf1de;
  --amber-line:#eecfa0;
  --danger:   #b1402b;
  --danger-bg:#fbeeea;
  --ok:       #2c7a51;
  --ok-bg:    #e8f3ec;

  --radius:   14px;
  --radius-sm:10px;
  --radius-lg:20px;
  --shadow-sm: 0 1px 2px rgba(16,40,38,.06), 0 1px 3px rgba(16,40,38,.05);
  --shadow:    0 4px 16px rgba(13,50,48,.08), 0 1px 3px rgba(13,50,48,.06);
  --shadow-lg: 0 18px 50px rgba(11,45,43,.16);

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
}
#root { min-height: 100vh; }

h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; color: var(--ink); font-weight: 700; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--teal-100); }
.logo-light { filter: brightness(0) invert(1); }

.mono-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }

/* ---- Layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700; color: var(--teal-600); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, color .15s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: #d3dcda; }
.btn-soft { background: var(--teal-50); color: var(--teal-700); }
.btn-soft:hover { background: var(--teal-100); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-icon { padding: 10px; border-radius: 10px; }

.link { color: var(--teal-600); font-weight: 600; cursor: pointer; }
.link:hover { color: var(--teal-700); text-decoration: underline; }

/* ============================================================
   Badges & chips
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display);
  font-weight: 600; font-size: 11.5px; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.badge-teal { background: var(--teal-50); color: var(--teal-700); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-gray { background: #eef2f1; color: var(--ink-2); }

/* points pill in header */
.pts-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 8px 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.pts-pill .pts-meter { width: 54px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.pts-pill .pts-meter > i { display:block; height:100%; background: var(--teal-600); border-radius: 99px; }
.pts-pill { flex-shrink: 0; }
.pts-pill .pts-val { font-family: var(--font-display); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pts-pill .pts-val b { color: var(--teal-700); }
.pts-pill .pts-val span { color: var(--faint); font-weight: 600; }

/* ============================================================
   Cards
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 22px; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.input, .select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,145,143,.14); }

/* ============================================================
   Garment placeholder
   ============================================================ */
.garment {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-sm);
  background: linear-gradient(170deg, #fcfdfd, #eef2f1);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.garment svg { width: 72%; height: 72%; filter: drop-shadow(0 8px 14px rgba(20,30,28,.12)); }
.garment .chest-logo { position: absolute; }
.garment-tag {
  position: absolute; left: 10px; bottom: 10px; font-family: var(--font-display);
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); background: rgba(255,255,255,.7); padding: 3px 7px; border-radius: 6px;
  backdrop-filter: blur(2px);
}

/* color swatches */
.swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; position: relative; }
.swatch.lg { width: 34px; height: 34px; border-radius: 8px; }
.swatch.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--teal-600); }
.swatch.more { background: none; border: none; font-family: var(--font-display); font-size: 11px; color: var(--muted); font-weight: 600; }

/* ============================================================
   Product card
   ============================================================ */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: box-shadow .18s, transform .18s, border-color .18s; display: flex; flex-direction: column; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d8e2e0; }
.pcard .pcard-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .pname { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.25; color: var(--ink); }
.pcard .pbrand { font-size: 12px; color: var(--faint); }
.pcard .pprice { margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.pcard .pprice .usd { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ============================================================
   Tables (admin)
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }

/* scrollbar tidy */
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb { background: #d9e1df; border-radius: 99px; border: 3px solid var(--bg); }

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.grow { flex: 1; }
.divider { height: 1px; background: var(--line); }

@keyframes fadeUp { from { transform: translateY(9px); } to { transform: none; } }
.fade-up { animation: fadeUp .42s cubic-bezier(.2,.7,.3,1) both; }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; } }
