/* ===== TSU Theme & variables ===== */
:root {
  --accent: #0576e5;        /* TSU primary blue — header/footer bar */
  --accent-light: #14c4ee;  /* TSU lighter blue — links, row hover */
  --stripe: #e9b902;        /* TSU yellow — thin brand stripe */
  --primary: #0576e5;       /* buttons (Confirm/Done) — match header */
  --primary-inverse: #ffffff;
  color-scheme: light !important;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* TSU yellow brand stripe */
.brandbar { height: 2px; background: var(--stripe); }

/* Full-width header — blue bg, yellow border-bottom frames the brand */
.site-header {
  background: var(--accent);
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--stripe);
}
.site-header__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
}
.site-logo {
  display: block;
  height: 55px;
  width: auto;
}

/* Footer — same blue, yellow top border for symmetry */
.site-footer {
  background: var(--accent);
  color: #fff;
  border-top: 2px solid var(--stripe);
}
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  text-align: center;
}

.container {
  max-width: 1200px;
  flex: 1;
}

.title-block { margin: 18px 0 12px; }

/* Product SKU card — distinct TSU touch */
.product-card {
  background: color-mix(in oklab, var(--accent) 6%, #fff);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, #fff);
  border-left: 4px solid var(--stripe);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 18px;
  font-size: 0.95rem;
}
.product-card strong { color: var(--accent); }
.product-card .sku { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }

.instructions {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, #000);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

form.inline-form {
  display: flex !important;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem; /* breathing room so native datalist popup doesn't overlap Pending Orders */
}
form.inline-form input[list] {
  width: auto !important;
  min-width: 240px !important;
  max-width: 280px !important;
  flex: 0 0 auto !important;
}
form.inline-form input[type="number"] {
  width: auto !important;
  max-width: 110px !important;
  flex: 0 0 auto !important;
}
form.inline-form button[type="submit"] {
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem; border-bottom: 1px solid #2c2f36; }
td.num { text-align: right; }
td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
td.nowrap { white-space: nowrap; }

.actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

dialog article.wide {
  max-width: 1020px;
  width: 90vw;
}
.summary-table th, .summary-table td {
  border-bottom: 1px solid #2c2f36;
  padding: .45rem .6rem;
}
.meta { opacity: .7; font-size: .9rem; margin-top: -.25rem; }
.modal-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ===== Business View (final page) ===== */
body.business { background: #f7f8fa; }
body.business .brandbar { background: var(--stripe); }
body.business .site-footer { background: var(--accent); color: #fff; }

.biz-card {
  background: #fff;
  border: 1px solid #e7e9ee;
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.biz-card h1 { margin: 0 0 6px; font-size: 1.35rem; color: #111; }
.biz-meta { margin: 0 0 14px; color: #0a7a33; font-weight: 600; }

.biz-summary {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  background: #ffffff !important;
}
.biz-summary th,
.biz-summary td {
  background: #ffffff !important;
  color: #222 !important;
  border: 1px solid #e0e0e0 !important;
  padding: 8px 10px;
  font-size: 0.9rem;
}
.biz-summary th {
  background: color-mix(in oklab, var(--accent) 6%, #fff) !important;
  font-weight: 600;
  color: #111 !important;
}
.biz-summary tr:hover td {
  background: color-mix(in oklab, var(--accent-light) 8%, #fff) !important;
}
.biz-summary td.num { text-align: right; }
.biz-summary td.mono { font-family: ui-monospace, Menlo, monospace; }
.biz-summary td.nowrap { white-space: nowrap; }

.biz-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.biz-link { display: grid; gap: 6px; max-width: 720px; }
.biz-link label { font-weight: 600; color: #222; }
.biz-link input {
  color: #222;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 8px;
  padding: .5rem .6rem;
  opacity: 1;
}

/* Body links use TSU light cyan */
a { color: var(--accent); }
a:hover { color: var(--accent-light); }

@media print {
  .inline-form, .instructions, .actions, dialog { display: none !important; }
  body.business { background: #fff; }
  .biz-card { box-shadow: none; border: none; }
}
