/* ============================================================
   DELTA TRACK SUPPLY — design system
   Brand: navy #0d2a52 / red #b51d20 from the DTS logo.
   Tone: industrial Americana. Real people, real equipment.
   ============================================================ */

:root {
  --navy: #0d2a52;
  --navy-deep: #081c38;
  --navy-soft: #1b3c6e;
  --red: #b51d20;
  --red-dark: #951417;
  --ink: #182840;
  --steel: #5b6a7e;
  --line: #dce2eb;
  --bg: #f5f6f8;
  --white: #ffffff;
  --green: #1d7a3d;
  --green-bg: #e7f4ec;
  --amber: #a86b08;
  --amber-bg: #fdf3e0;
  --blue: #1f5fb0;
  --blue-bg: #e8f0fb;
  --purple: #6b3fa0;
  --purple-bg: #f1eafa;
  --shadow: 0 2px 10px rgba(13, 42, 82, .08);
  --shadow-lift: 0 10px 28px rgba(13, 42, 82, .16);
  --font-head: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Barlow', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.08;
  color: var(--navy);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--steel); }
.small { font-size: .88rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Red kicker label above headings — echoes the logo's red corner brackets */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .12em; font-size: .95rem;
  color: var(--red); margin-bottom: 10px;
}
.kicker::before { content: ""; width: 26px; height: 4px; background: var(--red); transform: skewX(-20deg); }

/* Tri-stripe divider — navy/white/red, skewed like the logo */
.tri-stripe { height: 6px; background:
  linear-gradient(100deg, var(--navy) 0 33.4%, var(--white) 33.4% 66.7%, var(--red) 66.7% 100%); }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: var(--font-head); font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .05em;
  font-size: 1.05rem; line-height: 1;
  padding: 14px 26px;
  color: var(--white); background: var(--navy);
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  transition: background .15s, transform .15s;
  text-align: center;
}
.btn:hover { background: var(--navy-soft); color: var(--white); transform: translateY(-1px); }
.btn-red { background: var(--red); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline {
  background: transparent; color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost-white {
  background: transparent; color: var(--white);
  box-shadow: inset 0 0 0 2px var(--white);
}
.btn-ghost-white:hover { background: var(--white); color: var(--navy); }
.btn-lg { font-size: 1.25rem; padding: 17px 34px; }
.btn-sm { font-size: .92rem; padding: 9px 16px; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ------------------------------------------------ header */
.site-header {
  background: var(--white); position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(13, 42, 82, .06);
}
.header-row { display: flex; align-items: center; gap: 26px; height: 76px; }
.brand img { height: 56px; width: auto; }
.main-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.main-nav a {
  font-family: var(--font-head); font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem;
  color: var(--navy); padding: 10px 13px; border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { border-bottom-color: var(--red); color: var(--red); }
.header-call { margin-left: 4px; white-space: nowrap; }
.nav-toggle {
  display: none; background: none; border: 2px solid var(--navy);
  color: var(--navy); font-size: 1.3rem; line-height: 1; padding: 7px 11px;
  cursor: pointer; border-radius: 4px;
}
.cart-count {
  display: inline-block; min-width: 21px; padding: 2px 5px; margin-left: 2px;
  background: var(--red); color: var(--white); border-radius: 11px;
  font-size: .8rem; text-align: center; font-style: normal; font-family: var(--font-body);
  font-weight: 700;
}
.cart-count:empty { display: none; }

/* Top utility bar */
.topline {
  background: var(--navy); color: #cdd8ea; font-size: .85rem;
  text-align: center; padding: 7px 14px;
}
.topline b { color: var(--white); }
.topline a { color: var(--white); text-decoration: underline; }

/* ------------------------------------------------ hero */
.hero {
  position: relative; color: var(--white);
  background-size: cover; background-position: center;
  min-height: 540px; display: flex; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8, 28, 56, .92) 0%, rgba(8, 28, 56, .72) 45%, rgba(8, 28, 56, .25) 100%);
}
.hero .wrap { position: relative; padding-top: 70px; padding-bottom: 70px; }
.hero h1 { color: var(--white); max-width: 14em; }
.hero h1 .accent { color: #ff5a5e; }
.hero p.lead { font-size: 1.25rem; max-width: 34em; margin: 18px 0 28px; color: #e6ecf5; }
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(181, 29, 32, .92); padding: 7px 16px; margin-bottom: 18px;
  font-family: var(--font-head); font-style: italic; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: .95rem;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}

/* ------------------------------------------------ trust strip */
.trust-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.trust-strip .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding-top: 22px; padding-bottom: 22px;
}
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item svg { width: 30px; height: 30px; flex: 0 0 30px; stroke: var(--red); margin-top: 3px; }
.trust-item b {
  display: block; font-family: var(--font-head); font-style: italic;
  text-transform: uppercase; font-size: 1.05rem; color: var(--navy); letter-spacing: .03em;
}
.trust-item span { font-size: .86rem; color: var(--steel); line-height: 1.35; display: block; }

/* ------------------------------------------------ sections */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-white { background: var(--white); }
.section-navy { background: var(--navy); color: #dbe4f2; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ------------------------------------------------ category cards */
.cat-card {
  position: relative; display: block; min-height: 330px; overflow: hidden;
  background-size: cover; background-position: center; color: var(--white);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(10deg, rgba(8, 28, 56, .9) 8%, rgba(8, 28, 56, .12) 60%);
  transition: background .2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: var(--white); }
.cat-card-body { position: absolute; left: 24px; right: 24px; bottom: 22px; }
.cat-card h3 { color: var(--white); font-size: 1.8rem; }
.cat-card p { color: #d6dfee; font-size: .95rem; margin: 6px 0 12px; }
.cat-card .faux-btn {
  display: inline-block; font-family: var(--font-head); font-style: italic; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--white);
  background: var(--red); padding: 10px 20px; font-size: .98rem;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}

/* ------------------------------------------------ product cards */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; box-shadow: var(--shadow);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.product-card .img-box { height: 190px; overflow: hidden; position: relative; background: var(--navy-deep); }
.product-card .img-box img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card .size {
  font-family: var(--font-head); font-style: italic; font-weight: 800;
  font-size: 1.45rem; color: var(--navy); text-transform: uppercase; line-height: 1.1;
}
.product-card .fits { font-size: .85rem; color: var(--steel); margin: 6px 0 10px; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.price { font-weight: 700; font-size: 1.35rem; color: var(--navy); }
.price-note { font-size: .8rem; color: var(--steel); }
.price-pair { font-size: .86rem; color: var(--green); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-stock { background: var(--green-bg); color: var(--green); }
.badge-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.badge-low { background: var(--amber-bg); color: var(--amber); }
.badge-low::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.badge-hot { background: var(--navy); color: var(--white); }
.badge-cat { background: var(--blue-bg); color: var(--blue); }
.img-box .badge-hot { position: absolute; top: 12px; left: 12px; }

/* ------------------------------------------------ finder / filter bar */
.finder {
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 30px;
}
.finder-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.finder input[type="search"], .finder input[type="text"], .finder select {
  flex: 1; min-width: 220px; padding: 13px 15px; font-size: 1.02rem;
  border: 2px solid var(--line); font-family: var(--font-body); color: var(--ink);
  background: var(--white);
}
.finder input:focus, .finder select:focus { outline: none; border-color: var(--navy); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-size: .88rem; font-weight: 600; color: var(--navy);
  border: 1.5px solid var(--line); background: var(--white);
  padding: 6px 14px; border-radius: 16px; cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--navy); }
.chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.result-count { font-size: .9rem; color: var(--steel); margin: 0 0 16px; }

/* ------------------------------------------------ steps (how it works) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { background: var(--white); border-top: 5px solid var(--red); box-shadow: var(--shadow); padding: 26px 24px 24px; position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-style: italic; font-weight: 800;
  font-size: 3rem; color: var(--line); position: absolute; top: 10px; right: 18px; line-height: 1;
}
.step h3 { margin-bottom: 8px; padding-right: 60px; }
.step p { font-size: .94rem; color: var(--steel); }
.section-navy .step { background: var(--navy-soft); border-top-color: var(--red); }
.section-navy .step::before { color: rgba(255,255,255,.18); }
.section-navy .step h3 { color: var(--white); }
.section-navy .step p { color: #c3d0e4; }

/* ------------------------------------------------ CTA band */
.cta-band { background: var(--red); color: var(--white); }
.cta-band .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #f6d9da; }

/* ------------------------------------------------ tables */
table.data { width: 100%; border-collapse: collapse; background: var(--white); font-size: .95rem; }
table.data th {
  font-family: var(--font-head); font-style: italic; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; font-size: .92rem;
  text-align: left; color: var(--white); background: var(--navy); padding: 11px 14px;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #f8fafc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; color: var(--navy); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 2px solid var(--line); font-size: 1rem;
  font-family: var(--font-body); color: var(--ink); background: var(--white); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.field .hint { font-size: .8rem; color: var(--steel); }

/* ------------------------------------------------ product detail */
.breadcrumbs { font-size: .88rem; color: var(--steel); padding: 18px 0 0; }
.breadcrumbs a { color: var(--steel); text-decoration: underline; }
.pd-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.pd-gallery .main-img { border: 1px solid var(--line); background: var(--white); height: 420px; }
.pd-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.pd-thumbs img { width: 86px; height: 64px; object-fit: cover; border: 2px solid var(--line); cursor: pointer; }
.pd-thumbs img.active { border-color: var(--red); }
.buy-box { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 26px; }
.buy-box .price-big { font-size: 2.1rem; font-weight: 800; color: var(--navy); font-family: var(--font-head); font-style: italic; }
.option-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.option-pill {
  border: 2px solid var(--line); padding: 9px 16px; cursor: pointer; font-weight: 600;
  font-size: .92rem; background: var(--white); color: var(--ink);
}
.option-pill.active { border-color: var(--navy); background: var(--navy); color: var(--white); }
.qty-row { display: flex; align-items: center; gap: 0; margin: 14px 0; width: max-content; border: 2px solid var(--line); }
.qty-row button { width: 42px; height: 44px; border: 0; background: var(--bg); font-size: 1.2rem; cursor: pointer; color: var(--navy); }
.qty-row input { width: 56px; height: 44px; border: 0; text-align: center; font-size: 1.05rem; font-weight: 700; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--steel); width: 45%; }
.fits-list { columns: 2; gap: 28px; font-size: .94rem; }
.fits-list li { margin-bottom: 5px; break-inside: avoid; }

/* ------------------------------------------------ order timeline */
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--white); border: 4px solid var(--line);
}
.timeline li.done::before { border-color: var(--green); background: var(--green); }
.timeline li.now::before { border-color: var(--red); background: var(--white); }
.timeline li b { display: block; color: var(--navy); }
.timeline li span { font-size: .88rem; color: var(--steel); }

/* ------------------------------------------------ footer */
.site-footer { background: var(--navy-deep); color: #b9c6da; font-size: .92rem; }
.site-footer .wrap { padding-top: 50px; padding-bottom: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 34px; margin-bottom: 34px; }
.footer-logo-card { background: var(--white); display: inline-block; padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; }
.footer-logo-card img { height: 62px; }
.site-footer h4 { color: var(--white); margin-bottom: 12px; font-size: 1.05rem; }
.site-footer a { color: #b9c6da; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: #8295ad; }
.footer-phone { font-family: var(--font-head); font-style: italic; font-weight: 800; font-size: 1.5rem; color: var(--white) !important; padding: 0 0 6px !important; }

/* ------------------------------------------------ toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: var(--white); padding: 14px 26px; font-weight: 600;
  box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
  max-width: min(92vw, 480px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-green { background: var(--green); }

/* ============================================================
   ADMIN — "The Office"
   ============================================================ */
body.admin { background: #eef1f5; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 248px; flex: 0 0 248px; background: var(--navy-deep); color: #c2cfe2;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-logo { background: var(--white); margin: 16px; padding: 10px 12px; border-radius: 6px; }
.admin-logo img { height: 48px; margin: 0 auto; }
.admin-nav { flex: 1; padding: 6px 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; color: #c2cfe2; padding: 12px 20px;
  font-weight: 600; font-size: .97rem; border-left: 4px solid transparent;
}
.admin-nav a svg { width: 19px; height: 19px; stroke: currentColor; flex: 0 0 19px; }
.admin-nav a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.admin-nav a.active { color: var(--white); background: rgba(181,29,32,.18); border-left-color: var(--red); }
.admin-side .side-foot { padding: 16px 20px; font-size: .8rem; color: #76879e; border-top: 1px solid rgba(255,255,255,.1); }
.admin-side .side-foot a { color: #aebdd2; display: inline; }

.admin-main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 1.9rem; }
.admin-topbar .sub { color: var(--steel); font-size: .92rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px 20px; border-top: 4px solid var(--navy); }
.stat-card.accent-red { border-top-color: var(--red); }
.stat-card.accent-green { border-top-color: var(--green); }
.stat-card.accent-amber { border-top-color: var(--amber); }
.stat-card .label { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--steel); font-weight: 700; }
.stat-card .value { font-family: var(--font-head); font-style: italic; font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1.15; }
.stat-card .delta { font-size: .84rem; font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

.panel { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.3rem; }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }

/* status pills — plain-language order states */
.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 13px; white-space: nowrap; }
.pill-new { background: var(--amber-bg); color: var(--amber); }
.pill-verified { background: var(--blue-bg); color: var(--blue); }
.pill-sent { background: var(--purple-bg); color: var(--purple); }
.pill-shipped { background: var(--green-bg); color: var(--green); }
.pill-paid { background: var(--green); color: var(--white); }
.pill-overdue { background: var(--red); color: var(--white); }
.pill-draft { background: var(--line); color: var(--steel); }
.pill-problem { background: #fbe5e5; color: var(--red); }

/* supplier stock check widgets */
.stock-check { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.supplier-tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 700;
  border: 1.5px solid var(--line); padding: 6px 12px; background: var(--white); border-radius: 4px;
}
.supplier-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.supplier-tag.ok { border-color: var(--green); color: var(--green); }
.supplier-tag.ok .dot { background: var(--green); }
.supplier-tag.out { border-color: var(--red); color: var(--red); }
.supplier-tag.out .dot { background: var(--red); }
.supplier-tag.checking .dot { background: var(--amber); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* alerts */
.alert { display: flex; gap: 13px; padding: 15px 17px; border-left: 5px solid var(--steel); background: var(--white); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: .94rem; }
.alert b { color: var(--navy); }
.alert.warn { border-left-color: var(--amber); background: var(--amber-bg); }
.alert.bad { border-left-color: var(--red); background: #fbe9e9; }
.alert.good { border-left-color: var(--green); background: var(--green-bg); }

/* simple bar charts (div-based, no libraries) */
.bar-chart { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 74px; gap: 12px; align-items: center; font-size: .9rem; }
.bar-row .bar-label { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: #edf0f5; height: 22px; position: relative; }
.bar-fill { height: 100%; background: var(--navy); min-width: 2px; }
.bar-fill.red { background: var(--red); }
.bar-fill.green { background: var(--green); }
.bar-row .bar-val { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* sparkline / line chart container */
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { width: 100%; height: auto; display: block; }

/* activity feed — plain sentences, no jargon */
.feed { list-style: none; }
.feed li { display: flex; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .93rem; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; }
.feed .when { flex: 0 0 86px; color: var(--steel); font-size: .82rem; padding-top: 2px; }

/* invoice document */
.invoice-doc { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 40px; max-width: 760px; }
.invoice-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.invoice-head img { height: 70px; }
.invoice-meta { text-align: right; font-size: .92rem; }
.invoice-meta .inv-no { font-family: var(--font-head); font-style: italic; font-weight: 800; font-size: 1.5rem; color: var(--navy); }
.invoice-total-row { background: var(--navy); color: var(--white); }
.invoice-total-row td { font-weight: 800; font-size: 1.05rem; border: 0 !important; }

/* drawer / modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8,28,56,.55); z-index: 90; display: none; }
.modal-bg.open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--white); max-width: 680px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lift); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; background: var(--navy); color: var(--white); }
.modal-head h3 { color: var(--white); }
.modal-head .close { background: none; border: 0; color: var(--white); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-body { padding: 22px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #c6cedb; border-radius: 13px; cursor: pointer; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: var(--white); transition: .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* editor preview (marketing page) */
.editor-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
.preview-frame { border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--white); }
.preview-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); font-weight: 700; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .grid-4, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .pd-layout { grid-template-columns: 1fr; }
  .editor-split { grid-template-columns: 1fr; }
}

@media (max-width: 940px) {
  .header-row { height: 66px; gap: 14px; }
  .brand img { height: 46px; }
  .header-call { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    border-bottom: 3px solid var(--red); box-shadow: var(--shadow-lift); padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 24px; border-bottom: 0; font-size: 1.15rem; }
  .main-nav .nav-call-mobile { display: block; margin: 10px 20px; }

  /* admin: sidebar becomes top bar */
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; flex: none; height: auto; position: static; }
  .admin-logo { margin: 12px auto 4px; width: max-content; }
  .admin-nav { display: flex; overflow-x: auto; padding: 0 8px 4px; -webkit-overflow-scrolling: touch; }
  .admin-nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 10px 14px; }
  .admin-nav a.active { border-bottom-color: var(--red); }
  .admin-side .side-foot { display: none; }
  .admin-main { padding: 18px 16px 50px; }
  .bar-row { grid-template-columns: 120px 1fr 64px; font-size: .84rem; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .grid-2, .grid-3, .steps { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 460px; }
  .hero .wrap { padding-left: 30px; padding-right: 30px; }
  .hero p.lead { font-size: 1.08rem; }
  .section { padding: 44px 0; }
  .fits-list { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .trust-strip .wrap { grid-template-columns: 1fr; gap: 14px; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .invoice-doc { padding: 22px; }
  .pd-gallery .main-img { height: 280px; }
  .cat-card { min-height: 250px; }
}

/* print (invoices) */
@media print {
  .admin-side, .admin-topbar .actions, .btn, .site-header, .site-footer { display: none !important; }
  body, body.admin { background: var(--white); }
  .invoice-doc { border: 0; box-shadow: none; max-width: none; }
}
