/*
 * 第三版界面严格围绕真实交付链路：生成软件卡密、创建联机房间。
 * 页面不展示订单数量、销售统计或平台无法获得的“待交付”数据。
 */

:root {
  color-scheme: light;
  --ink: #172033;
  --ink-soft: #566078;
  --muted: #8a93a6;
  --line: #e5e8ef;
  --surface: #ffffff;
  --canvas: #f5f6fa;
  --navy: #0c1424;
  --navy-soft: #151f34;
  --violet: #6257ed;
  --violet-dark: #5146d8;
  --violet-soft: #f0eeff;
  --blue: #2774e6;
  --blue-soft: #eaf3ff;
  --green: #0e956f;
  --green-soft: #e9f8f3;
  --orange: #c97b20;
  --orange-soft: #fff4e6;
  --red: #cf4e61;
  --red-soft: #fff0f2;
  --shadow: 0 18px 48px rgba(25, 33, 54, 0.07);
}

* {
  box-sizing: border-box;
}

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

body,
button,
input,
select {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(98, 87, 237, 0.2);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

svg {
  width: 1em;
  height: 1em;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* 登录页使用独立双栏容器，避免在认证前暴露任何后台导航和业务内容。 */
.login-page {
  display: grid;
  min-height: 100dvh;
  padding: 28px;
  place-items: center;
  background:
    radial-gradient(circle at 8% 10%, rgba(98, 87, 237, 0.12), transparent 28%),
    radial-gradient(circle at 92% 92%, rgba(39, 116, 230, 0.08), transparent 30%),
    #f4f5f9;
}

.login-shell {
  display: grid;
  width: min(1030px, 100%);
  min-height: 620px;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  overflow: hidden;
  border: 1px solid rgba(223, 226, 235, 0.8);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(20, 27, 48, 0.16);
}

.login-visual {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 41px 44px;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(132, 119, 255, 0.42), transparent 31%),
    radial-gradient(circle at 18% 90%, rgba(39, 116, 230, 0.18), transparent 32%),
    linear-gradient(150deg, #111b30 0%, #0b1323 58%, #171a50 100%);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand > span:last-child {
  display: grid;
  gap: 4px;
}

.login-brand strong {
  font-size: 17px;
  letter-spacing: 0.04em;
}

.login-brand small {
  color: #8f9ab1;
  font-size: 10px;
}

.login-message {
  position: relative;
  z-index: 2;
  margin-top: 108px;
}

.login-message > span {
  color: #8d83ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.login-message h1 {
  margin: 15px 0 15px;
  font-size: 35px;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.login-message p {
  width: min(420px, 100%);
  margin: 0;
  color: #8995ab;
  font-size: 12px;
  line-height: 1.8;
}

.login-orbit {
  position: absolute;
  right: -70px;
  bottom: -105px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(134, 121, 255, 0.14);
  border-radius: 50%;
}

.orbit-ring {
  position: absolute;
  inset: 58px;
  border: 1px solid rgba(134, 121, 255, 0.18);
  border-radius: 50%;
}

.orbit-ring.ring-two {
  inset: 118px;
  border-style: dashed;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  color: #d4d0ff;
  background: rgba(105, 92, 236, 0.25);
  box-shadow: 0 0 0 16px rgba(105, 92, 236, 0.08);
  transform: translate(-50%, -50%);
}

.orbit-core svg {
  width: 29px;
  height: 29px;
}

.login-panel {
  display: grid;
  padding: 48px 57px;
  place-items: center;
  background: #fff;
}

.login-form-wrap {
  width: 100%;
  max-width: 350px;
}

.login-kicker {
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.login-form-wrap > h2 {
  margin: 9px 0 7px;
  color: #151d2f;
  font-size: 28px;
}

.login-form-wrap > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.login-form {
  display: grid;
  margin-top: 30px;
  gap: 17px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: #50596d;
  font-size: 10px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
  outline: 0;
  color: #222b3e;
  background: #f9fafc;
  font-size: 12px;
}

.login-field input:focus {
  border-color: #9e97ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(98, 87, 237, 0.08);
}

.login-field input::placeholder {
  color: #a2a9b7;
}

.login-error {
  min-height: 15px;
  margin-top: -8px;
  color: var(--red);
  font-size: 10px;
}

.login-button {
  width: 100%;
  min-height: 49px;
}

.demo-login-note {
  margin-top: 25px;
  padding: 13px 14px;
  border: 1px solid #e8e5ff;
  border-radius: 11px;
  background: #f8f7ff;
}

.demo-login-note span {
  color: var(--violet);
  font-size: 9px;
  font-weight: 750;
}

.demo-login-note p {
  margin: 4px 0 0;
  color: #7c8497;
  font-size: 9px;
  line-height: 1.6;
}

/* 固定侧栏承载三个业务入口，避免原型继续扩张成复杂运营后台。 */
.app-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  padding: 27px 18px 20px;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 15% 4%, rgba(110, 98, 255, 0.25), transparent 28%),
    linear-gradient(175deg, #121c31 0%, var(--navy) 72%);
}

.brand {
  display: flex;
  padding: 0 8px;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7d70ff, #5850dc);
  box-shadow: 0 12px 28px rgba(92, 81, 226, 0.34);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.65;
}

.brand-mark circle {
  fill: #fff;
  stroke: none;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: #8995ad;
  font-size: 11px;
}

.nav-list {
  display: grid;
  margin-top: 43px;
  gap: 7px;
}

.nav-item {
  display: flex;
  height: 47px;
  padding: 0 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #8f9ab0;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  border-color: rgba(132, 121, 255, 0.26);
  color: #fff;
  background: linear-gradient(90deg, rgba(98, 87, 237, 0.27), rgba(98, 87, 237, 0.12));
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.sidebar-note {
  display: flex;
  margin-top: auto;
  padding: 15px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-note div {
  display: grid;
  gap: 3px;
}

.sidebar-note strong {
  font-size: 11px;
}

.sidebar-note span:last-child {
  color: #7d899e;
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #f0ad4e;
  box-shadow: 0 0 0 5px rgba(240, 173, 78, 0.11);
}

.admin-card {
  padding: 12px;
}

.admin-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  color: #dedbff;
  background: rgba(98, 87, 237, 0.2);
  font-size: 10px;
  font-weight: 800;
}

.logout-button {
  margin-left: auto;
  padding: 5px 6px;
  border: 0;
  border-radius: 6px;
  color: #7e899f;
  background: transparent;
  font-size: 9px;
}

.logout-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

/* 主区把标题和操作固定在顶部，让生成入口始终容易找到。 */
.main-area {
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 92px;
  padding: 20px 32px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px);
}

.page-title span {
  color: var(--violet);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.page-title h1 {
  margin: 5px 0 0;
  color: #151d2f;
  font-size: 24px;
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 28px 32px 48px;
}

/* 按钮只保留主操作、次操作和房间操作三种层级。 */
.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, #6d62f4, #554add);
  box-shadow: 0 10px 22px rgba(98, 87, 237, 0.22);
}

.button.primary:hover {
  box-shadow: 0 13px 26px rgba(98, 87, 237, 0.28);
}

.button.secondary {
  border-color: #dfe2ea;
  color: #394158;
  background: #fff;
}

.button.secondary:hover {
  border-color: #c9c5ff;
  color: var(--violet-dark);
  background: #faf9ff;
}

.button.danger {
  border-color: #f0bac2;
  color: var(--red);
  background: var(--red-soft);
}

.button.danger:hover {
  border-color: #e78f9d;
  background: #ffe5e9;
}

.button.dark {
  color: #fff;
  background: #141e32;
  box-shadow: 0 11px 24px rgba(12, 20, 36, 0.16);
}

.button.large {
  min-height: 48px;
  padding: 0 21px;
}

.button.full {
  width: 100%;
}

.button svg {
  width: 17px;
  height: 17px;
}

.section-kicker,
.card-kicker {
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

/* 交付台直接展示软件卡密和联机房间两个操作面板，减少无关信息占用空间。 */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.action-card {
  display: flex;
  min-width: 0;
  min-height: 385px;
  padding: 27px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.action-card-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.action-icon {
  display: grid;
  width: 47px;
  height: 47px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: var(--violet);
  background: var(--violet-soft);
}

.room-card .action-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.action-icon svg {
  width: 23px;
  height: 23px;
}

.action-card h2 {
  margin: 6px 0 6px;
  color: #172033;
  font-size: 20px;
}

.action-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.form-grid {
  display: grid;
  margin-top: 28px;
  gap: 12px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.room-fields {
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(105px, 0.7fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > span {
  color: #626b7f;
  font-size: 10px;
  font-weight: 700;
}

.field > small {
  color: #9299aa;
  font-size: 8px;
  line-height: 1.55;
}

.field input,
.field select {
  width: 100%;
  height: 45px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  outline: 0;
  color: #252d40;
  background: #f9fafc;
  font-size: 12px;
}

.field input:focus,
.field select:focus {
  border-color: #9e97ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(98, 87, 237, 0.08);
}

.field input::placeholder {
  color: #a3aaba;
}

.rule-box {
  display: flex;
  margin-top: 18px;
  padding: 14px 15px;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  color: var(--violet);
  background: #f6f4ff;
}

.rule-box.blue {
  color: var(--blue);
  background: #f1f7ff;
}

.rule-box > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

.rule-box svg {
  width: 15px;
  height: 15px;
}

.rule-box p {
  display: grid;
  margin: 0;
  gap: 3px;
}

.rule-box strong {
  color: #343b51;
  font-size: 11px;
}

.rule-box small {
  color: #858da0;
  font-size: 9px;
}

.action-buttons {
  display: grid;
  margin-top: auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-buttons.single {
  grid-template-columns: 1fr;
}

.module-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.module-heading h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.module-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #e3e6ed;
  border-radius: 9px;
  color: #687187;
  background: #fff;
}

.icon-button:hover {
  color: var(--violet);
  border-color: #c9c5ff;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  color: #60697c;
  background: #f1f3f6;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.active {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.paused {
  color: var(--orange);
  background: var(--orange-soft);
}

.status-badge.expired {
  color: var(--red);
  background: var(--red-soft);
}

/* 当前有效授权码使用可折叠列表，桌面端便于扫描，手机端自动改为信息卡。 */
.module-heading {
  margin-bottom: 20px;
  align-items: center;
}

.module-heading h2 {
  font-size: 24px;
}

.module-heading p {
  margin-top: 7px;
  font-size: 11px;
}

.list-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.code-columns {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.75fr) minmax(150px, 0.7fr) 150px;
  gap: 16px;
}

.license-state-cell {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.license-state-cell small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-state-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 0 9px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
}

.license-state-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.license-state-badge.pending {
  color: var(--orange);
  background: var(--orange-soft);
}

.license-state-badge.consumed {
  color: var(--green);
  background: var(--green-soft);
}

.list-head {
  padding: 12px 19px;
  color: #9098a9;
  background: #fafbfc;
  font-size: 9px;
  font-weight: 700;
}

.record-row {
  min-height: 78px;
  padding: 16px 19px;
  align-items: center;
  border-top: 1px solid #edf0f4;
}

.record-row > div {
  min-width: 0;
  color: #596277;
  font-size: 10px;
}

.record-row > div:not(.primary-cell) > strong,
.primary-cell strong {
  display: block;
  color: #293146;
}

.primary-cell {
  display: grid;
  gap: 5px;
}

.primary-cell strong {
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-cell span,
.record-row > div > span {
  color: #9299a9;
  font-size: 9px;
}

.multiline {
  line-height: 1.7;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  color: #4d566b;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}

.mini-button:hover {
  color: var(--violet);
  border-color: #c9c5ff;
}

.mini-button.danger:hover {
  color: var(--red);
  border-color: #f0bac2;
  background: var(--red-soft);
}

.empty-state {
  padding: 62px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

/* 软件配置以轻量卡片展示接入标识和卡密规则，不混入价格、库存等商品字段。 */
.software-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.software-item {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.software-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.software-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: var(--violet);
  background: var(--violet-soft);
}

.software-icon svg {
  width: 22px;
  height: 22px;
}

.software-prefix {
  color: var(--violet);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.software-main h2 {
  margin: 4px 0 3px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.software-main p {
  margin: 0;
  overflow: hidden;
  color: #8d95a6;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.software-meta {
  display: grid;
  margin: 17px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #eceef3;
  border-radius: 11px;
}

.software-meta div {
  display: grid;
  min-width: 0;
  padding: 12px 13px;
  gap: 4px;
  background: #fafbfc;
}

.software-meta div + div {
  border-left: 1px solid #eceef3;
}

.software-meta dt {
  color: var(--muted);
  font-size: 8px;
}

.software-meta dd {
  margin: 0;
  overflow: hidden;
  color: #343d51;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 软件卡只保留编辑入口，并放在右侧避免与展示信息混在一起。 */
.software-actions {
  display: flex;
  margin-top: 15px;
  justify-content: flex-end;
  gap: 7px;
}

/* 软件版本在所属软件卡内展开，管理员不用跳到另一个库存或商品模块寻找安装包。 */
.release-list {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.release-item {
  display: grid;
  min-width: 0;
  padding: 10px 11px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #eceef3;
  border-radius: 10px;
  background: #fafbfc;
}

.release-item > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.release-item strong {
  color: #30384c;
  font-size: 10px;
}

.release-item span:not(.status-badge) {
  overflow: hidden;
  color: #8d95a6;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-empty {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  color: #9299aa;
  background: #f7f8fa;
  font-size: 9px;
  line-height: 1.6;
}

.mini-button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.software-warning {
  margin-top: 16px;
}

/* 软件分发按软件分组展示安装包，上传入口与真实文件信息保持在同一个操作区域。 */
.distribution-package-grid {
  display: grid;
  margin-bottom: 34px;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.package-panel {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.package-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.package-panel-head > div {
  min-width: 0;
}

.package-panel-head h3 {
  margin: 4px 0 3px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.package-panel-head .button {
  min-height: 38px;
  padding: 0 14px;
  flex: 0 0 auto;
  font-size: 9px;
}

.package-panel-head .button svg {
  width: 14px;
  height: 14px;
}

.release-architecture-warning {
  color: #b66a00;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

/* 房间列表突出唯一标识、有效期和二维码入口，暂停操作保持次要。 */
.room-list {
  display: grid;
  gap: 14px;
}

.room-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.room-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.room-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: var(--blue-soft);
}

.room-icon svg {
  width: 23px;
  height: 23px;
}

.room-code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 750;
}

.room-main h2 {
  margin: 4px 0 3px;
  font-size: 17px;
}

.room-main p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.room-metrics {
  display: grid;
  margin-top: 18px;
  padding: 14px 16px;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 12px;
  background: #f8f9fb;
}

.room-metrics div {
  display: grid;
  gap: 4px;
}

.room-metrics div + div {
  padding-left: 18px;
  border-left: 1px solid #e6e9ef;
}

.room-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.room-metrics strong {
  color: #343d51;
  font-size: 11px;
}

.room-actions {
  display: flex;
  margin-top: 16px;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-button {
  color: #737c8f;
  background: transparent;
}

.prototype-warning {
  display: flex;
  margin-top: 18px;
  padding: 14px 16px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #efe2bf;
  border-radius: 12px;
  color: #a06b24;
  background: #fffaf0;
}

.prototype-warning > svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.prototype-warning p {
  margin: 0;
  color: #806846;
  font-size: 10px;
  line-height: 1.65;
}

.prototype-warning strong {
  color: #5f4c30;
}

/* 弹窗集中展示一条卡密，或同一房间内多位玩家各自的交付内容。 */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  overflow: auto;
  background: rgba(7, 12, 23, 0.62);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(455px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(8, 13, 25, 0.25);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #7f8798;
  background: #f2f4f7;
  font-size: 20px;
}

.modal-icon,
.success-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--violet);
  background: var(--violet-soft);
}

.modal-icon svg,
.success-mark svg {
  width: 23px;
  height: 23px;
}

.success-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7469f5, #554bdc);
}

.modal > h2 {
  margin: 17px 0 7px;
  font-size: 22px;
}

.modal > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.modal-form {
  display: grid;
  margin-top: 23px;
  gap: 14px;
}

.readonly-field {
  display: flex;
  min-height: 45px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 10px;
  background: #f5f6f9;
}

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

.readonly-field strong {
  color: #343d51;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.modal-eyebrow {
  display: block;
  margin-top: 18px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.result-modal > h2,
.room-result-modal > h2 {
  margin-top: 7px;
}

.generated-code {
  margin-top: 20px;
  padding: 18px 12px;
  border: 1px dashed #bcb6ff;
  border-radius: 12px;
  color: #352aaf;
  background: #f7f6ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  word-break: break-all;
}

.result-details {
  display: grid;
  margin: 16px 0 20px;
  padding: 0;
  gap: 1px;
  overflow: hidden;
  border-radius: 11px;
  background: #e9ebf0;
}

.result-details div {
  display: flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f8f9fb;
}

.result-details dt {
  color: var(--muted);
  font-size: 9px;
}

.result-details dd {
  margin: 0;
  color: #333b4f;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.room-result-modal {
  width: min(760px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  text-align: center;
}

.room-result-modal .modal-eyebrow {
  margin-top: 0;
}

.player-qr-grid {
  display: grid;
  max-height: min(58vh, 610px);
  margin-top: 20px;
  padding: 2px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow-y: auto;
}

.player-qr-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e4e7ee;
  border-radius: 15px;
  background: #fafbfe;
}

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

.player-qr-head strong {
  color: #20283a;
  font-size: 13px;
}

.player-qr-head span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
}

.player-virtual-ip {
  display: flex;
  margin-top: 11px;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 9px;
  background: #eef4ff;
}

.player-virtual-ip span {
  color: var(--muted);
  font-size: 9px;
}

.player-virtual-ip strong {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.qr-wrap {
  display: grid;
  width: 220px;
  height: 220px;
  margin: 13px auto 8px;
  place-items: center;
  border: 1px solid #e2e5eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 13px 35px rgba(25, 33, 54, 0.09);
}

/* WireGuard 配置内容较长，二维码保留足够物理尺寸，避免手机摄像头因模块过密难以识别。 */
.qr-wrap svg {
  display: block;
  width: 190px;
  height: 190px;
}

.prototype-qr {
  display: grid;
  width: 136px;
  height: 136px;
  padding: 7px;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  gap: 1px;
  background: #fff;
}

.prototype-qr i {
  background: transparent;
}

.prototype-qr i.on {
  background: #10192b;
}

.qr-note {
  display: block;
  color: #9aa1b0;
  font-size: 8px;
}

.player-qr-card .button {
  width: 100%;
  min-height: 39px;
  margin-top: 12px;
  padding: 0 12px;
}

.qr-card-actions {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qr-card-actions .button {
  margin-top: 0;
  font-size: 10px;
}

.room-delivery-guide {
  display: grid;
  margin-top: 17px;
  padding: 15px;
  gap: 12px;
  border: 1px solid #e4e7ee;
  border-radius: 14px;
  background: #f8f9fc;
  text-align: left;
}

.room-delivery-guide > div {
  display: grid;
  gap: 4px;
}

.room-delivery-guide strong {
  color: #252d40;
  font-size: 11px;
}

.room-delivery-guide span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.room-delivery-guide pre {
  max-height: 190px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 10px;
  color: #596276;
  background: #fff;
  font-family: inherit;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.room-details {
  margin-top: 17px;
  text-align: left;
}

.danger-text {
  color: var(--red);
}

.delete-room-modal > p {
  color: var(--muted);
  line-height: 1.7;
}

.delete-room-actions {
  display: grid;
  margin-top: 18px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 180px;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  background: #172033;
  box-shadow: 0 15px 38px rgba(12, 20, 36, 0.23);
  font-size: 11px;
}

.toast.error {
  background: #b93f52;
}

/* 软件交付增加版本与取件规则，三列在桌面端保持同一视觉层级。 */
.delivery-fields {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr) minmax(120px, 0.8fr);
}

.distribution-columns {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(190px, 1.15fr) minmax(210px, 1.2fr) minmax(120px, 0.7fr) 135px;
  gap: 13px;
}

.distribution-columns .primary-cell strong {
  font-size: 10px;
}

.distribution-columns .primary-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-link {
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.pickup-link:hover {
  text-decoration: underline;
}

.modal-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.file-field input[type="file"] {
  height: auto;
  min-height: 47px;
  padding: 10px 12px;
  line-height: 1.8;
}

.upload-progress {
  display: grid;
  gap: 8px;
}

.upload-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #71798c;
  font-size: 9px;
}

.upload-progress strong {
  color: var(--violet);
}

.upload-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
}

.upload-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eceef4;
}

.upload-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #796ef4, #5449db);
}

.delivery-result-details {
  display: grid;
  margin: 18px 0 20px;
  overflow: hidden;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
}

.delivery-result-details div {
  display: grid;
  min-height: 48px;
  padding: 10px 13px;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: #fafbfc;
}

.delivery-result-details div + div {
  border-top: 1px solid #e8eaf0;
}

.delivery-result-details dt {
  color: var(--muted);
  font-size: 9px;
}

.delivery-result-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #343d51;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.delivery-result-details dd small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.delivery-result-details .secret-value {
  color: #4338b8;
  font-family: "SFMono-Regular", Consolas, monospace;
}

/* 中等屏幕把两个操作面板改为纵向排列，保证表单始终具有足够宽度。 */
@media (max-width: 1100px) {
  .delivery-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: 390px;
  }

  .code-columns {
    grid-template-columns: minmax(220px, 1.25fr) minmax(130px, 0.75fr) minmax(130px, 0.7fr) 110px;
  }

  .distribution-columns {
    grid-template-columns: minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(180px, 1.1fr) minmax(105px, 0.7fr) 120px;
  }
}

/* H5 使用五项底部导航，表单和记录改成单列，保证按钮适合拇指操作。 */
@media (max-width: 760px) {
  .login-page {
    display: block;
    padding: 0;
    background: #fff;
  }

  .login-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-visual {
    min-height: 245px;
    padding: 26px 23px;
  }

  .login-brand .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .login-message {
    margin-top: 45px;
  }

  .login-message > span {
    font-size: 8px;
  }

  .login-message h1 {
    margin: 10px 0 9px;
    font-size: 25px;
    line-height: 1.28;
  }

  .login-message p {
    width: 85%;
    font-size: 10px;
    line-height: 1.65;
  }

  .login-orbit {
    right: -118px;
    bottom: -175px;
    transform: scale(0.75);
  }

  .login-panel {
    padding: 37px 25px 42px;
  }

  .login-form-wrap {
    max-width: 420px;
  }

  .login-form-wrap > h2 {
    font-size: 26px;
  }

  .login-form {
    margin-top: 25px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    background: rgba(12, 20, 36, 0.98);
    box-shadow: 0 -8px 28px rgba(12, 20, 36, 0.16);
  }

  .brand,
  .sidebar-note {
    display: none;
  }

  .nav-list {
    display: grid;
    height: 60px;
    margin: 0;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .nav-item {
    height: 59px;
    padding: 5px 3px;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 10px;
    font-size: 9px;
    text-align: center;
  }

  .nav-item.active {
    box-shadow: inset 0 -2px 0 #8178ff;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .main-area {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 82px;
    padding: 15px 14px 13px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 11px;
  }

  .page-title h1 {
    font-size: 21px;
  }

  .topbar-actions {
    width: auto;
    margin-left: auto;
    gap: 7px;
  }

  .topbar-actions .button {
    min-height: 40px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .content {
    padding: 14px 14px 30px;
  }

  .delivery-grid {
    gap: 14px;
  }

  .action-card {
    min-height: 0;
    padding: 21px;
    border-radius: 17px;
  }

  .action-card h2 {
    font-size: 18px;
  }

  .form-grid {
    margin-top: 22px;
  }

  .two-columns,
  .room-fields,
  .delivery-fields {
    grid-template-columns: 1fr 1fr;
  }

  .software-select-field {
    grid-column: 1 / -1;
  }

  .room-name-field {
    grid-column: 1 / -1;
  }

  .action-buttons {
    margin-top: 22px;
  }

  .action-buttons .button {
    min-height: 45px;
    padding: 0 10px;
    font-size: 11px;
  }

  .module-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .module-heading .button {
    width: 100%;
  }

  .list-panel {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .list-head {
    display: none;
  }

  .record-list {
    display: grid;
    gap: 12px;
  }

  .record-row.code-columns {
    display: grid;
    min-height: 0;
    padding: 17px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(25, 33, 54, 0.055);
  }

  .record-row.distribution-columns {
    display: grid;
    min-height: 0;
    padding: 17px;
    grid-template-columns: 1fr;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(25, 33, 54, 0.055);
  }

  .record-row.distribution-columns .primary-cell {
    grid-column: auto;
  }

  .record-row.distribution-columns .row-actions {
    grid-column: auto;
  }

  .record-row .primary-cell {
    grid-column: 1 / -1;
    padding-bottom: 13px;
    border-bottom: 1px solid #eceef3;
  }

  .record-row > div:not(.primary-cell)::before {
    display: block;
    margin-bottom: 5px;
    color: #9aa2b1;
    content: attr(data-label);
    font-size: 8px;
  }

  .record-row .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .mini-button {
    min-height: 34px;
  }

  .room-item {
    padding: 18px;
    border-radius: 16px;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }

  .distribution-package-grid {
    margin-bottom: 24px;
    grid-template-columns: 1fr;
  }

  .package-panel {
    padding: 18px;
  }

  .package-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .package-panel-head .button {
    width: 100%;
  }

  .software-item {
    padding: 18px;
  }

  .room-main {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 11px;
  }

  .room-icon {
    width: 44px;
    height: 44px;
  }

  .room-metrics {
    padding: 12px;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .room-metrics div + div {
    padding-left: 0;
    border-left: 0;
  }

  .room-metrics div:last-child {
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 1px solid #e6e9ef;
  }

  .room-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .room-actions .button {
    padding: 0 9px;
  }

  .room-actions .ghost-button {
    grid-column: auto;
  }

  .room-actions .room-delete-button {
    grid-column: 1 / -1;
  }

  .modal-backdrop {
    padding: 14px;
    align-items: center;
  }

  .modal {
    padding: 27px 21px 22px;
    border-radius: 18px;
  }

  .modal-field-pair {
    grid-template-columns: 1fr;
  }

  .generated-code {
    font-size: 15px;
  }

  .player-qr-grid {
    max-height: 55vh;
    grid-template-columns: 1fr;
  }

  .qr-wrap {
    width: min(220px, 100%);
    height: 220px;
  }

  .qr-card-actions,
  .delete-room-actions {
    grid-template-columns: 1fr;
  }

  .toast-root {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 14px;
  }

  .toast {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }
}
