/* Helix Buyer Link v1.1.0. Colours and type come from the Helix brand system. */
:root {
  --blue: #4078BD; --blue-dark: #2B5384; --blue-light: #8FB4DB;
  --navy: #16273F; --navy-mid: #213F66; --ice: #CFE0F2;
  --ink: #1B2735; --slate: #475569; --grey: #6B7280;
  --cloud: #F1F6FC; --hairline: #D6E2F0; --white: #FFFFFF;
  --ok: #1F7A4D; --ok-bg: #E7F5EE; --warn: #8A5A00; --warn-bg: #FFF4DB; --stop: #A12B2B; --stop-bg: #FCEBEB;
  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body: Calibri, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--white); }
h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0; line-height: 1.2; }
a { color: var(--blue-dark); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header band */
.band { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.band .wrap { display: flex; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 32px; }
.band-text { flex: 1; min-width: 0; }
.lockup { height: 76px; width: auto; display: block; margin: -8px 0 10px -9px; }
.band h1 { color: var(--white); font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
.band p { margin: 10px 0 0; color: var(--ice); max-width: 60ch; }
.band strong { color: var(--white); font-weight: 600; }
.motif { height: 150px; width: auto; flex: none; filter: drop-shadow(0 0 14px rgba(143, 180, 219, .55)); }
@media (max-width: 640px) { .motif { display: none; } }

/* Buttons and fields */
.btn { white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: 15px; border: 0; border-radius: 10px; padding: 12px 20px; background: var(--blue); color: var(--white); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--blue-dark); }
.btn:disabled { background: var(--hairline); color: var(--grey); cursor: not-allowed; }
.btn.ghost { background: var(--white); color: var(--blue-dark); border: 1px solid var(--hairline); }
.btn.ghost:hover { background: var(--cloud); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.field { display: block; }
.field span { display: block; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--slate); margin-bottom: 6px; }
.field input, .field select, .search { height: 48px; width: 100%; border: 1px solid var(--hairline); border-radius: 10px; padding: 11px 14px; background: var(--white); }
.field input:focus, .field select:focus, .search:focus { border-color: var(--blue); outline: 3px solid var(--ice); outline-offset: 0; }

/* Notices */
.card { background: var(--cloud); border: 1px solid var(--hairline); border-radius: 14px; padding: 24px; }
.notice { max-width: 620px; margin: 48px auto; }
.notice h2 { font-size: 22px; margin-bottom: 8px; }
.notice p { margin: 0 0 12px; color: var(--slate); }
.notice p:last-child { margin-bottom: 0; }
.error { background: var(--stop-bg); border: 1px solid #F0C4C4; color: var(--stop); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; }
.loading { text-align: center; color: var(--grey); padding: 64px 0; }

/* Buyer catalog */
.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 24px 0 8px; }
.tools .search { flex: 1 1 260px; max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--hairline); background: var(--white); border-radius: 999px; padding: 6px 14px; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.count { color: var(--grey); font-size: 15px; margin: 4px 0 12px; }
.list { list-style: none; margin: 0; padding: 0 0 130px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.item { position: relative; display: flex; align-items: center; gap: 14px; border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; background: var(--white); cursor: pointer; }
.item:hover { border-color: var(--blue-light); }
.item:has(input:checked) { border-color: var(--blue); background: var(--cloud); box-shadow: inset 0 0 0 1px var(--blue); }
.item:has(input:focus-visible) { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.item input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin: 0; }
.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--cloud); border: 1px solid var(--hairline); flex: none; }
.item-title { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }
.item-sub { display: block; font-weight: 400; color: var(--grey); font-size: 14px; }
.price { font-family: var(--display); font-weight: 600; color: var(--navy); white-space: nowrap; }
.empty { color: var(--grey); padding: 32px 0; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--hairline); box-shadow: 0 -6px 24px rgba(22, 39, 63, .08); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.bar-total { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--navy); }
.bar-note { color: var(--grey); font-size: 14px; }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 24px 64px rgba(22, 39, 63, .35); }
dialog::backdrop { background: rgba(22, 39, 63, .55); }
.dlg { padding: 26px; }
.dlg h2 { font-size: 22px; margin-bottom: 14px; }
.lines { list-style: none; margin: 0; padding: 0; max-height: 44vh; overflow: auto; border-top: 1px solid var(--hairline); }
.lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.lines .qty { color: var(--grey); font-size: 14px; display: block; }
.total { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--navy); padding: 14px 0 4px; }
.fine { color: var(--slate); font-size: 15px; margin: 8px 0 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Support console */
.panel { margin: 28px 0; }
.panel h2 { font-size: 20px; margin-bottom: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 2fr 1fr; align-items: end; }
.picker { margin-top: 14px; position: relative; }
.picker-results { list-style: none; margin: 6px 0 0; padding: 6px; background: var(--white); border: 1px solid var(--hairline); border-radius: 10px; box-shadow: 0 12px 32px rgba(22, 39, 63, .12); }
.picker-results button { display: flex; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.picker-results button:hover, .picker-results button:focus-visible { background: var(--cloud); }
.picker-results .none { padding: 9px 10px; color: var(--grey); }
.picked { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.picked li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border: 1px solid var(--blue); border-radius: 10px; padding: 8px 8px 8px 14px; font-weight: 600; }
.hint { color: var(--slate); font-size: 15px; margin: 8px 0 0; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
.signin { max-width: 440px; margin: 48px auto; display: grid; gap: 14px; }
.result { margin-top: 16px; background: var(--white); border: 1px solid var(--blue); border-radius: 12px; padding: 16px; }
.result code { display: block; word-break: break-all; background: var(--cloud); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--navy); color: var(--white); padding: 10px 12px; }
th:first-child { border-radius: 10px 0 0 0; } th:last-child { border-radius: 0 10px 0 0; }
td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
tr:nth-child(even) td { background: var(--cloud); }
.muted { color: var(--grey); font-size: 14px; display: block; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-family: var(--display); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.open { background: var(--ice); color: var(--blue-dark); }
.tag.checkout_started { background: var(--warn-bg); color: var(--warn); }
.tag.used { background: var(--ok-bg); color: var(--ok); }
.tag.expired, .tag.revoked { background: #ECEFF3; color: var(--slate); }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

footer { color: var(--grey); font-size: 13px; padding: 24px 0 40px; }
.has-bar footer { padding-bottom: 120px; }
