/* BVE SVG shop: plain, readable pages that sit next to the WordPress site */

:root {
  --ink: #1d2733;
  --muted: #5b6776;
  --rule: #d9dfe6;
  --ground: #ffffff;
  --panel: #f4f7fa;
  --accent: #1b5e9e;
  --accent-ink: #ffffff;
  --good: #1d6b43;
  --good-panel: #e5f3ea;
  --waiting: #7a5a00;
  --waiting-panel: #fbf3dc;
  --bad: #a3281f;
  --bad-panel: #fbe9e7;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.6 var(--font);
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.wrap { max-width: 760px; margin: 0 auto; padding-inline: 20px; }

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 14px; }
.brand { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-header nav { display: flex; gap: 20px; font-size: 15px; }

.page { display: flex; flex-direction: column; gap: 20px; padding-block: 36px 56px; }
.page > * { margin: 0; }

h1 { font-size: 30px; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.3; margin: 0; }
.lead { font-size: 17px; color: var(--muted); max-width: 62ch; }
.note, .hint { color: var(--muted); font-size: 14px; margin: 0; }
.breadcrumb { font-size: 14px; }
.breadcrumb a::before { content: "← "; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.03em; }
tbody th { font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
.action { text-align: right; width: 1%; }
.summary { max-width: 420px; }
.summary .total th, .summary .total td { border-bottom: 0; font-weight: 700; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 4px;
  padding: 9px 18px;
  font: 600 15px/1.4 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: color-mix(in srgb, var(--accent) 85%, black); }

.alert { background: var(--bad-panel); color: var(--bad); border-left: 4px solid var(--bad); padding: 12px 16px; }
.alert p { margin: 0; }

.status { background: var(--panel); border-left: 4px solid var(--rule); padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.status p { margin: 0; }
.status-good { background: var(--good-panel); border-color: var(--good); }
.status-good h2 { color: var(--good); }
.status-waiting { background: var(--waiting-panel); border-color: var(--waiting); }
.status-waiting h2 { color: var(--waiting); }
.status-bad { background: var(--bad-panel); border-color: var(--bad); }
.status-bad h2 { color: var(--bad); }
.status .button { margin-top: 6px; }

.checkout { display: flex; flex-direction: column; gap: 28px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
legend { font-size: 19px; font-weight: 600; padding: 0; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; max-width: 460px; }
label { font-weight: 600; font-size: 15px; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], select {
  font: 16px/1.4 var(--font);
  padding: 8px 10px;
  border: 1px solid #9aa6b4;
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  width: 100%;
}
[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 14px; font-weight: 600; margin: 0; }

.field-row { display: flex; flex-wrap: wrap; gap: 16px; max-width: 460px; }
.field-row .field { flex: 1 1 180px; }

input.key-input { font-family: var(--mono); letter-spacing: 0.04em; }

.licence-key {
  display: inline-block;
  font: 600 18px/1.4 var(--mono);
  letter-spacing: 0.06em;
  background: var(--ground);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 4px 10px;
  overflow-wrap: anywhere;
}

.licence-key-small { font-size: 15px; padding: 2px 8px; }

.account-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.account-section { display: flex; flex-direction: column; gap: 12px; }
.account-section p { margin: 0; }

.link-button {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 15px; color: var(--accent);
  text-decoration: underline; cursor: pointer;
}

.pill { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1.5; padding: 0 8px; border-radius: 10px; }
.pill-good { background: var(--good-panel); color: var(--good); }
.pill-bad { background: var(--bad-panel); color: var(--bad); }
.pill-waiting { background: var(--waiting-panel); color: var(--waiting); }
.pill-neutral { background: var(--panel); color: var(--muted); }

.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: var(--mono); }

.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.admin-actions form { margin: 0; }

.search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.search input[type="search"] {
  flex: 1 1 280px;
  font: 16px/1.4 var(--font);
  padding: 8px 10px;
  border: 1px solid #9aa6b4;
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.pagination a,
.pagination .current,
.pagination .disabled,
.pagination .gap {
  min-width: 34px;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: center;
}
.pagination a { color: var(--accent); text-decoration: none; }
.pagination a:hover { background: var(--panel); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pagination .disabled, .pagination .gap { color: var(--muted); border-color: transparent; }

table.compact th, table.compact td { padding: 8px 8px; font-size: 14px; }
.page:has(table.compact) { max-width: 1040px; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.details dt { color: var(--muted); font-size: 14px; }
.details dd { margin: 0; }
@media (max-width: 520px) {
  .details { grid-template-columns: 1fr; gap: 2px; }
  .details dd { margin-bottom: 10px; }
}

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
input[type="date"], input[type="password"] {
  font: 16px/1.4 var(--font);
  padding: 7px 10px;
  border: 1px solid #9aa6b4;
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
}
.field input[type="password"] { width: 100%; }

.checkbox { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; max-width: none; }
.checkbox label { font-weight: 400; }
.checkbox .field-error { flex-basis: 100%; }

.vat-rules { margin: 0; padding: 12px 16px 12px 34px; background: var(--panel); font-size: 14px; color: var(--muted); max-width: 62ch; }

.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-block: 18px; }
.site-footer p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4e9ef;
    --muted: #a3aebb;
    --rule: #34404d;
    --ground: #151b22;
    --panel: #1e2630;
    --accent: #6aa8e6;
    --accent-ink: #0d1520;
    --good: #7fd0a0;
    --good-panel: #1a2e23;
    --waiting: #e7c464;
    --waiting-panel: #2d2716;
    --bad: #f19a90;
    --bad-panel: #33201e;
  }
  input[type="text"], input[type="email"], select { border-color: #56626f; }
}
