:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b6270;
  --line: #dde0e6;
  --accent: #1f5fd1;
  --accent-ink: #ffffff;
  --ok: #157a3b;
  --warn: #9a5b00;
  --err: #b42318;
  --code-bg: #eef2fb;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --text: #e8eaee;
    --muted: #9aa2b1;
    --line: #2a2f38;
    --accent: #5b8ef0;
    --accent-ink: #0b0d11;
    --ok: #4cc27a;
    --warn: #e0a64a;
    --err: #f2786d;
    --code-bg: #1f2633;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
h1 { font-size: 1.35rem; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
p { margin: .5rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--err); min-height: 1.2em; }
.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); }
.mt { margin-top: 1.5rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; width: 100%; max-width: 480px;
}

button, .btn {
  font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 8px;
  padding: .6rem 1rem; cursor: pointer; background: var(--accent); color: var(--accent-ink);
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--err); border-color: var(--line); }
button.block { width: 100%; }
button.sm { padding: .3rem .65rem; font-size: .85rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin: .75rem 0 .25rem; }
input[type=text], input[type=password], input[type=number], select, textarea {
  font: inherit; width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

progress { width: 100%; height: 10px; accent-color: var(--accent); }

/* customer page */
.drop {
  display: grid; place-items: center; text-align: center; min-height: 120px; margin: 1rem 0 .5rem;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 1rem; cursor: pointer; font-weight: 500;
}
.drop.over { border-color: var(--accent); background: var(--code-bg); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.code-box { background: var(--code-bg); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; text-align: center; }
.code-box .label { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.code { display: block; font: 700 1.8rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.code-box .hint { display: block; font-size: .8rem; color: var(--muted); }

/* staff / admin shell */
.top {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.top .brand { font-weight: 700; margin-right: auto; }
.top a { color: var(--accent); text-decoration: none; font-weight: 600; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.toolbar .muted { flex: 1; min-width: 200px; }

.transfer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.transfer .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.transfer .title { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.badge { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.live { color: var(--accent); border-color: var(--accent); }
.badge.ready { color: var(--ok); border-color: var(--ok); }
.badge.dead { color: var(--muted); }
.badge.bad { color: var(--err); border-color: var(--err); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.row input { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .25rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
td .row { margin: 0; }
.enrol { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 12px; background: var(--code-bg); border-radius: var(--radius); }
.enrol img { width: 168px; height: 168px; background: #fff; border-radius: 6px; padding: 4px; }
.enrol .mono { overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: .2rem .25rem .2rem .6rem; border: 1px solid var(--line); border-radius: 999px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.chip button { padding: 0 .4rem; background: transparent; color: var(--muted); border: 0; font-size: 1rem; line-height: 1; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .5rem 1rem; border-radius: 8px; font-weight: 600; }

/* Hermes brand */
.mark { width: 26px; height: 26px; fill: var(--accent); flex: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.hero { display: flex; align-items: center; gap: 12px; margin-bottom: .5rem; }
.hero .mark { width: 40px; height: 40px; }
.hero h1 { margin: 0; letter-spacing: .03em; }
.hero p { margin: 0; }
.lore { margin: 1.25rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); font-style: italic; text-align: center; }
