@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --bg: #20252d;
  --bg2: #2a313a;
  --card: #333b45;
  --card-hi: #414b57;
  --ink: #eef3f7;
  --muted: #c2cdd8;
  --steel: #b3bdc8;
  --brand: #ff6b1a;
  --brand-hi: #ff9a4d;
  --brand-dark: #b34a00;
  --accent: #ffc400;
  --danger: #e05252;
  --ok: #4caf7d;
  --border: #525d68;
  --border-hi: #707c88;
  --radius: 8px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(1200px 500px at 50% -8%, rgba(255,255,255,0.13), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #28303a 0%, #181d24 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand-hi); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Header : gunmetal bar ---------- */
.site-header {
  background: linear-gradient(180deg, #4a545f 0%, #31383f 60%, #242b33 100%);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 108px; }
.logo { display: flex; align-items: center; }
.logo:hover { text-decoration: none; }
.logo img { display: block; height: 88px; width: auto; }
.logo-tagline { font-family: var(--font-head); font-weight: 600; font-size: 13px; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--border-hi); padding-left: 16px; margin-left: 4px; }
.logo { display: flex; align-items: center; gap: 12px; }
.header-slogan { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-hi); text-shadow: 0 2px 8px rgba(0,0,0,0.4); white-space: nowrap; }
.site-header nav a { color: #c6d0da; margin-left: 22px; font-weight: 600; font-family: var(--font-head); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.site-header nav a:hover { color: var(--brand-hi); text-decoration: none; }
.cart-count {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand));
  color: #1a1206; font-size: 12px; font-weight: 800;
  text-align: center; vertical-align: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ---------- Hero : truck photo + dark steel ---------- */
.hero {
  position: relative;
  color: #fff; padding: 110px 0 100px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10,12,14,0.55) 0%, rgba(10,12,14,0.3) 45%, rgba(10,12,14,0.7) 100%),
    url('/images/hero-truck.jpg') center 32% / cover no-repeat,
    #181d22;
  border-bottom: 1px solid #000;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.6);
}
.hero-kicker {
  display: inline-block; font-family: var(--font-head); font-size: 13px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--brand-hi); margin-bottom: 14px;
  border: 1px solid #4a4038; padding: 6px 14px; border-radius: 4px;
  background: rgba(0,0,0,0.35);
}
.hero h1 {
  margin: 0 0 14px; font-size: 58px; line-height: 1.08; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #cfd8e0 38%, #79838f 50%, #eef2f6 53%, #a7b1bc 78%, #e2e8ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
.hero p { margin: 0 0 28px; font-size: 18px; color: #d3dce5; max-width: 600px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ---------- Photo banner : highway ---------- */
.banner {
  position: relative; padding: 96px 0; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8,10,12,0.94) 0%, rgba(8,10,12,0.62) 50%, rgba(8,10,12,0.2) 100%),
    url('/images/banner-highway.jpg') center / cover no-repeat,
    #1b212a;
  border-top: 1px solid #000; border-bottom: 1px solid #000;
}
.banner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
}
.banner h2 {
  margin: 0 0 12px; font-size: 36px; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #cfd8e0 38%, #79838f 50%, #eef2f6 53%, #a7b1bc 78%, #e2e8ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
.banner h2::before { display: none; }
.banner p { margin: 0 0 24px; font-size: 17px; color: #d3dce5; max-width: 520px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ---------- Buttons : machined metal ---------- */
.btn {
  display: inline-block; border: 1px solid var(--brand-dark); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 6px; color: #1c1105;
  background: linear-gradient(180deg, var(--brand-hi) 0%, var(--brand) 48%, #e05e00 52%, var(--brand) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 6px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #1c1105; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0,0,0,0.35); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary {
  background: linear-gradient(180deg, #4a545e 0%, #333b44 48%, #23282f 52%, #2e353d 100%);
  border-color: #10141a; color: #e9eef3; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.btn-secondary:hover { color: #fff; filter: brightness(1.12); }
.btn-featured-on {
  background: linear-gradient(180deg, #f7b733 0%, #e8930c 48%, #c97606 52%, #e8a013 100%);
  border-color: #7a4d05; color: #231603; text-shadow: 0 1px 0 rgba(255,255,255,0.35); font-weight: 700;
}
.btn-outline { background: rgba(255,255,255,0.04); color: var(--brand-hi); border: 2px solid var(--brand); box-shadow: none; text-shadow: none; }
.btn-outline:hover { background: rgba(255,107,26,0.14); color: var(--brand-hi); }
.btn-danger {
  background: linear-gradient(180deg, #e06565 0%, #c0392b 50%, #96281b 100%);
  border-color: #5e150c; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.btn-danger:hover { color: #fff; filter: brightness(1.1); }
.btn-small { padding: 9px 16px; font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section h2 {
  margin: 0 0 22px; font-size: 24px; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.section h2::before {
  content: ""; width: 8px; height: 26px; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand-dark));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  clip-path: polygon(0 0, 100% 4px, 100% 100%, 0 calc(100% - 4px));
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* ---------- Product card : steel plate + rivets ---------- */
.card {
  background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 30%, #20262e 100%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 6px 16px rgba(0,0,0,0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand-dark); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 10px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,107,26,0.25); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 3.5px at 12px 12px, #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at calc(100% - 12px) 12px, #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at 12px calc(100% - 12px), #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at calc(100% - 12px) calc(100% - 12px), #7d8792 55%, #20252b 60%, transparent 68%);
  opacity: 0.9;
}
.card img { width: 100%; height: 180px; object-fit: cover; background: #0c0f12; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 16px; margin: 0; font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand-hi); }
.card-meta { color: var(--muted); font-size: 13px; }
.card-price {
  font-size: 22px; font-weight: 700; margin-top: auto; font-family: var(--font-head); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 20%, #ffb37a 60%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.badge-sample {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #151515 10px 20px);
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 4px; text-shadow: 0 1px 2px #000;
  border: 1px solid #000;
}
.badge-out { background: #5b636d; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; display: inline-block; letter-spacing: 0.06em; }
.badge-pickup { background: #8a5a12; color: #ffe9c2; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; display: inline-block; letter-spacing: 0.04em; white-space: nowrap; vertical-align: 1px; }

/* Shipping info line on product detail pages */
.ship-info { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--ok); padding: 8px 12px; border-radius: 6px; margin: 10px 0; font-size: 14px; }
.ship-pickup { border-left-color: var(--accent); }

/* ---------- Category chips : metal plates ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: linear-gradient(180deg, #363e47 0%, #262c34 100%);
  border: 1px solid var(--border-hi);
  border-radius: 6px; padding: 14px 24px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 8px rgba(0,0,0,0.4);
}
.chip:hover { border-color: var(--brand); color: var(--brand-hi); text-decoration: none; transform: translateY(-2px); }

/* ---------- Toolbar / forms : dark steel ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px;
  background: linear-gradient(180deg, #2b323b, #20262d);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 10px rgba(0,0,0,0.35);
}
.toolbar input[type="search"] { flex: 1; min-width: 180px; }
.toolbar select { width: auto; }
.toolbar input[type="search"], .toolbar select, .form input, .form select, .form textarea,
.qty-row input, .cart-table input[type="number"] {
  font-size: 15px; padding: 10px 12px; border-radius: 6px; width: 100%;
  background: #0f1317; border: 1px solid #3a434d; color: var(--ink);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
  font-family: var(--font-body);
}
.toolbar input:focus, .form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,107,26,0.25);
}
.results-count { color: var(--muted); font-size: 14px; }

/* ---------- Product detail ---------- */
.detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #1f252c);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
  position: relative;
}
.detail img { width: 100%; border-radius: 6px; background: #0c0f12; border: 1px solid var(--border); }
.detail h1 { margin-top: 0; font-size: 30px; }
.detail .price {
  font-size: 34px; font-family: var(--font-head); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 20%, #ffb37a 60%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fitment { white-space: pre-line; background: #0f1317; border: 1px solid var(--border); border-radius: 6px; padding: 12px; color: var(--muted); }
.qty-row { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.qty-row input { width: 70px; text-align: center; font-size: 16px; padding: 10px; }
.stock-ok { color: var(--ok); font-weight: 700; }
.stock-low { color: var(--accent); font-weight: 700; }
.stock-out { color: var(--danger); font-weight: 700; }

/* ---------- Cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: linear-gradient(180deg, #28303a, #1f252c); border: 1px solid var(--border-hi); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
.cart-table th { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--steel); background: rgba(0,0,0,0.3); }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cart-table input[type="number"] { width: 64px; padding: 8px; }
.cart-total { text-align: right; font-size: 22px; font-weight: 700; margin: 16px 0; font-family: var(--font-head); letter-spacing: 0.04em; }
.link-danger { color: var(--danger); cursor: pointer; background: none; border: 0; font-size: 14px; padding: 0; }
.link-danger:hover { text-decoration: underline; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.panel {
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #1f252c);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
}
.panel h2 { margin-top: 0; font-size: 19px; }
.form label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; font-weight: 600; border: 1px solid; }
.notice-warn { background: rgba(255,196,0,0.1); border-color: #8a6d00; color: #ffd75e; }
.notice-error { background: rgba(224,82,82,0.1); border-color: #7c2b2b; color: #ff9c9c; }
.notice-ok { background: rgba(76,175,125,0.1); border-color: #2c6e4e; color: #8fe0b4; }
#card-element { border: 1px solid #3a434d; border-radius: 6px; padding: 12px; background: #0f1317; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; border-top: 2px solid var(--border-hi); margin-top: 10px; padding-top: 12px; font-family: var(--font-head); letter-spacing: 0.04em; }
.summary-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ---------- Success ---------- */
.success-box {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #1f252c);
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
}
.success-box .order-no { font-size: 28px; font-weight: 700; color: var(--brand-hi); letter-spacing: 2px; font-family: var(--font-head); }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tabs button {
  padding: 10px 20px; border: 1px solid var(--border-hi); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(180deg, #363e47, #262c34); color: var(--ink); border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.admin-tabs button.active {
  background: linear-gradient(180deg, var(--brand-hi), var(--brand) 55%, #e05e00);
  color: #1c1105; border-color: var(--brand-dark); text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
/* Sidebar dropdown groups: the second-level navigation for Reports,
   Inventory and Customers lives in the left sidebar under each main tab
   button (pill-shaped children, one size smaller, same language as
   .admin-tabs). JS toggles the child list via inline display; the caret
   on the group header flips while the group is expanded. */
.admin-tabs .nav-group { display: flex; flex-direction: column; gap: 8px; }
.admin-tabs .nav-children { display: flex; flex-direction: column; gap: 4px; margin-left: 14px; }
.admin-tabs .nav-children button {
  padding: 6px 14px; font-size: 12.5px; letter-spacing: 0.03em; text-transform: none;
  border-radius: 20px; background: linear-gradient(180deg, #2e353e, #21262d);
}
.admin-tabs .nav-caret { display: inline-block; font-size: 11px; transition: transform 0.15s ease; }
.admin-tabs button.expanded .nav-caret { transform: rotate(180deg); }
.data-table { width: 100%; border-collapse: collapse; background: #171c21; border: 1px solid var(--border-hi); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.data-table th, .data-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { background: rgba(0,0,0,0.35); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--steel); }
.data-table img.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid; }
.st-active, .st-paid, .st-completed { background: rgba(76,175,125,0.14); color: #8fe0b4; border-color: #2c6e4e; }
.st-inactive, .st-cancelled { background: rgba(224,82,82,0.14); color: #ff9c9c; border-color: #7c2b2b; }
.st-pending { background: rgba(255,196,0,0.12); color: #ffd75e; border-color: #8a6d00; }
.st-shipped { background: rgba(255,107,26,0.12); color: #ffb37a; border-color: #8a4a00; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; }
.modal {
  background: linear-gradient(180deg, #232a32, #181d23); border: 1px solid var(--border-hi);
  border-radius: var(--radius); padding: 28px; width: 100%; max-width: 640px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
}
.modal h2 { margin-top: 0; }
.login-box { max-width: 420px; margin: 80px auto; }
.img-preview { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border-hi); margin-top: 8px; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #14181d, #0a0d0f);
  border-top: 3px solid var(--brand);
  color: #8b95a1; margin-top: 60px; padding: 36px 0; font-size: 14px;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: -13px; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
}
.site-footer a { color: var(--brand-hi); }
.site-footer strong { color: #fff; font-family: var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; }

/* Pickup / ignition animation section (real truck photo) */
.pickup { background: linear-gradient(180deg, #1c222b, #12161c); border-top: 1px solid #000; padding: 64px 0; }
.pickup-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.pickup-art { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-hi); box-shadow: 0 0 40px rgba(255,220,120,0.08); aspect-ratio: 1 / 1; max-height: 440px; width: 100%; }
.ignition { position: absolute; inset: 0; }
.ignition img { width: 100%; height: 100%; object-fit: cover; display: block; animation: ign-photo 7s ease-in-out infinite; }
.ign-glow { position: absolute; width: 30%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,252,235,0.9) 0%, rgba(255,240,200,0.35) 42%, transparent 68%); mix-blend-mode: screen; opacity: 0; animation: ign-lights 7s ease-in-out infinite; pointer-events: none; }
.ign-flash { position: absolute; inset: 0; background: radial-gradient(circle at 30% 64%, rgba(255,250,225,0.55), transparent 60%); opacity: 0; animation: ign-flash 7s ease-in-out infinite; pointer-events: none; }
.pickup-text h2 { margin: 0 0 12px; font-size: 34px; letter-spacing: 0.05em; color: var(--brand-hi); }
.pickup-text p { color: var(--text-dim); margin: 0 0 14px; font-size: 16px; }
.pickup-addr { font-family: var(--font-head); font-size: 21px !important; font-weight: 700; color: #fff !important; letter-spacing: 0.05em; }
@keyframes ign-photo {
  0%, 24% { filter: brightness(0.42) saturate(0.85); }
  27% { filter: brightness(1.08) saturate(1.05); }
  29% { filter: brightness(0.5) saturate(0.9); }
  31% { filter: brightness(1.12); }
  33% { filter: brightness(0.62); }
  36%, 88% { filter: brightness(1) saturate(1); }
  100% { filter: brightness(0.42) saturate(0.85); }
}
@keyframes ign-lights {
  0%, 24% { opacity: 0; }
  27% { opacity: 1; }
  29% { opacity: 0.12; }
  31% { opacity: 1; }
  33% { opacity: 0.35; }
  36%, 88% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ign-flash {
  0%, 26% { opacity: 0; }
  27.5% { opacity: 0.5; }
  29.5% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ignition img, .ign-glow, .ign-flash { animation: none; }
  .ignition img { filter: brightness(1); }
  .ign-glow { opacity: 1; }
}
@media (max-width: 760px) {
  .pickup-inner { grid-template-columns: 1fr; }
  .pickup-art { max-height: 340px; }

  /* ---- Header / nav ---- */
  .header-inner { height: auto; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  .logo img { height: 48px; }
  .logo-tagline { font-size: 10px; padding-left: 10px; }
  .header-slogan { display: none; }
  .site-header nav { display: flex; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .site-header nav a { margin-left: 0; margin-right: 18px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }

  /* ---- Hero / sections ---- */
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .section { padding: 28px 0; }
  .section h2 { font-size: 20px; }

  /* ---- Product grid: 2 columns on mobile ---- */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card img { height: 130px; }
  .card-body { padding: 10px; }
  .card-title { font-size: 13px; }
  .card-actions { flex-direction: column; }
  .card-actions .btn { width: 100%; text-align: center; }

  /* ---- Product detail: stack vertically ---- */
  .detail { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .detail h1 { font-size: 22px; }

  /* ---- Checkout: single column ---- */
  .checkout-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  #delivery-method-wrap { flex-direction: column !important; }
  #delivery-method-wrap label { width: 100%; }
  .form input, .form select, .form textarea { font-size: 16px; }

  /* ---- Cart table -> stacked cards ---- */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { border-bottom: 2px solid var(--border-hi); padding: 8px 0; }
  .cart-table td { border: 0; padding: 6px 12px; }
  .cart-table td:first-child { float: left; margin-right: 12px; }
  .cart-total { font-size: 19px; }

  /* ---- Admin: tables scroll, sidebar becomes top bar ---- */
  #dashboard-view > div[style*="display:flex"] { flex-direction: column !important; }
  .admin-tabs { flex-direction: row !important; min-width: 0 !important; position: static !important; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 12px !important; }
  .admin-tabs button { flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 10px 14px; }
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .data-table th, .data-table td { white-space: nowrap; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input, .toolbar select { width: 100% !important; min-width: 0; margin-left: 0 !important; }

  /* ---- Sales summary cards: 2 per row ---- */
  #sales-summary { grid-template-columns: repeat(2, 1fr) !important; }

  /* ---- Modal / misc ---- */
  .modal-backdrop { padding: 20px 12px; }
  .modal { width: 100%; }
  .success-box .order-no { font-size: 20px; letter-spacing: 1px; word-break: break-all; }

  /* ---- Touch targets: min 44px ---- */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-small { min-height: 44px; padding: 10px 16px; }
  .site-header nav a { padding: 10px 0; }
  input[type="checkbox"], input[type="radio"] { min-width: 20px; min-height: 20px; }
}

/* Variant selector (e.g. Pair / Driver Side / Passenger Side) */
.variant-block { margin: 14px 0 4px; }
.variant-title { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.variant-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-pill {
  display: inline-block; padding: 9px 16px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.04em;
  color: var(--ink); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-hi); text-decoration: none; cursor: pointer;
}
a.variant-pill:hover { border-color: var(--brand-hi); color: #fff; text-decoration: none; }
.variant-pill.active {
  color: #1c1105; border-color: var(--brand-dark);
  background: linear-gradient(180deg, var(--brand-hi) 0%, var(--brand) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.4);
  cursor: default;
}

/* v4.20 sale pricing */
.price-was { text-decoration: line-through; opacity: .55; font-weight: 400; }
.price-now { color: #ff5a3c; font-weight: 800; }
.badge-sale { background: #d43a2f; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; vertical-align: middle; letter-spacing: .03em; }
.badge-sale-card { position: absolute; top: 8px; right: 8px; z-index: 2; }
.save-line { color: #ff5a3c; font-weight: 700; margin: 2px 0 8px; }
.sale-banner { background: linear-gradient(90deg, #d43a2f, #f97316); color: #fff; text-align: center; font-weight: 700; padding: 9px 12px; font-size: 15px; letter-spacing: .02em; }
.sale-cond { font-size: 11px; opacity: .8; font-weight: 600; }

/* v4.21 inventory & customers */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.inv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.inv-card { background: var(--bg2); border: 1px solid var(--border-hi); border-radius: 8px; padding: 12px 16px; }
.inv-card-num { font-size: 22px; font-weight: bold; }
.inv-section { border-top: 1px solid var(--border-hi); margin-top: 26px; padding-top: 6px; }
.inv-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.po-picker { position: relative; display: inline-block; }
.po-search { width: 300px; }
/* Stock-in lines: everything on ONE row (picker flexes, the rest compact).
   Only stock-in lines carry .po-line; other .inv-line forms still wrap. */
.po-line { flex-wrap: nowrap; }
.po-line .po-picker { flex: 1 1 auto; min-width: 170px; }
.po-line .po-search { width: 100%; }
.po-line .po-warehouse, .po-line .po-location { flex: 0 1 175px; min-width: 105px; }
.po-line .po-qty, .po-line .po-cost { flex: 0 0 auto; }
.po-line .btn { flex: 0 0 auto; }
.po-results { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 320px; max-width: 92vw; max-height: 260px; overflow-y: auto; background: var(--card); border: 1px solid var(--border-hi); border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,0.5); }
.po-result { padding: 8px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-result:hover { background: var(--card-hi); }
.po-noresult { padding: 8px 10px; color: var(--muted); }
.inv-lookup-input { width: 100%; max-width: 560px; font-size: 19px; padding: 12px; }
/* Lookup results: ONE line per product, slide sideways for the wide columns.
   Only the lookup table carries .lk-table; other tables keep wrapping.
   The scroll box is height-bounded with its own vertical scroll, so the
   bottom horizontal scrollbar is never farther than the visible region;
   the header row sticks to the top of the box; and a mirrored scrollbar
   strip above the table (.lk-topscroll, two-way synced in admin.js) gives
   a second, always-reachable horizontal drag handle. */
.lk-scroll { max-width: 100%; max-height: 68vh; overflow-y: auto; scrollbar-width: thin; }
.lk-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.lk-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 5px; }
.lk-scroll::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 5px; }
.lk-topscroll { max-width: 100%; height: 14px; margin-bottom: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.lk-topscroll-inner { height: 1px; }
.lk-topscroll::-webkit-scrollbar { height: 10px; }
.lk-topscroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 5px; }
.lk-topscroll::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 5px; }
.lk-table { width: max-content; min-width: 100%; }
.lk-table th, .lk-table td { white-space: nowrap; vertical-align: middle; }
.lk-table thead th { position: sticky; top: 0; z-index: 3; background: #0f1215; }
.lk-table .lk-name { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.lk-table .lk-batches { max-width: 460px; overflow: hidden; text-overflow: ellipsis; }
.inv-warn { background: #4a2f12; border: 1px solid #b97c1e; color: #ffd9a0; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.inv-sticky-bar { position: sticky; bottom: 0; background: var(--bg2); border-top: 1px solid var(--border-hi); padding: 10px 0; margin-top: 10px; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; vertical-align: middle; letter-spacing: .02em; background: var(--bg2); border: 1px solid var(--border-hi); }
.chip-paid { background: #14532d; color: #bbf7d0; border-color: #166534; }
.chip-confirmed { background: #1e3a5f; color: #bfdbfe; border-color: #2563eb; }
.chip-partial { background: #713f12; color: #fde68a; border-color: #a16207; }
.chip-unpaid { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
.chip-onetime { background: #581c87; color: #e9d5ff; border-color: #7e22ce; }
.chip-low { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
.low-row td { background: rgba(185, 28, 28, 0.12); }
.inv-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.inv-steps .step { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-hi); color: var(--muted); font-size: 13px; font-weight: 600; }
.inv-steps .step-on { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: #1c1105; border-color: var(--brand-dark); }
.inv-steps .step-cancelled { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
.inv-steps .step-arrow { color: var(--muted); }
@media (max-width: 760px) {
  .inv-lookup-input { font-size: 17px; }
  .inv-line select, .inv-line input { max-width: 46vw; }
  .inv-cards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media print {
  body * { visibility: hidden; }
  #statement-print, #statement-print * { visibility: visible; }
  #statement-print { display: block !important; position: absolute; top: 0; left: 0; width: 100%; color: #000; background: #fff; padding: 24px; }
}

/* ---------- v4.21 admin: light theme + full width ----------
   Admin pages carry class="admin-page" on <body>; EVERY rule in this
   section is scoped under body.admin-page, so the public storefront
   (same stylesheet) keeps the dark steel theme above, untouched.
   The re-skin works three ways: (1) the shared design tokens flip to
   light values inside the admin subtree, so every var()-based surface
   (cards, panels, chips, muted text) follows automatically; (2) the
   components whose dark colors were hard-coded (tables, tabs, modal,
   inputs, notices, pills) get scoped light overrides; (3) the admin
   content wrapper drops its max-width cap and fills the viewport. */
body.admin-page {
  --bg: #e9edf1;
  --bg2: #ffffff;
  --card: #ffffff;
  --card-hi: #eef1f4;
  --ink: #1c2630;
  --muted: #5a6a78;
  --steel: #43566a;
  --border: #ccd4db;
  --border-hi: #a7b4c0;
  --danger: #c62f2f;
  --ok: #1e7d4f;
  background: linear-gradient(180deg, #fafbfc 0%, #e7ecef 100%);
  background-attachment: fixed;
}

/* Full width: sidebar + content fill the viewport, modest side padding */
body.admin-page .container { max-width: none; padding: 0 20px; }

/* Header bar (shared component, re-lit only inside admin) */
body.admin-page .site-header {
  background: linear-gradient(180deg, #ffffff 0%, #e9edf1 100%);
  box-shadow: 0 1px 8px rgba(25,40,55,0.14), inset 0 1px 0 #ffffff;
}
body.admin-page .site-header nav a { color: #3d4d5c; }
body.admin-page .site-header nav a:hover { color: #b34a00; }
body.admin-page .header-slogan { color: #c2510a; text-shadow: none; }
body.admin-page .logo-tagline { color: var(--muted); border-left-color: #c3ced6; }

/* Links: the storefront orange is too pale on white — deepen in admin */
body.admin-page a { color: #b34a00; }
body.admin-page a:hover { color: #8a3a00; }

/* Panels & cards (hard-coded dark gradient tails re-lit) */
body.admin-page .panel {
  background: linear-gradient(180deg, #ffffff, #f4f6f8);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 8px rgba(25,40,55,0.08);
}
body.admin-page .card {
  background: linear-gradient(180deg, #ffffff, #eef1f4);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 8px rgba(25,40,55,0.08);
}
body.admin-page .card img { background: #e3e8ed; }
body.admin-page .card-price { background: none; color: #c2510a; }
body.admin-page .toolbar {
  background: linear-gradient(180deg, #ffffff, #eef1f4);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(25,40,55,0.07);
}

/* Form controls: white inputs, dark text, light borders everywhere in
   admin — the grouped rule re-lights the shared dark input style, the
   plain rule catches the bare inputs/selects the admin uses elsewhere */
body.admin-page .toolbar input[type="search"], body.admin-page .toolbar select,
body.admin-page .form input, body.admin-page .form select, body.admin-page .form textarea,
body.admin-page .qty-row input, body.admin-page .cart-table input[type="number"],
body.admin-page #card-element {
  background-color: #ffffff; border-color: #aeb9c4; color: var(--ink);
  box-shadow: inset 0 1px 3px rgba(25,40,55,0.08);
}
body.admin-page input, body.admin-page select, body.admin-page textarea {
  background-color: #ffffff; color: var(--ink);
  border: 1px solid #aeb9c4; border-radius: 4px;
}
body.admin-page input:focus, body.admin-page select:focus, body.admin-page textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: inset 0 1px 3px rgba(25,40,55,0.08), 0 0 0 2px rgba(255,107,26,0.30);
}
body.admin-page ::placeholder { color: #8494a3; opacity: 1; }

/* Buttons: primary orange + danger stay; the dark steel variants go light */
body.admin-page .btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #e6ebef 48%, #d8dfe5 52%, #e2e8ed 100%);
  border-color: #93a3b1; color: #22303c; text-shadow: none;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(25,40,55,0.12);
}
body.admin-page .btn-secondary:hover { color: #101c26; }
body.admin-page .btn-outline { background: rgba(255,107,26,0.05); color: #b34a00; box-shadow: none; }
body.admin-page .btn-outline:hover { background: rgba(255,107,26,0.13); color: #8a3a00; }

/* Sidebar tabs + dropdown children (active keeps the orange gradient;
   this block's order matters — the active rule follows the child rule
   at equal specificity so the current item stays orange) */
body.admin-page .admin-tabs button {
  background: linear-gradient(180deg, #ffffff, #e3e8ed);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(25,40,55,0.10);
}
body.admin-page .admin-tabs .nav-children button {
  background: linear-gradient(180deg, #f7f9fb, #e8edf1);
}
body.admin-page .admin-tabs button.active {
  background: linear-gradient(180deg, var(--brand-hi), var(--brand) 55%, #e05e00);
  color: #1c1105; border-color: var(--brand-dark); text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* Tables: white body, pale header band, dark slate header text */
body.admin-page .data-table { background: #ffffff; box-shadow: 0 2px 6px rgba(25,40,55,0.06); }
body.admin-page .data-table th { background: #edf1f5; color: #43566a; }
body.admin-page .lk-table thead th { background: #edf1f5; }
body.admin-page .cart-table { background: #ffffff; }
body.admin-page .cart-table th { background: #edf1f5; }

/* Modals */
body.admin-page .modal-backdrop { background: rgba(30,42,54,0.45); }
body.admin-page .modal {
  background: linear-gradient(180deg, #ffffff, #f2f5f7);
  box-shadow: 0 20px 50px rgba(25,40,55,0.28), inset 0 1px 0 #ffffff;
}

/* Notices / status pills / chips: pale tints with dark, readable text */
body.admin-page .notice-warn { background: #fdf6e0; border-color: #d9b23c; color: #7a5b00; }
body.admin-page .notice-error { background: #fdeeee; border-color: #d98c8c; color: #962222; }
body.admin-page .notice-ok { background: #e8f7ee; border-color: #7fb98f; color: #14663e; }
body.admin-page .st-active, body.admin-page .st-paid, body.admin-page .st-completed { background: rgba(30,125,79,0.12); color: #14663e; border-color: #7fb98f; }
body.admin-page .st-inactive, body.admin-page .st-cancelled { background: rgba(198,47,47,0.10); color: #a52a2a; border-color: #e09a9a; }
body.admin-page .st-pending { background: rgba(217,164,0,0.14); color: #7a5b00; border-color: #dcb25e; }
body.admin-page .st-shipped { background: rgba(255,107,26,0.12); color: #a34d00; border-color: #e8a468; }
body.admin-page .chip-paid { background: #dcf2e3; color: #14532d; border-color: #7fb98f; }
body.admin-page .chip-confirmed { background: #dbeafe; color: #1e3a5f; border-color: #93c5fd; }
body.admin-page .chip-partial { background: #fdf0d5; color: #7a4d00; border-color: #dcb25e; }
body.admin-page .chip-unpaid { background: #fbe3e3; color: #7f1d1d; border-color: #e09a9a; }
body.admin-page .chip-onetime { background: #f0e4fb; color: #581c87; border-color: #c4a3e8; }
body.admin-page .chip-low { background: #fbe3e3; color: #7f1d1d; border-color: #e09a9a; }
body.admin-page .inv-warn { background: #fff3d6; border-color: #d9a514; color: #7c5200; }
body.admin-page .inv-steps .step-cancelled { background: #fbe3e3; color: #8f1d1d; border-color: #e09a9a; }

/* Lookup scrollbars: pale tracks on the light surface */
body.admin-page .lk-scroll::-webkit-scrollbar-track, body.admin-page .lk-topscroll::-webkit-scrollbar-track { background: rgba(25,40,55,0.10); }
body.admin-page .lk-scroll, body.admin-page .lk-topscroll { scrollbar-color: #a7b4c0 rgba(25,40,55,0.08); }

/* Product-form video upload track (hard-coded #2a2a2a inline in admin.html) */
body.admin-page div[style*="background:#2a2a2a"] { background: #dde4ea !important; }

/* Lookup stock-distribution detail row (expands under the product row):
   readable wrapped text on a pale band, nested table sized to content */
body.admin-page .lk-table .lk-detail-row > td { white-space: normal; background: #f2f6f9; }
body.admin-page .lk-dist-table { width: auto; margin-top: 6px; }
body.admin-page .lk-batch-btn.active { outline: 2px solid var(--brand, #e8760c); }

/* Order / manual-sale inline detail expansions (Item E): pale band under
   the list row, content left readable and unwrapped */
body.admin-page .ord-detail-row > td, body.admin-page .ms-detail-row > td { white-space: normal; background: #f2f6f9; }

/* Reserved-by expansion trigger (Item G): same active outline as the
   distribution trigger it shares the detail row with */
body.admin-page .lk-resv-btn.active { outline: 2px solid var(--brand, #e8760c); }

/* Reserved summary card (Inventory dashboard): nonzero 已占用 is a door
   to the 占用中 panel — pointer + brand affordances, the same orange as
   the clickable Reserved figures in the Lookup table */
body.admin-page .inv-card-link { cursor: pointer; }
body.admin-page .inv-card-link:hover { border-color: var(--brand, #e8760c); }
body.admin-page .inv-card-link .inv-card-num { color: #c2510a; }

/* ---------- v4.21 admin: larger form controls + order printout ----------
   Two additions; the storefront is untouched (every screen rule below
   is scoped under body.admin-page, and the print rules only fire for
   the admin's print sheet).
   (1) Form controls grow up: the admin's bare inputs/selects used to
   ride on the browser default (~13px text, ~23px tall, 4px corners —
   only their border/background were themed). They now share one calm
   spec: 42px tall, 15px text, comfortable padding, 8px corners, a
   soft neutral border over a near-white surface, and the brand-orange
   focus ring. Controls living inside data-table cells (stock-count
   sheet, returns-resale rows, Lookup detail editors) get a slightly
   shorter 38px / 14px variant so table rows stay workable; the Lookup
   filter keeps its larger 19px voice. Checkboxes, radios and file
   inputs keep their native sizing. Line rows (.inv-line / .po-line)
   are flex rows, so taller controls just make the row taller — no
   new wrapping on desktop widths.
   (2) The order printout sheet (#order-print in admin.html, filled by
   admin.js printWebOrder/printMsSale) — the same print mechanism as
   the supplier statement: the base @media print rule hides the page,
   this block shows only the document, black on white. */
body.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body.admin-page select,
body.admin-page textarea {
  font-size: 15px;
  line-height: 1.4;
  padding: 0 12px;
  border: 1px solid #b3bfc9;
  border-radius: 8px;
  background-color: #fcfdfe;
  box-shadow: inset 0 1px 2px rgba(25,40,55,0.05);
}
body.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body.admin-page select {
  height: 42px;
}
body.admin-page textarea { height: auto; min-height: 78px; padding: 10px 12px; }
body.admin-page .data-table input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body.admin-page .data-table select {
  height: 38px; padding: 0 10px; font-size: 14px;
}
body.admin-page input.inv-lookup-input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]) {
  height: 52px; font-size: 19px; padding: 0 14px;
}
body.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
body.admin-page select:focus,
body.admin-page textarea:focus {
  border-color: var(--brand);
  background-color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(25,40,55,0.05), 0 0 0 3px rgba(255,107,26,0.25);
  outline: none;
}

@media print {
  #order-print, #order-print * { visibility: visible; }
  #order-print {
    display: block !important; position: absolute; top: 0; left: 0; width: 100%;
    color: #000; background: #fff; padding: 24px;
    font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.45;
  }
  #order-print:empty { display: none !important; }
  #order-print h1 { font-family: Arial, Helvetica, sans-serif; font-size: 25px; text-transform: none; letter-spacing: 0; margin: 0 0 2px; }
  #order-print h2 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-transform: none; letter-spacing: 0; margin: 18px 0 6px; }
  #order-print p { margin: 4px 0; }
  #order-print .op-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
  #order-print .op-table th, #order-print .op-table td { border: 1px solid #444; padding: 6px 8px; font-size: 13px; text-align: left; vertical-align: top; }
  #order-print .op-table thead { display: table-header-group; }
  #order-print .op-table tr { page-break-inside: avoid; }
  #order-print .op-table td.op-num { text-align: right; }
  #order-print .op-pay { display: inline-block; border: 3px solid #000; padding: 6px 18px; font-size: 20px; font-weight: 700; letter-spacing: 0.05em; margin: 12px 0 4px; }
  #order-print .op-totals { width: 300px; margin-left: auto; border-collapse: collapse; }
  #order-print .op-totals td { padding: 3px 0 3px 18px; text-align: right; font-size: 14px; }
  #order-print .op-totals td:first-child { text-align: left; padding-left: 0; }
  #order-print .op-totals .op-grand td { border-top: 2px solid #000; font-weight: 700; font-size: 16px; padding-top: 7px; }
  #order-print .op-foot { margin-top: 28px; border-top: 1px solid #999; padding-top: 10px; font-size: 13px; }
  /* Supplier settlement statement 核算单 (#settle-print) — third sheet
     on the same mechanism: only the filled sheet is ever non-empty. */
  #settle-print, #settle-print * { visibility: visible; }
  #settle-print {
    display: block !important; position: absolute; top: 0; left: 0; width: 100%;
    color: #000; background: #fff; padding: 24px;
    font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.45;
  }
  #settle-print:empty { display: none !important; }
  #settle-print h1 { font-family: Arial, Helvetica, sans-serif; font-size: 25px; text-transform: none; letter-spacing: 0; margin: 0 0 2px; }
  #settle-print h2 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-transform: none; letter-spacing: 0; margin: 18px 0 6px; }
  #settle-print p { margin: 4px 0; }
  #settle-print .st-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
  #settle-print .st-table th, #settle-print .st-table td { border: 1px solid #444; padding: 6px 8px; font-size: 13px; text-align: left; vertical-align: top; }
  #settle-print .st-table thead { display: table-header-group; }
  #settle-print .st-table tr { page-break-inside: avoid; }
  #settle-print .st-sign { margin-top: 44px; }
  #settle-print .st-sign div { margin-top: 30px; font-size: 14px; }
  /* Movement ledger 出入库流水 (#mv-print) — fourth sheet on the same
     mechanism: only the filled sheet is ever non-empty. */
  #mv-print, #mv-print * { visibility: visible; }
  #mv-print {
    display: block !important; position: absolute; top: 0; left: 0; width: 100%;
    color: #000; background: #fff; padding: 24px;
    font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.45;
  }
  #mv-print:empty { display: none !important; }
  #mv-print h1 { font-family: Arial, Helvetica, sans-serif; font-size: 25px; text-transform: none; letter-spacing: 0; margin: 0 0 2px; }
  #mv-print h2 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-transform: none; letter-spacing: 0; margin: 18px 0 6px; }
  #mv-print p { margin: 4px 0; }
  #mv-print .mv-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
  #mv-print .mv-table th, #mv-print .mv-table td { border: 1px solid #444; padding: 6px 8px; font-size: 12.5px; text-align: left; vertical-align: top; }
  #mv-print .mv-table thead { display: table-header-group; }
  #mv-print .mv-table tr { page-break-inside: avoid; }
}
