:root {
  --bg: #0b0c10;
  --bg-soft: #0e1015;
  --card: #14161d;
  --card-raised: #181b23;
  --field: #0f1118;
  --text: #f2f4f8;
  --muted: #8b93a7;
  --dim: #60687b;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --cyan: #25f4ee;
  --cyan-rgb: 37, 244, 238;
  --red: #fe2c55;
  --red-rgb: 254, 44, 85;
  --green: #33d69f;
  --green-rgb: 51, 214, 159;
  --amber: #ffb020;
  --amber-rgb: 255, 176, 32;
  --blue: #6ea8fe;
  --blue-rgb: 110, 168, 254;
  --violet: #b18cff;
  --violet-rgb: 177, 140, 255;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 30px 100px rgba(0, 0, 0, 0.5);
  --font-sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(var(--cyan-rgb), 0.055), transparent 65%),
    radial-gradient(760px 460px at 96% 2%, rgba(var(--red-rgb), 0.04), transparent 65%);
  content: "";
  pointer-events: none;
}

::selection {
  background: rgba(var(--cyan-rgb), 0.28);
  color: #fff;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

code,
.mono {
  font-family: var(--font-mono);
}

code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: #c9d3e3;
  font-size: 0.92em;
}

.is-hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.clipboard-helper {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.input.is-invalid {
  border-color: rgba(var(--red-rgb), 0.55);
}

.input.is-invalid:focus {
  border-color: rgba(var(--red-rgb), 0.75);
  box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.08);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

/* ---------- 登录 ---------- */

.login-view {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 42px 24px;
  background:
    radial-gradient(820px 560px at 18% 16%, rgba(var(--cyan-rgb), 0.085), transparent 65%),
    radial-gradient(680px 520px at 86% 80%, rgba(var(--red-rgb), 0.06), transparent 66%),
    linear-gradient(180deg, #0a0b0f, #0b0c10 58%, #090a0d);
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 44%, #000 0, transparent 72%);
  pointer-events: none;
}

.login-aurora {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 760px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--cyan-rgb), 0.11), transparent 68%);
  filter: blur(28px);
  pointer-events: none;
  transform: translateX(-50%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 442px);
  padding: 38px 38px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(20, 22, 29, 0.88);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
}

.login-card::before {
  position: absolute;
  top: -1px;
  right: 42px;
  left: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.75), transparent);
  content: "";
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--cyan-rgb), 0.32);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(var(--cyan-rgb), 0.18), rgba(var(--cyan-rgb), 0.035)),
    #10141a;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(var(--cyan-rgb), 0.07);
  color: var(--cyan);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 25px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-brand-text strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.login-brand-text small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.login-heading {
  margin-top: 34px;
}

.login-heading h1 {
  margin: 0;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-subtitle {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #b7bfce;
  font-size: 12.5px;
  font-weight: 500;
}

.required {
  color: var(--red);
}

.field-optional {
  color: var(--dim);
  font-size: 11px;
  font-weight: 400;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #272d39;
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--field);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input:hover {
  border-color: #343b4a;
}

.input:focus {
  border-color: rgba(var(--cyan-rgb), 0.62);
  background: #10131a;
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.09);
}

.input::placeholder,
.textarea::placeholder {
  color: #565e70;
  opacity: 1;
}

.input-lg {
  height: 52px;
  padding: 0 82px 0 15px;
  border-radius: 13px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.field-error {
  min-height: 18px;
  margin: 5px 0 0;
  color: #ff6a85;
  font-size: 12px;
}

.login-error {
  margin-top: 9px;
  min-height: 19px;
}

.login-form .btn {
  margin-top: 7px;
}

.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid rgba(var(--amber-rgb), 0.16);
  border-radius: 11px;
  background: rgba(var(--amber-rgb), 0.045);
  color: #b9a681;
  font-size: 11.5px;
  line-height: 1.65;
}

.login-hint code {
  border-color: rgba(var(--amber-rgb), 0.18);
  color: #e4c987;
  font-size: 11px;
}

.hint-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border: 1px solid rgba(var(--amber-rgb), 0.32);
  border-radius: 50%;
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.foot-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3b4252;
}

.login-copyright {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  color: #464d5d;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.2);
}

.btn:disabled,
.btn.is-loading {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.btn-primary {
  border-color: rgba(var(--cyan-rgb), 0.5);
  background: linear-gradient(135deg, #25f4ee 0%, #58e6ff 100%);
  box-shadow: 0 7px 24px rgba(var(--cyan-rgb), 0.15);
  color: #031416;
}

.btn-primary:hover {
  box-shadow: 0 10px 32px rgba(var(--cyan-rgb), 0.24);
  filter: brightness(1.045);
}

.btn-secondary {
  border-color: rgba(var(--cyan-rgb), 0.24);
  background: rgba(var(--cyan-rgb), 0.09);
  color: #bffcf8;
}

.btn-secondary:hover {
  border-color: rgba(var(--cyan-rgb), 0.38);
  background: rgba(var(--cyan-rgb), 0.14);
}

.btn-subtle {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: #d8deeb;
}

.btn-subtle:hover {
  border-color: rgba(var(--cyan-rgb), 0.26);
  background: rgba(var(--cyan-rgb), 0.07);
  color: var(--cyan);
}

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

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(var(--red-rgb), 0.45);
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: #ff4167;
}

.btn-danger-ghost {
  border-color: rgba(var(--red-rgb), 0.24);
  background: rgba(var(--red-rgb), 0.07);
  color: #ff718c;
}

.btn-danger-ghost:hover {
  border-color: rgba(var(--red-rgb), 0.4);
  background: rgba(var(--red-rgb), 0.12);
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11.5px;
}

.btn-lg {
  min-height: 49px;
  padding: 0 23px;
  border-radius: 12px;
  font-size: 13.5px;
}

.btn-block {
  width: 100%;
}

.btn.is-loading::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
  content: "";
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 顶栏与导航 ---------- */

.main-view {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(20px);
}

.topbar-inner {
  display: flex;
  width: min(100%, 1320px);
  height: 68px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 11px;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-size: 10.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.1), 0 0 9px rgba(var(--green-rgb), 0.5);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c5ccda;
  font-size: 11.5px;
}

.user-avatar {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--cyan-rgb), 0.11);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}

.tabbar {
  position: sticky;
  top: 68px;
  z-index: 35;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.75);
  backdrop-filter: blur(17px);
}

.tabbar-inner {
  display: flex;
  width: min(100%, 1320px);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0 28px;
}

.tabs {
  display: flex;
  gap: 3px;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 14px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab:hover {
  color: #d9dfeb;
}

.tab.is-active {
  border-bottom-color: var(--cyan);
  color: var(--cyan);
}

.tab-note {
  color: #50576a;
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

/* ---------- 页面布局 ---------- */

.page {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 32px 28px 56px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.page-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.022);
}

/* ---------- 统计卡 ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(var(--stat-rgb), 0.045), transparent 58%),
    var(--card);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.stat-card::before {
  position: absolute;
  top: -1px;
  right: 20px;
  left: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--stat-rgb), 0.5), transparent);
  content: "";
}

.stat-card:hover {
  border-color: rgba(var(--stat-rgb), 0.2);
  transform: translateY(-2px);
}

.stat-total { --stat-rgb: 37, 244, 238; }
.stat-active { --stat-rgb: 51, 214, 159; }
.stat-expiring { --stat-rgb: 255, 176, 32; }
.stat-expired { --stat-rgb: 254, 44, 85; }
.stat-revoked { --stat-rgb: 177, 140, 255; }

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

.stat-label {
  color: #a4acbc;
  font-size: 11.5px;
}

.stat-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--stat-rgb), 0.14);
  border-radius: 9px;
  background: rgba(var(--stat-rgb), 0.07);
  color: rgb(var(--stat-rgb));
}

.stat-icon svg {
  width: 15px;
  height: 15px;
}

.stat-number {
  display: block;
  margin-top: 8px;
  color: rgb(var(--stat-rgb));
  font-family: var(--font-sans);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-note {
  display: block;
  margin-top: 5px;
  color: #646c7e;
  font-size: 10.5px;
}

/* ---------- 表格 ---------- */

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 13px;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  color: #5f6778;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-input {
  height: 39px;
  padding-left: 38px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select {
  width: auto;
  min-width: 112px;
  height: 38px;
  padding-right: 30px;
  color: #c4ccda;
  font-size: 11.5px;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 10px;
  color: #6d7587;
  font-size: 10.5px;
}

.table-meta-top {
  padding-top: 15px;
}

.meta-tip {
  color: #50586a;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-color: #343b49 transparent;
  scrollbar-width: thin;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #303744;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.license-table {
  min-width: 1180px;
}

.event-table {
  min-width: 900px;
}

.data-table th {
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  color: #70788b;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #c4cbd8;
  font-size: 12px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.th-actions {
  text-align: right !important;
}

.customer-link {
  max-width: 200px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: #eef2f8;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-link:hover {
  color: var(--cyan);
}

.machine-cell {
  display: flex;
  max-width: 220px;
  align-items: center;
  gap: 5px;
}

.machine-code {
  overflow: hidden;
  color: #aeb8ca;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-mini,
.icon-button,
.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6d7689;
  transition: color 0.15s ease, background 0.15s ease;
}

.copy-mini {
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 6px;
}

.copy-mini svg {
  width: 13px;
  height: 13px;
}

.copy-mini:hover {
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--cyan);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.tier-personal {
  border-color: rgba(var(--cyan-rgb), 0.2);
  background: rgba(var(--cyan-rgb), 0.075);
  color: #72f9f4;
}

.tier-enterprise {
  border-color: rgba(var(--blue-rgb), 0.22);
  background: rgba(var(--blue-rgb), 0.08);
  color: #9dc4ff;
}

.tier-pro {
  border-color: rgba(var(--amber-rgb), 0.22);
  background: rgba(var(--amber-rgb), 0.08);
  color: #ffd077;
}

.duration-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(var(--violet-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--violet-rgb), 0.065);
  color: #c9b4ff;
  font-size: 10.5px;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  white-space: nowrap;
}

.status-badge::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-active {
  border-color: rgba(var(--green-rgb), 0.18);
  background: rgba(var(--green-rgb), 0.07);
  color: #62e6b6;
}

.status-revoked {
  border-color: rgba(var(--red-rgb), 0.18);
  background: rgba(var(--red-rgb), 0.07);
  color: #ff718c;
}

.online-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #858da0;
  font-size: 10.5px;
  white-space: nowrap;
}

.online-state-badge::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.online-state-badge.state-online {
  border-color: rgba(var(--green-rgb), 0.2);
  background: rgba(var(--green-rgb), 0.07);
  color: #62e6b6;
}

.online-state-badge.state-stale {
  border-color: rgba(var(--amber-rgb), 0.2);
  background: rgba(var(--amber-rgb), 0.07);
  color: #ffc35a;
}

.online-state-badge.state-never {
  border-color: rgba(var(--blue-rgb), 0.2);
  background: rgba(var(--blue-rgb), 0.065);
  color: #9dc4ff;
}

.online-state-badge.state-offline {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #7c8496;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  white-space: nowrap;
}

.online-badge.online-on {
  border-color: rgba(var(--green-rgb), 0.2);
  background: rgba(var(--green-rgb), 0.07);
  color: #72e9bc;
}

.online-badge.online-off {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #7c8496;
}

.date-cell {
  color: #b9c2d1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.date-permanent {
  color: var(--cyan);
}

.date-soon {
  color: var(--amber);
}

.date-expired {
  color: #ff6b86;
}

.issue-time {
  color: #8e97a8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.row-action {
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7e8799;
  font-size: 10.5px;
  transition: color 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}

.row-action:hover {
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--cyan);
}

.row-action.is-danger:hover {
  background: rgba(var(--red-rgb), 0.08);
  color: #ff718c;
}

.row-action:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.row-action:disabled:hover {
  background: transparent;
  color: #7e8799;
}

.empty-cell {
  padding: 52px 20px !important;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--dim);
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 11px;
  color: #42495a;
}

.empty-state strong {
  color: #939bad;
  font-size: 13px;
  font-weight: 500;
}

.empty-state span {
  margin-top: 4px;
  font-size: 11px;
}

.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.loading-row::before {
  width: 12px;
  height: 12px;
  border: 2px solid #434b5c;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  content: "";
}

.event-action {
  display: inline-flex;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: #b6bfd0;
  font-size: 10.5px;
  white-space: nowrap;
}

.event-action.action-create {
  border-color: rgba(var(--cyan-rgb), 0.17);
  background: rgba(var(--cyan-rgb), 0.055);
  color: #7cf8f3;
}

.event-action.action-update {
  border-color: rgba(var(--blue-rgb), 0.18);
  background: rgba(var(--blue-rgb), 0.06);
  color: #a3c7ff;
}

.event-action.action-revoke {
  border-color: rgba(var(--red-rgb), 0.18);
  background: rgba(var(--red-rgb), 0.06);
  color: #ff8298;
}

.event-action.action-restore {
  border-color: rgba(var(--green-rgb), 0.18);
  background: rgba(var(--green-rgb), 0.06);
  color: #73e9bd;
}

.event-detail {
  max-width: 420px;
  color: #919bad;
  line-height: 1.6;
}

.event-id {
  color: #8992a4;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.site-footer {
  display: flex;
  width: min(100%, 1320px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 0 28px 30px;
  color: #454c5c;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ---------- 新建授权 ---------- */

.new-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 20px;
}

.form-panel {
  padding: 4px 26px;
}

.form-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 1px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--dim);
  font-size: 11px;
}

.step-badge {
  display: inline-flex;
  width: 27px;
  height: 27px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--cyan-rgb), 0.18);
  border-radius: 8px;
  background: rgba(var(--cyan-rgb), 0.055);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.field {
  position: relative;
}

.field + .field {
  margin-top: 16px;
}

.textarea {
  height: auto;
  min-height: 74px;
  padding: 10px 13px;
  line-height: 1.6;
  resize: vertical;
}

.note-textarea {
  min-height: 78px;
}

.machine-input {
  min-height: 74px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.75;
}

.field-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.field-hint {
  margin: 0;
  color: #5c6476;
  font-size: 10.5px;
  line-height: 1.6;
}

.char-count {
  flex: none;
  color: #4e5668;
  font-family: var(--font-mono);
  font-size: 10px;
}

.online-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 16px;
  border: 1px solid rgba(var(--green-rgb), 0.18);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(var(--green-rgb), 0.055), transparent 66%),
    #101219;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.online-toggle:hover {
  border-color: rgba(var(--green-rgb), 0.3);
}

.online-toggle:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.08);
}

.online-toggle-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.online-toggle-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #dce3ee;
  font-size: 12px;
  font-weight: 500;
}

.online-toggle-desc {
  color: #6d7688;
  font-size: 10px;
  line-height: 1.65;
}

.recommend-pill {
  padding: 1px 6px;
  border: 1px solid rgba(var(--cyan-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--cyan-rgb), 0.07);
  color: var(--cyan);
  font-size: 8.5px;
  font-weight: 400;
}

.online-toggle input {
  position: absolute;
  top: 50%;
  right: 13px;
  z-index: 2;
  width: 48px;
  height: 30px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: none;
  border: 1px solid #353d4d;
  border-radius: 999px;
  background: #171a22;
  pointer-events: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #6c7486;
  content: "";
  transition: transform 0.16s ease, background 0.16s ease;
}

.online-toggle input:checked + .switch {
  border-color: rgba(var(--green-rgb), 0.38);
  background: rgba(var(--green-rgb), 0.15);
}

.online-toggle input:checked + .switch::after {
  background: var(--green);
  box-shadow: 0 0 9px rgba(var(--green-rgb), 0.55);
  transform: translateX(18px);
}

.online-toggle input:focus-visible + .switch {
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.14);
}

.online-toggle-compact {
  margin-top: 15px;
  padding: 12px 14px;
  border-color: var(--line);
  background: #101219;
}

.online-toggle-compact:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.08);
}

.online-toggle-hint {
  margin-top: 8px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tier-card {
  position: relative;
  display: flex;
  min-height: 196px;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101219;
  cursor: pointer;
  transition: border-color 0.17s ease, background 0.17s ease, box-shadow 0.17s ease;
}

.tier-card:hover {
  border-color: var(--line-strong);
  background: #12151d;
}

.tier-card.is-selected {
  border-color: rgba(var(--cyan-rgb), 0.44);
  background:
    linear-gradient(150deg, rgba(var(--cyan-rgb), 0.075), transparent 60%),
    #11151b;
  box-shadow: 0 0 0 1px rgba(var(--cyan-rgb), 0.06), inset 0 1px rgba(var(--cyan-rgb), 0.08);
}

.tier-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.tier-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-radio {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #41495a;
  border-radius: 50%;
  transition: border-color 0.17s ease;
}

.tier-radio::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  content: "";
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.17s ease, transform 0.17s ease;
}

.tier-card.is-selected .tier-radio {
  border-color: var(--cyan);
}

.tier-card.is-selected .tier-radio::after {
  opacity: 1;
  transform: scale(1);
}

.tier-card:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.11);
}

.tier-desc {
  color: #7d8598;
  font-size: 10.5px;
  line-height: 1.55;
}

.tier-limit {
  color: #d0d7e4;
  font-size: 11.5px;
  font-weight: 500;
}

.tier-perms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.perm {
  position: relative;
  padding-left: 13px;
  font-size: 9.5px;
  line-height: 1.5;
}

.perm::before {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-sans);
  font-weight: 700;
}

.perm.yes {
  color: #79bda5;
}

.perm.yes::before {
  color: var(--green);
  content: "✓";
}

.perm.no {
  color: #6a5560;
}

.perm.no::before {
  color: #a45a6a;
  content: "×";
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}

.segment {
  min-width: 84px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7d8597;
  font-size: 11.5px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.segment:hover {
  color: #d2d9e6;
}

.segment.is-active {
  border-color: rgba(var(--cyan-rgb), 0.19);
  background: rgba(var(--cyan-rgb), 0.1);
  color: var(--cyan);
  box-shadow: inset 0 1px rgba(var(--cyan-rgb), 0.1);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 21px 0 25px;
}

.preview-column {
  position: sticky;
  top: 145px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-card {
  position: relative;
  overflow: hidden;
  padding: 23px;
}

.preview-glow {
  position: absolute;
  top: -90px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.1), transparent 68%);
  pointer-events: none;
}

.preview-customer {
  position: relative;
  overflow: hidden;
  margin: 2px 0 10px;
  color: #e8edf5;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-customer.is-placeholder {
  color: #5d6577;
}

.preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-list {
  margin: 19px 0 0;
}

.preview-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.preview-list dt {
  flex: none;
  color: #687184;
  font-size: 10.5px;
}

.preview-list dd {
  margin: 0;
  color: #bcc5d4;
  font-size: 11px;
  text-align: right;
  word-break: break-all;
}

.preview-list dd.preview-expires {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.preview-machine {
  max-width: 212px;
  font-family: var(--font-mono);
  font-size: 9.5px !important;
  line-height: 1.6;
}

.preview-perms {
  margin-top: 17px;
}

.preview-perms-title {
  display: block;
  margin-bottom: 8px;
  color: #6d7588;
  font-size: 10px;
  letter-spacing: 0.07em;
}

.preview-feature-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-feature {
  position: relative;
  padding-left: 16px;
  color: #929cad;
  font-size: 10.5px;
  line-height: 1.5;
}

.preview-feature::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--cyan);
  content: "·";
  font-size: 16px;
  line-height: 1.1;
}

.preview-foot {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #596173;
  font-size: 9.5px;
  line-height: 1.6;
}

.tip-card {
  padding: 18px 20px;
  background: #11131a;
}

.tip-card h3 {
  margin: 0 0 9px;
  color: #aeb6c7;
  font-size: 11.5px;
  font-weight: 500;
}

.tip-card ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tip-card li {
  position: relative;
  padding-left: 13px;
  color: #6f788b;
  font-size: 10px;
  line-height: 1.68;
}

.tip-card li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #465064;
  content: "—";
}

/* ---------- 模态框 ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(9px);
  animation: overlay-in 0.16s ease-out;
}

#result-modal {
  z-index: 110;
}

#confirm-modal {
  z-index: 120;
}

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

.modal {
  display: flex;
  width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lg), inset 0 1px rgba(255, 255, 255, 0.04);
  animation: modal-in 0.2s cubic-bezier(0.2, 0.75, 0.25, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-wide {
  width: min(100%, 980px);
}

.modal-result {
  width: min(100%, 566px);
}

.modal-confirm {
  width: min(100%, 438px);
  padding: 28px;
}

.modal-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 25px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-title-block h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.icon-button {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
}

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

.icon-button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.modal-body {
  overflow-y: auto;
  padding: 20px 25px 25px;
  scrollbar-color: #343b49 transparent;
  scrollbar-width: thin;
}

.modal-foot {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 25px;
  border-top: 1px solid var(--line);
  background: rgba(12, 14, 19, 0.65);
}

.foot-actions-left,
.foot-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.offline-note {
  margin-bottom: 17px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--amber-rgb), 0.13);
  border-left: 2px solid rgba(var(--amber-rgb), 0.5);
  border-radius: 8px;
  background: rgba(var(--amber-rgb), 0.035);
  color: #9b8968;
  font-size: 10.5px;
  line-height: 1.65;
}

.inline-alert {
  margin-bottom: 17px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--red-rgb), 0.17);
  border-radius: 8px;
  background: rgba(var(--red-rgb), 0.055);
  color: #e795a5;
  font-size: 10.5px;
  line-height: 1.65;
}

.detail-meta-grid {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.detail-meta-grid > div {
  min-width: 0;
  padding: 11px 13px;
  background: #11131a;
}

.detail-meta-grid .meta-machine {
  grid-column: span 2;
}

#detail-revoked-row {
  grid-column: span 3;
}

.detail-meta-grid dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #656e80;
  font-size: 9.5px;
}

.detail-meta-grid dd {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  color: #c0c8d6;
  font-size: 11.5px;
  line-height: 1.5;
}

.online-panel {
  margin: 0 0 22px;
  padding: 16px 17px;
  border: 1px solid rgba(var(--blue-rgb), 0.12);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(var(--blue-rgb), 0.045), transparent 60%),
    #11131a;
}

.online-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.online-panel-head h3 {
  margin: 0;
  color: #d9e0eb;
  font-size: 13px;
  font-weight: 600;
}

.online-panel-head p:last-child {
  margin: 4px 0 0;
  color: #727b8d;
  font-size: 10px;
  line-height: 1.65;
}

.online-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.online-meta > div {
  min-width: 0;
  padding: 9px 11px;
  background: #0f1218;
}

.online-meta dt {
  color: #626b7d;
  font-size: 9px;
}

.online-meta dd {
  overflow-wrap: anywhere;
  margin: 3px 0 0;
  color: #aeb8c8;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.mini-link {
  padding: 1px 5px;
  border: 1px solid rgba(var(--cyan-rgb), 0.14);
  border-radius: 4px;
  color: #71aaa8;
  font-size: 9px;
}

.mini-link:hover {
  background: rgba(var(--cyan-rgb), 0.08);
  color: var(--cyan);
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 13px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.section-title-row p {
  margin: 3px 0 0;
  color: #626a7c;
  font-size: 10px;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.detail-form-grid .field + .field {
  margin-top: 0;
}

.detail-note-field {
  grid-column: span 2;
}

.detail-form .textarea {
  min-height: 64px;
}

.check-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  color: #aeb6c5;
  font-size: 11px;
  cursor: pointer;
}

.check-row input {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check-box {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  border: 1px solid #3a4252;
  border-radius: 5px;
  background: var(--field);
  pointer-events: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-box::after {
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 8px;
  border-right: 2px solid #041416;
  border-bottom: 2px solid #041416;
  content: "";
  opacity: 0;
  transform: rotate(42deg) scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.check-row input:checked + .check-box {
  border-color: var(--cyan);
  background: var(--cyan);
}

.check-row input:checked + .check-box::after {
  opacity: 1;
  transform: rotate(42deg) scale(1);
}

.check-row input:focus-visible + .check-box {
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.14);
}

.check-row small {
  flex-basis: 100%;
  padding-left: 25px;
  color: #596173;
  font-size: 9.5px;
  pointer-events: none;
}

.detail-expiry-preview {
  margin-top: 11px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: #778194;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.license-text-heading {
  margin-top: 23px;
}

.license-text {
  width: 100%;
  height: 168px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #0b0d12;
  color: #7f8a9e;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  resize: vertical;
  word-break: break-all;
}

.license-text:focus {
  border-color: rgba(var(--cyan-rgb), 0.24);
}

/* ---------- 签发结果 ---------- */

.result-head {
  position: relative;
  padding: 29px 30px 21px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(360px 180px at 50% -20%, rgba(var(--cyan-rgb), 0.11), transparent 70%),
    #14161d;
  text-align: center;
}

.result-check {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  border-radius: 50%;
  background: rgba(var(--cyan-rgb), 0.09);
  box-shadow: 0 0 0 7px rgba(var(--cyan-rgb), 0.03);
  color: var(--cyan);
}

.result-check svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.result-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.result-head p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.result-body {
  padding: 20px 26px 8px;
}

.result-grid {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.result-grid > div {
  min-width: 0;
  padding: 10px 12px;
  background: #11131a;
}

.result-grid .result-wide {
  grid-column: span 2;
}

.result-grid dt {
  color: #626b7d;
  font-size: 9.5px;
}

.result-grid dd {
  overflow-wrap: anywhere;
  margin: 3px 0 0;
  color: #d4dbe7;
  font-size: 11.5px;
  line-height: 1.5;
}

.result-grid dd.mono {
  color: #aab6c8;
  font-size: 10.5px;
}

.result-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(var(--cyan-rgb), 0.035);
  color: #6e8b8d;
  font-size: 9.5px;
  line-height: 1.65;
}

.result-note svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.result-actions {
  display: flex;
  gap: 9px;
  padding: 13px 26px 11px;
}

.result-actions .btn {
  flex: 1;
}

.result-done {
  display: block;
  margin: 0 auto;
  padding: 11px 20px 18px;
  border: 0;
  background: transparent;
  color: #697285;
  font-size: 10.5px;
}

.result-done:hover {
  color: var(--text);
}

/* ---------- 确认框 ---------- */

.confirm-icon {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  border: 1px solid rgba(var(--amber-rgb), 0.24);
  border-radius: 12px;
  background: rgba(var(--amber-rgb), 0.075);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.confirm-icon.is-danger {
  border-color: rgba(var(--red-rgb), 0.24);
  background: rgba(var(--red-rgb), 0.075);
  color: var(--red);
}

.modal-confirm h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.confirm-message {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.confirm-warning {
  margin-top: 14px;
  padding: 9px 11px;
  border-left: 2px solid rgba(var(--amber-rgb), 0.48);
  border-radius: 6px;
  background: rgba(var(--amber-rgb), 0.04);
  color: #9a8a6d;
  font-size: 10px;
  line-height: 1.65;
}

#confirm-reason-field {
  margin-top: 15px;
}

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

/* ---------- 提示 ---------- */

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  width: min(364px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

body.modal-open .toast-container {
  bottom: 96px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(24, 27, 35, 0.97);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.45);
  color: #c9d1df;
  font-size: 11.5px;
  line-height: 1.6;
  pointer-events: none;
  animation: toast-in 0.22s ease-out;
}

.toast.is-leaving {
  animation: toast-out 0.18s ease-in forwards;
}

.toast-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: none;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.toast-success { border-left-color: var(--green); }
.toast-success .toast-icon { background: rgba(var(--green-rgb), 0.1); color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-error .toast-icon { background: rgba(var(--red-rgb), 0.1); color: #ff718c; }
.toast-warning { border-left-color: var(--amber); }
.toast-warning .toast-icon { background: rgba(var(--amber-rgb), 0.1); color: var(--amber); }
.toast-info { border-left-color: var(--cyan); }
.toast-info .toast-icon { background: rgba(var(--cyan-rgb), 0.1); color: var(--cyan); }

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

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px); }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tab-note {
    display: none;
  }
}

@media (max-width: 1040px) {
  .new-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-column {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar-inner,
  .tabbar-inner,
  .page,
  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .page {
    padding-top: 25px;
  }

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

  .tier-card {
    min-height: 0;
  }

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

  .detail-meta-grid .meta-machine {
    grid-column: span 2;
  }

  #detail-revoked-row {
    grid-column: span 2;
  }

  .modal-wide {
    width: min(100%, 860px);
  }
}

@media (max-width: 760px) {
  .service-pill {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .page-heading > .btn {
    align-self: stretch;
  }

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

  .stat-card:last-child {
    grid-column: span 2;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    max-width: none;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .filter-group .select {
    flex: 1;
  }

  .preview-column {
    grid-template-columns: 1fr;
  }

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

  .detail-form-grid {
    grid-template-columns: 1fr;
  }

  .detail-note-field {
    grid-column: auto;
  }

  .modal-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .foot-actions-left,
  .foot-actions-right {
    width: 100%;
  }

  .foot-actions-right {
    justify-content: flex-end;
  }

  .detail-foot .btn {
    flex: 1;
  }

  .toast-container {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 620px) {
  .login-view {
    padding: 20px 15px;
  }

  .login-card {
    padding: 29px 22px 22px;
    border-radius: 20px;
  }

  .login-heading {
    margin-top: 27px;
  }

  .login-heading h1 {
    font-size: 27px;
  }

  .login-hint {
    font-size: 10.5px;
  }

  .topbar-inner {
    height: 62px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .tabbar {
    top: 62px;
  }

  .tabbar-inner {
    padding-right: 8px;
    padding-left: 8px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 11.5px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 12.5px;
  }

  .user-chip {
    padding-right: 7px;
  }

  .user-chip span:last-child {
    display: none;
  }

  .page {
    padding: 21px 14px 42px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 13px 13px 12px;
  }

  .stat-number {
    font-size: 25px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 19px 19px 0 0;
  }

  .modal-wide,
  .modal-result,
  .modal-confirm {
    width: 100%;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta-grid .meta-machine {
    grid-column: auto;
  }

  #detail-revoked-row {
    grid-column: auto;
  }

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

  .result-grid .result-wide {
    grid-column: auto;
  }

  .result-head,
  .result-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .result-actions {
    flex-direction: column;
    padding-right: 20px;
    padding-left: 20px;
  }

  .foot-actions-left {
    flex-wrap: nowrap;
  }

  .foot-actions-right {
    flex-wrap: wrap;
  }

  .site-footer {
    flex-wrap: wrap;
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 430px) {
  .login-foot {
    gap: 7px;
    font-size: 9px;
  }

  .segmented {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .segment {
    min-width: 0;
  }

  .form-panel {
    padding-right: 17px;
    padding-left: 17px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .modal-confirm {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
