/* ============================================================
   Beacon Service Desk — paper & ink design system
   ============================================================ */
:root {
  --bg: #f2ecdf;
  --paper: #fbf8f0;
  --paper-2: #f7f1e4;
  --ink: #191610;
  --ink-2: #3b352b;
  --muted: #756a58;
  --faint: #9c9080;
  --line: #dcd1bb;
  --line-strong: #c3b59a;
  --accent: #b13a25;
  --accent-soft: #f3ddd3;
  --teal: #1f5a53;
  --teal-soft: #dce8e2;
  --gold: #a97c2f;
  --ok: #2f6b48;
  --warn: #a5641a;
  --danger: #a82f22;
  --radius: 3px;
  --shadow: 0 18px 40px -28px rgba(45, 35, 18, .55);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --rail: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  background-image:
    radial-gradient(rgba(120, 100, 70, .07) 1px, transparent 1px),
    radial-gradient(rgba(120, 100, 70, .05) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ------------------------------------------------ layout */
.desk { min-height: 100vh; }
.rail {
  position: fixed;
  overflow-y: auto;
  inset: 0 auto 0 0;
  width: var(--rail);
  padding: 26px 20px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f8f3e8 0%, #f1eadb 100%);
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 40;
}
.rail::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: -5px;
  width: 4px;
  background-image: radial-gradient(circle, var(--line-strong) 1.4px, transparent 1.6px);
  background-size: 4px 10px;
  opacity: .7;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  background: var(--paper);
  flex: none;
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__name { font-family: var(--serif); font-size: 19px; letter-spacing: .06em; font-weight: 700; line-height: 1.2; }
.brand__sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }

.rail__label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em; color: var(--faint); text-transform: uppercase; padding: 0 10px; }
.rail__nav { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.rail__link {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  color: var(--ink-2);
  transition: background .18s, color .18s, padding-left .18s;
  position: relative;
}
.rail__link .n { font-family: var(--mono); font-size: 10px; color: var(--faint); width: 16px; }
.rail__link .t { font-size: 14px; letter-spacing: .02em; }
.rail__link:hover { background: var(--paper-2); padding-left: 14px; }
.rail__link.is-active { background: var(--ink); color: var(--paper); }
.rail__link.is-active .n { color: #c9bca4; }
.rail__link.is-active::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent); transform: translateY(-50%);
}
.rail__spacer { flex: 1; }
.rail__server {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 12px;
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow);
}
.rail__server .k { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--faint); }
.rail__server .v { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-family: var(--serif); font-size: 16px; }
.rail__server .v span:last-child { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.rail__foot { border-top: 1px dashed var(--line-strong); padding-top: 14px; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.rail__foot a:hover { color: var(--accent); }

.shell { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; }
.topline {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(242, 236, 223, .7);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 30;
}
.topline .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 107, 72, .12); }
.topline .spacer { flex: 1; }
.topline .today { letter-spacing: .08em; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); padding: 6px 9px; border-radius: 2px; }

.main { padding: 44px 40px 72px; width: 100%; max-width: 1240px; margin: 0 auto; flex: 1; }
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 40px 40px;
  color: var(--muted);
  font-size: 12px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-family: var(--mono);
  letter-spacing: .04em;
}
.foot a:hover { color: var(--accent); }

/* ------------------------------------------------ type */
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.display { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.08; letter-spacing: .01em; }
.display em {
  font-style: normal; color: var(--accent); white-space: nowrap;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-repeat: no-repeat;
  background-size: 100% .22em;
  background-position: 0 88%;
  padding-bottom: .04em;
}
h2.title { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: .01em; }
h3.sub { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.lead { color: var(--ink-2); font-size: 15.5px; line-height: 1.85; max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.serif { font-family: var(--serif); }

/* ------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  font-size: 13.5px; letter-spacing: .04em;
  transition: transform .16s, box-shadow .16s, background .16s, color .16s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(0,0,0,.7); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bd: var(--ink); }
.btn--quiet { --btn-bg: transparent; --btn-fg: var(--ink-2); --btn-bd: transparent; padding: 8px 10px; }
.btn--quiet:hover { --btn-bg: var(--paper-2); }
.btn--sm { padding: 7px 13px; font-size: 12px; }
.btn--wide { width: 100%; }
.btn .arrow { font-family: var(--mono); font-size: 11px; transition: transform .16s; }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------ cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px dashed var(--line); }
.card__body { padding: 22px; }
.card__foot { padding: 16px 22px; border-top: 1px dashed var(--line); background: var(--paper-2); }
.card-flat { background: transparent; border: 1px solid var(--line); border-radius: var(--radius); }

.ticket { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  top: 50%; transform: translateY(-50%);
}
.ticket::before { left: -9px; border-left-color: transparent; }
.ticket::after { right: -9px; border-right-color: transparent; }

/* ------------------------------------------------ home */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: 46px; align-items: start; padding: 10px 0 44px; }
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 18px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
.hero__meta .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; }
.hero__meta .v { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-top: 2px; }
.hero__meta .v small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 400; }

.desk-ticket { padding: 26px 26px 20px; }
.desk-ticket .row { display: flex; align-items: center; justify-content: space-between; }
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--accent); color: var(--accent);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  padding: 4px 9px; border-radius: 2px; transform: rotate(-4deg);
  background: rgba(251, 248, 240, .6);
}
.big-number { font-family: var(--serif); font-size: clamp(56px, 6vw, 78px); line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.big-number small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.ticket-servers { margin-top: 16px; border-top: 1px dashed var(--line-strong); }
.ticket-servers a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.ticket-servers a:hover { color: var(--accent); }
.ticket-servers .s-name { display: flex; align-items: center; gap: 8px; }
.ticket-servers .s-code { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.ticket-servers .s-bar { width: 64px; height: 3px; background: var(--line); position: relative; }
.ticket-servers .s-bar i { position: absolute; inset: 0 auto 0 0; background: var(--teal); }

.notice-bar { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 0; overflow: hidden; margin-bottom: 54px; }
.notice-bar .tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--accent); border: 1px solid var(--accent); padding: 2px 7px; border-radius: 2px; flex: none; }
.notice-bar p { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section { margin-bottom: 58px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section__head .idx { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .18em; margin-bottom: 8px; }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.server-card { padding: 20px; text-align: left; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.server-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 24px 40px -30px rgba(30, 20, 5, .6); }
.server-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server-card__code { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--faint); }
.server-card__name { font-family: var(--serif); font-size: 26px; font-weight: 700; margin-top: 10px; letter-spacing: .08em; }
.server-card__region { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.server-card__quota { margin-top: 18px; }
.server-card__quota .k { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.bar--teal i { background: var(--teal); }
.bar--accent i { background: var(--accent); }
.server-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }

.services { border-top: 1px solid var(--line-strong); }
.service {
  display: grid; grid-template-columns: 54px minmax(0, 1.2fr) minmax(0, 1fr) 90px; align-items: center; gap: 18px;
  padding: 20px 6px; border-bottom: 1px solid var(--line);
  transition: background .18s, padding-left .18s;
}
.service:hover { background: rgba(251, 248, 240, .8); padding-left: 14px; }
.service__num { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.service__name { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.service__desc { font-size: 12.5px; color: var(--muted); }
.service__go { justify-self: end; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.service:hover .service__go { color: var(--accent); }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.status-grid--vip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-grid--vip .status-cell .v { overflow-wrap: anywhere; }
.field-row.order-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 38px; gap: 16px; align-items: center; }
.status-cell { background: var(--paper); padding: 20px; }
.status-cell .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.status-cell .v { font-family: var(--serif); font-size: 20px; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.status-cell .v small { font-family: var(--sans); font-size: 11px; color: var(--muted); }

/* ------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label { font-size: 12px; letter-spacing: .03em; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.field > label .req { color: var(--accent); font-family: var(--mono); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color .16s, box-shadow .16s, background .16s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(25, 22, 16, .06); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.checkline input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; }
.form-note { border-left: 2px solid var(--accent); padding: 10px 14px; background: var(--accent-soft); font-size: 12px; color: #6d2b1c; }

/* choice cards */
.choices { display: grid; gap: 10px; }
.choice { position: relative; border: 1px solid var(--line-strong); background: var(--paper); padding: 13px 15px; border-radius: 2px; cursor: pointer; transition: border-color .16s, background .16s; display: flex; gap: 12px; align-items: flex-start; }
.choice:hover { border-color: var(--ink); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 50%; flex: none; margin-top: 3px; display: grid; place-items: center; transition: border-color .16s; }
.choice .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .16s; }
.choice input:checked ~ .dot { border-color: var(--accent); }
.choice input:checked ~ .dot::after { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 3px 0 0 var(--accent); }
.choice .c-name { font-size: 13.5px; }
.choice .c-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* packages */
.packages { display: grid; gap: 12px; }
.package { border: 1px solid var(--line-strong); background: var(--paper); padding: 16px; border-radius: 2px; cursor: pointer; transition: border-color .16s, transform .16s; }
.package:hover { transform: translateY(-1px); border-color: var(--ink); }
.package.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.package__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.package__name { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.package__items { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.item-tag { font-size: 11px; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 2px; }
.package__note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* quiz */
.quiz { display: grid; gap: 18px; }
.quiz-q { border: 1px solid var(--line); background: var(--paper); padding: 16px 18px; border-radius: 2px; }
.quiz-q__head { display: flex; gap: 10px; font-size: 13.5px; align-items: baseline; }
.quiz-q__num { font-family: var(--mono); font-size: 10px; color: var(--accent); }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.quiz-opt { border: 1px solid var(--line); background: var(--paper-2); padding: 8px 11px; font-size: 12.5px; border-radius: 2px; cursor: pointer; transition: all .15s; }
.quiz-opt:hover { border-color: var(--line-strong); }
.quiz-opt.is-picked { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.quiz-progress { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.quiz-progress .bar { flex: 1; }

/* upload */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.upload {
  border: 1px dashed var(--line-strong); background: var(--paper-2); border-radius: 2px;
  min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; color: var(--muted); cursor: pointer; overflow: hidden; position: relative;
}
.upload:hover { border-color: var(--ink); color: var(--ink); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload .plus { font-family: var(--mono); font-size: 18px; color: var(--faint); }
.upload.has-img .plus, .upload.has-img span { display: none; }

/* ------------------------------------------------ tables & lists */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 400; padding: 9px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--paper-2); }
.table .mono { font-size: 11.5px; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; padding: 3px 7px; border-radius: 2px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); border-color: #b9cfc0; background: #edf3ee; }
.pill--warn { color: var(--warn); border-color: #ddc8a8; background: #f7efe0; }
.pill--bad { color: var(--danger); border-color: #e0bdb7; background: #f8e9e5; }
.pill--info { color: var(--teal); border-color: #b9cdc8; background: var(--teal-soft); }
.pill--muted { color: var(--muted); background: var(--paper-2); }
.pill--accent { color: var(--accent); border-color: #e0b9ad; background: var(--accent-soft); }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--line-strong); background: var(--paper-2); }
.empty strong { display: block; font-family: var(--serif); font-size: 16px; color: var(--ink-2); margin-bottom: 6px; font-weight: 700; }

/* ------------------------------------------------ code ticket */
.code-ticket { text-align: center; padding: 26px 20px; }
.code-ticket .label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.code-ticket .code { font-family: var(--mono); font-size: clamp(28px, 4vw, 40px); letter-spacing: .12em; margin: 12px 0; user-select: all; }
.code-ticket .cd { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.code-ticket .cd b { font-family: var(--mono); color: var(--accent); font-size: 15px; }

/* ------------------------------------------------ timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong); }
.tl-item.is-done::before { background: var(--teal); border-color: var(--teal); }
.tl-item.is-live::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item .t { font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; }
.tl-item .t b { font-weight: 600; }
.tl-item .d { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tl-item:last-child { padding-bottom: 0; }

/* ------------------------------------------------ modal & toast */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal__mask { position: absolute; inset: 0; background: rgba(18, 15, 10, .55); backdrop-filter: blur(3px); }
.modal__card { position: relative; width: min(520px, 100%); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 3px; box-shadow: 0 40px 80px -40px #000; max-height: 88vh; overflow: auto; animation: pop .18s ease-out; }
.modal__card--wide { width: min(880px, 100%); }
.modal__head { display: flex; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px dashed var(--line); }
.modal__head h3 { font-family: var(--serif); font-size: 19px; }
.modal__body { padding: 22px; }
.modal__foot { padding: 14px 22px; border-top: 1px dashed var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--paper-2); }
.x-btn { background: none; border: none; font-size: 20px; line-height: 1; color: var(--muted); padding: 2px 6px; }
.x-btn:hover { color: var(--ink); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--ink); color: var(--paper); font-size: 12.5px; padding: 10px 15px; border-radius: 2px; box-shadow: 0 16px 30px -18px #000; animation: toastIn .2s ease-out; max-width: 340px; }
.toast--err { background: var(--accent); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------ misc */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: none; padding: 10px 16px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-color: var(--accent); }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 12.5px; }
.kv .k { color: var(--muted); }
.kv .v { word-break: break-all; }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 26px; align-items: start; }
.split--activity { grid-template-columns: minmax(240px, .72fr) minmax(0, 1.5fr); }
.split--commands { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.split > * { min-width: 0; }
.stack > * { min-width: 0; }
.card__head > * { min-width: 0; }
.field-row > * { min-width: 0; }

/* searchable item combobox (command desk) */
.combo { position: relative; min-width: 0; }
.combo > .input { width: 100%; }
.combo__menu {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  box-shadow: 0 22px 44px -22px rgba(20, 16, 10, .45);
  max-height: 196px;
  overflow-y: auto;
  padding: 4px;
}
.combo__opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  cursor: pointer;
  border-radius: 2px;
}
.combo__opt:hover, .combo__opt.is-active { background: var(--paper-2); }
.combo__name { font-size: 12.5px; color: var(--ink); }
.combo__meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--faint); }
.combo__empty { padding: 12px 10px; font-size: 11.5px; color: var(--muted); }
.combo__menu.is-up { top: auto; bottom: calc(100% + 5px); }

/* admin material picker: search first, at most five inline matches */
.material-results {
  margin-top: 6px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
}
.material-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.material-opt:first-child { border-top: 0; }
.material-opt:hover, .material-opt:focus-visible { background: var(--paper-2); }
.material-opt__main { min-width: 0; flex: 1; }
.material-opt__name { display: block; font-size: 12.5px; color: var(--ink); }
.material-opt__meta { display: block; margin-top: 2px; font-family: var(--mono); font-size: 9.5px; color: var(--faint); }
.material-opt__add {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--accent);
}
.material-empty { padding: 11px 12px; font-size: 11.5px; color: var(--muted); }
.material-hint { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-row .select, .filter-row .input { flex: 1 1 150px; max-width: 260px; min-width: 0; }
@media (max-width: 720px) {
  .filter-row .select, .filter-row .input { max-width: none; flex-basis: 100%; }
}

.captcha {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
}
.captcha__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.captcha__body { display: flex; align-items: center; gap: 10px; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.captcha__img { display: block; width: 150px; height: 48px; border: 1px solid var(--line); background: #f4f1ea; }
.captcha__body .input { flex: 1; min-width: 0; }
.captcha__hint { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }

.cooldown-hint {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  background: var(--paper-2);
  font-size: 12px;
  color: var(--muted);
}
.cooldown-hint.is-wait { border-left-color: var(--warn, #c4813a); color: var(--ink-soft, var(--ink)); }
.material-picked { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.material-picked-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  background: var(--paper-2);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.material-picked-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 30px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.material-picked-row .input { height: 34px; min-height: 34px; padding: 7px 9px; }
.material-picked-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
@media (max-width: 560px) {
  .material-picked-row { grid-template-columns: minmax(0, 1fr) 78px 28px; }
}
.split-sticky { position: sticky; top: 76px; }
.panel-btn { transition: border-color .15s, box-shadow .15s, background .15s; }
.panel-btn:hover { background: var(--paper-2); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hr { border: none; border-top: 1px dashed var(--line-strong); margin: 18px 0; }
.hidden { display: none !important; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.page-head .lead { margin-top: 10px; }

.breadcrumb { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }

.marquee { overflow: hidden; white-space: nowrap; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

.reveal { animation: reveal .5s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------ admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 22px; }
.stat-cell { background: var(--paper); padding: 16px 18px; }
.stat-cell .k { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.stat-cell .v { font-family: var(--serif); font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat-cell .v.bad { color: var(--accent); }

.login-wrap { min-height: 70vh; display: grid; place-items: center; }
.login-card { width: min(400px, 100%); padding: 34px; }

/* ------------------------------------------------ admin console */
.admin-body .rail, .admin-body .topline, .admin-body .foot { display: none; }
.admin-body .shell { margin-left: 0; }
.admin-body .main { padding: 0; max-width: none; }
.admin-body { background: var(--bg); }
.admin-body .login-wrap { min-height: 100vh; padding: 24px; }

.admin-shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.admin-scrim, .admin-menu-btn, .admin-side__close { display: none; }
.admin-top__lead { display: flex; align-items: flex-start; gap: 12px; }
.admin-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
  padding: 26px 20px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f8f3e8 0%, #f1eadb 100%);
}
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 0 2px; }
.admin-brand .brand__mark { width: 38px; height: 38px; }
.admin-brand .brand__mark svg { width: 20px; height: 20px; }
.admin-brand .brand__name { font-size: 18px; }
.admin-brand .brand__sub { font-size: 8px; letter-spacing: .16em; }

.admin-nav { display: flex; flex-direction: column; gap: 1px; }
.admin-nav__label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em; color: var(--faint);
  text-transform: uppercase; padding: 14px 10px 5px;
}
.admin-nav__label:first-child { padding-top: 0; }
.admin-tab {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: 2px; background: transparent;
  color: var(--ink-2); font-size: 13.5px; letter-spacing: .02em; cursor: pointer;
  position: relative; transition: background .18s, color .18s, padding-left .18s;
}
.admin-tab .n { font-family: var(--mono); font-size: 10px; color: var(--faint); width: 16px; flex: none; }
.admin-tab:hover { background: var(--paper-2); color: var(--ink); padding-left: 14px; }
.admin-tab.is-active { background: var(--ink); color: var(--paper); }
.admin-tab.is-active .n { color: #c9bca4; }
.admin-tab.is-active::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent); transform: translateY(-50%);
}

.admin-side__foot {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-strong);
  display: flex; flex-direction: column; gap: 10px;
}
.admin-who {
  border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 10px 12px;
}
.admin-who .k { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; color: var(--faint); }
.admin-who .v { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; margin-top: 2px; }
.admin-side__actions { display: flex; gap: 8px; }

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 38px 40px 20px;
}
.admin-top .eyebrow { margin-bottom: 10px; }
.admin-top h1.display {
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; margin: 0;
}
.admin-top__meta { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
.admin-content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px 72px; }
.admin-panel { animation: panelIn .18s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.admin-content .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-content .stat-cell .v { font-size: 30px; }
.admin-content .split { gap: 18px; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1200px) {
  .admin-content .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-shell { display: block; }
  .admin-side {
    position: fixed; inset: 0 auto 0 0; z-index: 70;
    width: 280px; height: 100vh;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 22px;
    padding: 24px 18px 20px;
    border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .24s ease;
    overflow-y: auto;
  }
  body.admin-nav-open .admin-side { transform: none; box-shadow: 30px 0 60px -40px rgba(0, 0, 0, .55); }
  body.admin-nav-open { overflow: hidden; }
  .admin-scrim {
    display: block; position: fixed; inset: 0; z-index: 60;
    border: 0; padding: 0; background: rgba(25, 22, 16, .42);
    opacity: 0; pointer-events: none; transition: opacity .24s;
  }
  body.admin-nav-open .admin-scrim { opacity: 1; pointer-events: auto; }
  .admin-side__close {
    display: grid; place-items: center; position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 2px;
    background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
  }
  .admin-menu-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 2px;
    background: var(--paper); color: var(--ink); font-size: 16px;
  }
  .admin-brand { display: flex; padding-right: 34px; }
  .admin-nav { order: 0; width: auto; flex-direction: column; overflow: visible; gap: 1px; padding-bottom: 0; }
  .admin-nav__label { display: block; }
  .admin-tab { width: 100%; white-space: normal; padding: 8px 10px; border: 0; font-size: 13.5px; }
  .admin-tab .n { display: inline; }
  .admin-tab:hover { padding-left: 14px; }
  .admin-tab.is-active::after { display: block; }
  .admin-side__foot {
    order: 0; margin-top: auto; padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
    flex-direction: column; align-items: stretch;
  }
  .admin-who { display: block; }
  .admin-top { padding: 20px 18px 12px; align-items: flex-start; }
  .admin-top__lead { gap: 12px; }
  .admin-top h1.display { font-size: 27px; }
  .admin-top__meta { padding-top: 2px; }
  .admin-top__meta .pill { display: none; }
  .admin-content { padding: 0 18px 60px; }
  .admin-content .stat-grid { gap: 1px; }
}

/* ------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; }
  .split--activity, .split--commands { grid-template-columns: 1fr; }
  .split-sticky { position: static; }
  .service { grid-template-columns: 44px 1fr 70px; }
  .service__desc { display: none; }
}
@media (max-width: 900px) {
  :root { --rail: 264px; }
  .rail { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 30px 0 60px -40px #000; }
  body.nav-open .rail { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 12, 8, .45); z-index: 35; }
  .shell { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topline { padding: 14px 20px; }
  .main { padding: 28px 20px 56px; }
  .foot { padding: 22px 20px 34px; }
  .hero__meta { gap: 20px; }
  .quiz-opts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .status-grid--vip { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .status-grid--vip { grid-template-columns: 1fr; }
  .field-row.order-row { grid-template-columns: minmax(0, 1fr) 82px 34px; gap: 8px; }
  .display { font-size: 34px; }
  .big-number { font-size: 58px; }
  .upload-grid { grid-template-columns: repeat(3, 1fr); }
  .desk-ticket { padding: 20px; }
  .hero__meta .v { font-size: 19px; }
  .toasts { left: 14px; right: 14px; align-items: stretch; }
}
