/* SPDX-License-Identifier: LicenseRef-GeekDigs-Commercial */
/* Copyright Beatppl Inc. */
/* Hub portal and console. Colors come from brand.css, generated from
   hub.config.json; the values here are the built-in palette. */

:root {
  --accent: #2f5bd3;
  --ink: #16181d;
  --paper: #ffffff;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 14%, var(--paper));
  --soft: color-mix(in srgb, var(--ink) 4%, var(--paper));
  /* Status hues mixed toward the ink, so they stay readable on a light or a dark paper. */
  --ok: color-mix(in srgb, #1f8a4c 55%, var(--ink));
  --err: color-mix(in srgb, #d0342c 60%, var(--ink));
  --warn: color-mix(in srgb, #b7791f 60%, var(--ink));
  --note: color-mix(in srgb, #f2c94c 14%, var(--paper));
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 8px 12px;
  background: var(--paper);
}
.skip:focus {
  left: 8px;
  z-index: 10;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.logo {
  height: 28px;
  width: auto;
}
.top nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.top nav a:hover {
  color: var(--ink);
}
.top nav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.who {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 28px 56px;
}
main:focus {
  outline: none;
}
h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.15rem;
  margin: 36px 0 12px;
}
h3 {
  font-size: 1rem;
  margin: 18px 0 8px;
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42rem;
}
.hero {
  padding: 48px 0;
}
.crumbs {
  margin: 0 0 6px;
  font-size: 0.92rem;
}
.facts {
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 500;
}
.when,
.hint,
.opt {
  color: var(--muted);
  font-size: 0.9rem;
}
.empty {
  color: var(--muted);
}
.notice {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.foot {
  display: flex;
  gap: 18px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.flash-wrap {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  padding: 0 28px;
}
.flash {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.flash.ok {
  border-color: var(--ok);
  color: var(--ok);
}
.flash.error {
  border-color: var(--err);
  color: var(--err);
}
.error-summary {
  border: 2px solid var(--err);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin: 0 0 18px;
}
.error-summary p {
  margin: 0 0 4px;
  font-weight: 600;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--accent);
}
.btn.danger {
  background: var(--err);
  border-color: var(--err);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.link {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

form {
  margin: 0 0 8px;
}
.field {
  margin: 0 0 16px;
  max-width: 40rem;
}
.field label {
  display: block;
  font-weight: 600;
  margin: 0 0 4px;
}
.field.check {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.field.check label {
  font-weight: 500;
}
.field.check .hint {
  flex-basis: 100%;
  margin: 0;
}
.field .hint {
  margin: 0 0 6px;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, var(--paper));
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}
input[type='checkbox'] {
  width: auto;
}
textarea {
  resize: vertical;
}
.invalid input,
.invalid select,
.invalid textarea {
  border-color: var(--err);
}
.err {
  color: var(--err);
  margin: 4px 0 0;
  font-weight: 500;
}
.inline,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.inline .field,
.filters .field {
  margin: 0;
  min-width: 11rem;
  flex: 1;
}
.inline .btn,
.filters .btn {
  margin-bottom: 1px;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  vertical-align: 1px;
}
.badge.s-open,
.badge.s-new,
.badge.warn {
  border-color: var(--accent);
  color: var(--accent);
}
.badge.s-waiting-customer {
  border-color: var(--warn);
  color: var(--warn);
}
.badge.note {
  border-style: dashed;
}

.rows,
.plain,
.choices,
.files,
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rows li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.rows .snippet {
  margin: 4px 0 0;
  color: var(--muted);
}
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.choices a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.choices a:hover {
  border-color: var(--accent);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h2 {
  margin-top: 0;
}
.files li {
  padding: 6px 0;
}

.thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.msg {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.msg.from-staff {
  background: var(--soft);
}
.msg.internal {
  border-style: dashed;
  background: var(--note);
}
.msg .meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
}
.msg .meta b {
  color: var(--ink);
}
.body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.delivery {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.delivery.d-failed {
  color: var(--err);
}

.tiles {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.9rem;
}
.tile .n {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
dl.custom {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
}
dl.custom dt {
  color: var(--muted);
}
dl.custom dd {
  margin: 0;
}
pre.config {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  overflow: auto;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .top,
  main,
  .foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  table {
    display: block;
    overflow-x: auto;
  }
}
