:root {
  --bg: #02060c;
  --bg-raise: #071828;
  --bg-sunken: #01040a;
  --line: #16344f;
  --text: #e7eef6;
  --muted: #93adc4;
  --faint: #6d879e;
  --accent: #fe8700;
  --accent-ink: #00223f;
  --danger: #e15d4a;
  --ok: #8fbf78;
  --ok-bg: rgba(143, 191, 120, 0.14);
  --bad-bg: rgba(225, 93, 74, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }

a { color: inherit; }

h1, h2, p { margin: 0; }

code, .ip {
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 0.92em;
}

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  background: rgba(2, 6, 12, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo {
  height: 28px;
  width: auto;
  display: block;
}

.login-aside .logo { height: 42px; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.who {
  color: var(--muted);
  font-size: 14px;
  margin-right: 4px;
}

.eye-btn {
  width: 40px;
  padding: 0;
}

.eye-btn svg { width: 18px; height: 18px; display: block; }

.eye-btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
}

.page-head { margin-bottom: 22px; }

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.head-row .btn { flex: none; }

.head-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }

.page-head p { margin-top: 6px; color: var(--muted); }

.login-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
}

.login-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(254, 135, 0, 0.2), transparent 55%),
    #00101c;
  border-right: 1px solid var(--line);
}

.login-aside h1 {
  margin-top: 28px;
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.login-aside .lead {
  margin-top: 18px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 18px;
}

.aside-foot { color: var(--faint); font-size: 14px; }

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
}

.login-card { width: min(100%, 400px); }

.login-card h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.login-card .sub { margin: 8px 0 22px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.field span { color: var(--muted); font-size: 13px; }

input, select {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  padding: 0 14px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(254, 135, 0, 0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: default; }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn.primary:hover { filter: brightness(1.05); }

.btn.ghost { border-color: var(--line); background: transparent; }

.btn.ghost:hover { background: rgba(255, 255, 255, 0.04); }

.btn.danger {
  background: var(--bad-bg);
  color: #ffb1a6;
  border-color: transparent;
}

.btn.block { width: 100%; }

.btn.fit { width: fit-content; }

.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }

.alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bad-bg);
  color: #ffc7bf;
}

.hint {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13px;
}

.club-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.club-card {
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.club-card h2 { font-size: 28px; letter-spacing: -0.03em; }

.club-card p { color: var(--muted); }

a.club-card {
  text-decoration: none;
  cursor: pointer;
}

a.club-card:hover,
a.club-card:focus-visible {
  border-color: var(--accent);
}

.club-card.is-inactive {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.club-home {
  max-width: none;
}

.hall + .hall { margin-top: 22px; }

.hall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hall-head h2 { font-size: 22px; font-weight: 600; }

.host-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: inset 3px 0 0 var(--tone);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.host-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.host-line, .host-session {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.host-name { font-weight: 600; }

.host-session {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.host-login, .host-usergroup {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-left { flex: none; }

.host-icons { display: inline-flex; gap: 4px; flex: none; }

.mark svg { width: 16px; height: 16px; display: block; }

.mark-security { color: #e2c15a; }

.mark-shell { color: #e15d4a; }

.shift-card {
  max-width: 520px;
}

.shift-gap {
  margin: 0 0 12px;
  color: var(--danger);
  font-weight: 700;
}

.shift-card .facts { margin-top: 0; }

.shift-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sheet-url {
  display: block;
  margin-top: 12px;
  word-break: break-all;
  color: var(--accent);
}

.shift-op {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}

.user-tools {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.user-row:hover,
.user-row:focus-visible {
  border-color: var(--accent);
}

.user-balance {
  font-weight: 600;
  white-space: nowrap;
}

.host-status {
  color: var(--tone);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.is-free { --tone: #7dba6a; }
.is-busy { --tone: #fe8700; }
.is-paused { --tone: #e2c15a; }
.is-locked { --tone: #7aa2ff; }
.is-down,
.is-off { --tone: #e15d4a; }

.host-row.is-free { background: rgba(125, 186, 106, 0.14); }
.host-row.is-busy { background: rgba(254, 135, 0, 0.16); }
.host-row.is-paused { background: rgba(226, 193, 90, 0.16); }
.host-row.is-locked { background: rgba(122, 162, 255, 0.16); }
.host-row.is-down,
.host-row.is-off { background: rgba(225, 93, 74, 0.16); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--tone);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.club-home .back { margin-bottom: 22px; }

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.62);
}

.modal {
  width: min(460px, 100%);
  max-height: min(92dvh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal h2 { font-size: 26px; font-weight: 600; }

.facts, .session-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.facts div, .session-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.facts dt, .session-card dt { color: var(--muted); }

.facts dd, .session-card dd { margin: 0; font-weight: 600; }

.facts dd[class^="is-"] { color: var(--tone); }

.session-card {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.session-card .btn { margin-top: 4px; }

.modal-actions, .login-pop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.host-confirm { margin-top: 18px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.profile-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
}

.avatar,
.avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.avatar {
  position: absolute;
  inset: 0;
  object-fit: cover;
  background: var(--sunken);
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: #00223f;
  color: var(--accent);
  font-size: 28px;
  font-weight: 600;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.note {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sunken);
}

.note p { margin: 4px 0 0; }

.note small { color: var(--muted); }

.note.level-1 { box-shadow: inset 3px 0 0 #e2c15a; }

.note.level-2 { box-shadow: inset 3px 0 0 #e15d4a; }

.profile-head + .facts { margin-top: 16px; }

.profile-back { margin-top: 16px; }

.history { margin-top: 18px; }

.history h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}

.history-row.is-deposit {
  background: rgba(143, 191, 120, 0.14);
  border-color: rgba(143, 191, 120, 0.45);
  box-shadow: inset 3px 0 0 var(--ok);
}

.history-row.is-package {
  background: rgba(254, 135, 0, 0.14);
  border-color: rgba(254, 135, 0, 0.42);
  box-shadow: inset 3px 0 0 var(--accent);
}

.history-row.is-void { opacity: 0.72; }

.history-row .user-balance { flex: none; white-space: nowrap; }

.muted { color: var(--muted); }

@media (min-width: 861px) {
  .modal-back { align-items: center; }
}

.section-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
}

.section-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 16px 18px;
  line-height: 1.3;
  border-radius: 16px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
}

.section-menu a span { color: var(--muted); font-size: 22px; font-weight: 400; }

.section-menu a:hover { border-color: var(--accent); }

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-bottom: 16px;
}

.report-filters .field { width: 150px; }

.report-filters .btn { align-self: end; }

.report-day { margin-bottom: 8px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.stack h2 { margin: 0 0 12px; font-size: 18px; }

.event-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  margin-top: 8px;
}

.event-row input { margin-top: 4px; }

.product-qty {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.goods-groups { margin: 8px 0 4px 12px; }

.goods-head { cursor: default; margin-bottom: 8px; }

.goods-empty { margin: 0 0 12px; }

.report-user.is-refund .host-name,
.report-user.is-refund .meta { color: #ffb4a8; }

.report-day .host-name { white-space: normal; }

.report-day .meta { flex: none; white-space: nowrap; }

.report-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.report-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}

.report-user .btn { flex: none; }

.visit-open { color: var(--ok); }

.panel {
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
}

.panel + .panel, .stack > * + * { margin-top: 16px; }

.add-form {
  display: grid;
  grid-template-columns: 1fr 1fr 160px 180px auto;
  gap: 12px;
  align-items: end;
}

.bind-select {
  min-width: 150px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
}

.add-form .btn { height: 48px; }

.saved {
  margin: 0 0 12px;
  color: var(--ok);
  font-weight: 600;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.person, .ban-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.person:last-child, .ban-row:last-child { border-bottom: 0; }

.person strong, .ban-row strong { display: block; }

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

.you {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(254, 135, 0, 0.16);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.admin {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
}

.side a {
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

.side a.active, .side a[aria-current="page"] {
  background: #0c2c4a;
  color: var(--text);
}

.admin-body {
  padding: 28px 28px calc(28px + env(safe-area-inset-bottom));
  max-width: 980px;
}

.log-head, .log-row {
  display: grid;
  grid-template-columns: 148px 128px minmax(140px, 1fr) 108px minmax(132px, auto);
  gap: 12px;
  align-items: center;
}

.log-head {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.log-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  width: fit-content;
}

.pill.ok { background: var(--ok-bg); color: var(--ok); }

.pill.visit { background: rgba(147, 173, 196, 0.16); color: var(--muted); }

.pill.bad { background: var(--bad-bg); color: #ffb1a6; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.status-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raise);
}

.status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-log { display: grid; gap: 0; }

.ops-line {
  display: grid;
  grid-template-columns: 148px 120px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.ops-line:last-child { border-bottom: 0; }

.ops-line.is-error { color: #ffb1a6; }

@media (max-width: 800px) {
  .status-grid { grid-template-columns: 1fr 1fr; }
  .ops-line { grid-template-columns: 1fr; gap: 2px; }
}

.confirm {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.confirm span { color: var(--muted); font-size: 13px; }

.empty {
  padding: 28px 0;
  color: var(--muted);
}

.center-note {
  min-height: 50dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; align-content: start; }
  .login-aside {
    justify-content: flex-start;
    padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-aside h1 { font-size: 32px; margin-top: 10px; max-width: none; }
  .login-aside .logo { height: 26px; }
  .top .logo { height: 20px; max-width: 48vw; object-fit: contain; object-position: left center; }
  .login-aside .lead, .aside-foot { display: none; }
  .login-main {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  }
  .page-head h1 { font-size: 24px; }
  .host-usergroup { display: none; }
  .user-tools { grid-template-columns: 1fr; }
  .content { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .admin { grid-template-columns: 1fr; align-content: start; }
  .side {
    flex-direction: row;
    align-items: center;
    align-self: start;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    position: sticky;
    top: calc(64px + env(safe-area-inset-top));
    background: var(--bg);
    z-index: 4;
  }
  .side a { white-space: nowrap; padding: 10px 12px; }
  .admin-body { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .add-form { grid-template-columns: 1fr; }
  .add-form .btn { width: 100%; }
  .log-head { display: none; }
  .log-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .log-row .who-col,
  .log-row .ip,
  .log-row .row-actions { grid-column: 1 / -1; }
  .log-row .row-actions .btn,
  .log-row .confirm { width: 100%; }
  .log-row .confirm .btn { flex: 1; }
  .person, .ban-row { align-items: flex-start; }
  .who { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .section-menu a,
  .host-row,
  .club-card,
  .modal,
  input,
  select {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, filter .16s ease, transform .16s ease, box-shadow .16s ease;
  }

  .btn:hover:not(:disabled),
  .section-menu a:hover {
    transform: translateY(-1px);
  }

  .content.is-enter { animation: page-in .28s ease; }

  .modal-back { animation: fade-in .16s ease; }

  .modal { animation: page-in .22s ease; }

}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .content.is-enter,
  .modal-back,
  .modal { animation: none; }
}

body.has-install {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.install-banner {
  position: fixed;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}

.install-banner p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.shift-report {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shift-line {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 0.8fr repeat(3, minmax(90px, 0.7fr));
  gap: 8px 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raise);
}

.shift-head {
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.shift-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shift-when span,
.shift-mark {
  color: var(--muted);
  font-size: 13px;
}

.shift-stretch {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
}

.shift-stretch .shift-line {
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
}

.shift-stretch .shift-line:first-child { border-top: 0; }

.shift-diff {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shift-note {
  color: var(--muted);
  font-size: 12px;
}

.shift-label { display: none; }

button.shift-line {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shift-block.is-open > .shift-line {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pair-sheet {
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--bg-raise);
}

.pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pair-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.pair-head span,
.pair-col {
  padding: 10px 12px;
  min-width: 0;
}

.pair-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.pair-row .pair-col + .pair-col { border-left: 1px solid var(--line); }

.pair-head span + span { border-left: 1px solid var(--line); }

.pair-row.is-miss { background: rgba(225, 93, 74, 0.16); }

.pair-empty {
  color: var(--danger);
  font-size: 13px;
}

.pair-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-sunken);
}

.pair-item.is-package {
  background: rgba(254, 135, 0, 0.14);
  border-color: rgba(254, 135, 0, 0.42);
  box-shadow: inset 3px 0 0 var(--accent);
}

.pair-item.is-refund {
  background: rgba(225, 93, 74, 0.24);
  border-color: var(--danger);
  box-shadow: inset 3px 0 0 var(--danger);
}

.pair-item.is-refund strong { color: #ffb4a8; }

.pair-item.is-void {
  background: rgba(122, 162, 255, 0.2);
  border-color: #7aa2ff;
  box-shadow: inset 3px 0 0 #7aa2ff;
}

.pair-item.is-void strong {
  color: #c5d4ff;
  text-decoration: line-through;
}

.pair-legend {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
}

.pair-key {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
}

.pair-key.is-refund {
  color: #ffb4a8;
  background: rgba(225, 93, 74, 0.24);
  border-color: var(--danger);
}

.pair-key.is-void {
  color: #c5d4ff;
  background: rgba(122, 162, 255, 0.2);
  border-color: #7aa2ff;
}

.pair-item span { color: var(--muted); font-size: 13px; }

.pair-user { margin-top: 4px; }

.pair-wait { padding: 12px 14px; }

@media (max-width: 800px) {
  .shift-head { display: none; }
  .shift-line { grid-template-columns: 1fr 1fr; }
  .shift-when { grid-column: 1 / -1; }
  .shift-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
  }
}

.install-actions {
  display: flex;
  gap: 8px;
  flex: none;
}
