/* =========================================================
   巨量发发授权中心 / 设计基线
   ========================================================= */
:root {
  --brand: #3370ff;
  --brand-strong: #245bdb;
  --brand-50: #eef4ff;
  --brand-100: #dbe7ff;
  --ink: #1d2129;
  --ink-2: #4e5969;
  --ink-3: #86909c;
  --line: #e7eaf0;
  --line-strong: #d5dae4;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --green: #00a63e;
  --green-strong: #008a34;
  --green-soft: #e9f9ef;
  --orange: #e37300;
  --orange-soft: #fff5e6;
  --red: #e63a3a;
  --red-soft: #ffefed;
  --purple: #722ed1;
  --purple-soft: #f4edff;
  --gray-soft: #f2f3f5;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-strong);
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
dt,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

code {
  background: var(--gray-soft);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--ink-2);
}

.icon {
  flex: none;
}

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

.strong {
  font-weight: 600;
  color: var(--ink);
}

.sub {
  color: var(--ink-3);
  font-size: 12px;
}

.small {
  font-size: 12px;
}

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

.warning-text {
  color: var(--orange);
}

.spacer {
  flex: 1;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

::selection {
  background: var(--brand-100);
}

/* =========================================================
   布局 / 侧边栏 / 顶栏
   ========================================================= */
.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 10px 22px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #4b8bff, #245bdb);
  box-shadow: 0 6px 14px rgba(51, 112, 255, 0.28);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.brand-text small {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.6px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.16s, color 0.16s;
}

.nav a:hover {
  background: #f6f8fc;
  color: var(--ink);
}

.nav a.active {
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600;
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}

.sidebar-foot {
  margin-top: auto;
}

.sidebar-tip {
  display: flex;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}

.tip-icon {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-tip p {
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.55;
}

.sidebar-tip code {
  font-size: 10.5px;
  color: var(--brand-strong);
  background: var(--brand-50);
}

.sidebar-copy {
  margin-top: 12px;
  color: #a9b0bd;
  font-size: 10.5px;
  text-align: center;
  letter-spacing: 0.3px;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 232px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 13px;
}

.crumb i {
  color: #c3c8d1;
  font-style: normal;
}

.crumb strong {
  color: var(--ink-2);
  font-weight: 500;
}

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

.env-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.env-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.env-chip.is-mock {
  color: var(--orange);
  border-color: #ffe1bd;
  background: #fffaf3;
}

.env-chip.is-live {
  color: var(--green);
  border-color: #bcebd0;
  background: #f6fdf9;
}

.env-chip.is-live i {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px;
}

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

.page-head h1 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

.page-head p {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.page-head-action {
  flex: none;
  margin-top: 4px;
}

.page-head-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-3);
  font-size: 12px;
}

/* =========================================================
   按钮 / 表单控件
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s,
    transform 0.06s;
}

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

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(51, 112, 255, 0.22);
}

.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-50);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 9px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  transition: background 0.16s, color 0.16s;
}

.icon-btn:hover {
  background: var(--gray-soft);
  color: var(--ink);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 5px;
}

.text-btn:hover {
  background: var(--brand-50);
  color: var(--brand-strong);
}

.text-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.13);
}

.textarea {
  resize: vertical;
  line-height: 1.6;
}

.textarea.mono {
  font-size: 13px;
}

.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.select-compact {
  width: auto;
  min-width: 120px;
  height: 34px;
  min-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12.5px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.grow {
  flex: 1;
}

.field-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.req {
  color: var(--red);
  font-style: normal;
}

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

.hint {
  color: var(--ink-3);
  font-size: 11.5px;
}

.counter {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}

.counter.over {
  color: var(--red);
}

.field-hint {
  color: var(--ink-3);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  transition: all 0.16s;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-50);
}

.chip.selected {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-50);
  font-weight: 600;
}

.chip-sm {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

/* =========================================================
   统计卡 / 面板 / 表格
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 108px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  color: var(--ink-3);
  font-size: 12.5px;
}

.stat-value {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  color: var(--ink-3);
  font-size: 11.5px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.stat-icon.blue {
  background: var(--brand-50);
  color: var(--brand);
}

.stat-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.skeleton-card {
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.75),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
  background: #f6f8fc;
}

.tab.active {
  color: var(--brand);
  background: var(--brand-50);
  font-weight: 600;
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(51, 112, 255, 0.12);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.tab:not(.active) .tab-count {
  background: var(--gray-soft);
  color: var(--ink-3);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
}

.search .icon {
  position: absolute;
  left: 10px;
  color: var(--ink-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 33px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f0f2f6;
  vertical-align: middle;
}

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

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: #fafcff;
}

.th-actions,
.td-actions {
  text-align: right;
  white-space: nowrap;
}

.td-actions .text-btn,
.td-actions .icon-btn {
  vertical-align: middle;
}

.table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 46px 0;
  color: var(--ink-3);
  font-size: 13px;
}

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

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef4ff, #dbe7ff);
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.avatar-lg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 18px;
}

.entity-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entity-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.entity-sub {
  color: var(--ink-3);
  font-size: 11px;
}

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

.stack > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.type-self {
  background: var(--brand-50);
  color: var(--brand);
}

.type-coop {
  background: var(--purple-soft);
  color: var(--purple);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

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

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

.status-authorized {
  background: var(--green-soft);
  color: var(--green-strong);
}

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

.status-expired {
  background: var(--gray-soft);
  color: #707a89;
}

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

.note-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 260px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.note-cell .quote {
  color: #b8c4d8;
}

.note-column {
  max-width: 280px;
}

.note-meta {
  margin-top: 4px;
}

.note-th {
  min-width: 220px;
}

.note-edit {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.note-edit:hover {
  color: var(--brand);
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.sync-ok {
  background: var(--green-soft);
  color: var(--green-strong);
}

.sync-warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.sync-wait {
  background: var(--brand-50);
  color: var(--brand);
}

.sync-empty {
  background: var(--gray-soft);
  color: var(--ink-3);
}

.hl {
  background: #fff1b8;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}

.result-count {
  color: var(--ink-3);
  font-size: 12px;
}

.result-count strong {
  color: var(--ink-2);
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.page-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--brand-50);
  color: var(--brand);
}

.empty h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.empty p {
  max-width: 340px;
  margin-bottom: 16px;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* =========================================================
   详情抽屉 / 弹窗 / 时间线
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0;
  transition: opacity 0.18s;
}

.overlay.open {
  opacity: 1;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.36);
  backdrop-filter: blur(2px);
}

.drawer {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 580px;
  max-width: 94vw;
  background: #fff;
  box-shadow: -18px 0 50px rgba(16, 24, 40, 0.16);
  transform: translateX(28px);
  transition: transform 0.22s ease;
}

.overlay.open .drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-eyebrow {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3px;
}

.drawer-head h2 {
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: -0.2px;
}

.drawer-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-body {
  flex: 1;
  padding: 20px 22px 28px;
  overflow-y: auto;
}

.drawer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  color: var(--ink-3);
  font-size: 13px;
}

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}

.note-panel {
  padding: 15px 16px;
  border: 1px solid #dbe7ff;
  border-radius: 11px;
  background: linear-gradient(135deg, #f7faff, #eef4ff);
}

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

.note-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.note-panel-text {
  margin-top: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  word-break: break-word;
}

.note-panel-hint {
  margin-top: 7px;
  color: #6b7c99;
  font-size: 11.5px;
  line-height: 1.55;
}

.note-panel-hint code {
  background: rgba(51, 112, 255, 0.1);
  color: var(--brand-strong);
}

.note-edit-btn {
  margin-top: 10px;
  height: 28px;
  background: #fff;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h3 {
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 18px;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.detail-label {
  color: var(--ink-3);
  font-size: 11.5px;
}

.detail-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--ink-2);
  font-size: 13px;
  word-break: break-word;
}

.invite-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.invite-link-row .input {
  flex: 1;
  height: 34px;
  min-height: 34px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: #fafbfd;
}

.timeline {
  position: relative;
  padding-left: 2px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  flex: none;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #aab2c0;
  box-shadow: 0 0 0 1.5px #dbe0e8;
  z-index: 1;
}

.timeline-item.tone-blue .timeline-dot {
  background: var(--brand);
  box-shadow: 0 0 0 1.5px var(--brand-100);
}

.timeline-item.tone-green .timeline-dot {
  background: var(--green);
  box-shadow: 0 0 0 1.5px #bcebd0;
}

.timeline-item.tone-orange .timeline-dot {
  background: var(--orange);
  box-shadow: 0 0 0 1.5px #ffe1bd;
}

.timeline-item.tone-red .timeline-dot {
  background: var(--red);
  box-shadow: 0 0 0 1.5px #ffd1c9;
}

.timeline-main {
  flex: 1;
  min-width: 0;
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.timeline-head strong {
  font-size: 12.5px;
  font-weight: 600;
}

.timeline-head time {
  color: var(--ink-3);
  font-size: 10.5px;
  white-space: nowrap;
}

.timeline-main p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.55;
}

.debug-block {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
}

.debug-block summary {
  padding: 9px 12px;
  color: var(--ink-3);
  font-size: 11.5px;
  cursor: pointer;
}

.debug-block pre {
  max-height: 300px;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  overflow: auto;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.alert-error {
  border: 1px solid #ffd4cd;
  background: var(--red-soft);
  color: var(--red);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.16s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(3px);
}

.modal {
  position: relative;
  width: 540px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s ease;
}

@keyframes modalIn {
  from {
    transform: translateY(10px) scale(0.99);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

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

.modal-head h3 {
  font-size: 16px;
}

.modal-head p {
  margin-top: 3px;
}

.modal-body {
  padding: 18px 20px;
}

.modal-body .field {
  margin-bottom: 10px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

/* =========================================================
   Toast / Spinner
   ========================================================= */
.toast-root {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--ink-2);
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
}

.toast-success .toast-dot {
  background: var(--green);
}

.toast-error .toast-dot {
  background: var(--red);
}

.toast-warning .toast-dot {
  background: var(--orange);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #d7e2f8;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 1.8px;
}

.spinner-lg {
  width: 28px;
  height: 28px;
  border-width: 2.5px;
}

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

.icon-btn.spin .icon {
  animation: spin 0.8s linear infinite;
}

/* =========================================================
   批量发起
   ========================================================= */
.head-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.head-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.head-step em {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--gray-soft);
  color: var(--ink-3);
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
}

.head-step.active {
  color: var(--brand);
}

.head-step.active em {
  background: var(--brand);
  color: #fff;
}

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

.form-panel {
  overflow: visible;
}

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

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

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.section-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.form-section-head h2 {
  font-size: 15px;
  line-height: 1.4;
}

.form-section-head p {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.form-section-head p strong {
  color: var(--ink-2);
}

.account-picker {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.sync-account {
  height: 38px;
  flex: none;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfd;
}

.account-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
}

.account-card-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.account-card-main strong {
  font-size: 13px;
}

.account-card-main span {
  color: var(--ink-3);
  font-size: 11.5px;
}

.account-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
}

.status-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}

.status-dot.on {
  color: var(--green);
}

.status-dot.on::before {
  background: var(--green);
}

.status-dot.off {
  color: var(--red);
}

.status-dot.off::before {
  background: var(--red);
}

.inline-alert {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #ffe1bd;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--orange);
  font-size: 12px;
}

.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.radio-card:hover .radio-card-inner {
  border-color: #a9c3ff;
}

.radio-card.selected .radio-card-inner {
  border-color: var(--brand);
  background: #f8faff;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.08);
}

.radio-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.radio-title {
  font-size: 13.5px;
  font-weight: 600;
}

.radio-mark {
  width: 15px;
  height: 15px;
  flex: none;
  border: 1.5px solid #c7ceda;
  border-radius: 50%;
  background: #fff;
}

.radio-card.selected .radio-mark {
  border: 4.5px solid var(--brand);
}

.radio-desc {
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.radio-scope {
  color: var(--ink-3);
  font-size: 10.5px;
}

.batch-input {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.batch-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.11);
}

.batch-input .textarea {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  resize: none;
  background: #fcfdff;
}

.batch-input-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.batch-count {
  color: var(--ink-3);
  font-size: 11.5px;
}

.batch-count strong {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 13px;
}

.batch-count .dot {
  color: #cfd6e0;
  margin: 0 3px;
}

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

.id-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin-top: 9px;
}

.id-preview-empty {
  color: var(--ink-3);
  font-size: 11.5px;
}

.id-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfd;
  color: var(--ink-2);
  font-size: 11px;
}

.id-chip button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1;
}

.id-chip button:hover {
  background: var(--red-soft);
  color: var(--red);
}

.id-chip.invalid {
  border-color: #ffd1c9;
  background: var(--red-soft);
  color: var(--red);
}

.id-more {
  color: var(--ink-3);
  font-size: 11px;
}

.id-invalid-hint {
  color: var(--red);
  font-size: 11px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-duration {
  height: 36px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 13px;
}

.chip-duration strong {
  font-family: var(--mono);
  font-size: 14px;
}

.note-explain {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcff;
}

.note-explain-icon {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--brand-50);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.note-explain p {
  color: var(--ink-3);
  font-size: 11px;
}

.note-explain code {
  background: transparent;
  padding: 0;
  color: var(--ink-2);
  font-size: 10.5px;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #fcfdff;
}

.form-foot-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-size: 11px;
}

.secure-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.create-side {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-card {
  padding: 18px;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.summary-head h2 {
  font-size: 14px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 500;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 0;
}

.summary-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.summary-list dt {
  flex: none;
  color: var(--ink-3);
  font-size: 11.5px;
}

.summary-list dd {
  min-width: 0;
  color: var(--ink-2);
  font-size: 12px;
  text-align: right;
  word-break: break-word;
}

.summary-list dd strong {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 13px;
}

.summary-note {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfd;
}

.summary-note-label {
  color: var(--ink-3);
  font-size: 10.5px;
}

.summary-note p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.summary-note p.placeholder {
  color: var(--ink-3);
}

.summary-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.summary-status code {
  font-size: 9.5px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 10px;
  font-weight: 600;
}

.mode-pill.live {
  background: var(--green-soft);
  color: var(--green-strong);
}

.side-tip-card {
  padding: 17px 18px;
}

.side-tip-card h3 {
  font-size: 12.5px;
}

.side-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 12px 0 14px;
}

.side-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}

.side-steps li span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(3px);
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.loading-box strong {
  margin-top: 14px;
  font-size: 14px;
}

.loading-box p {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.result-panel {
  padding: 0;
  animation: fadeUp 0.28s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.result-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
}

.result-icon.success {
  background: var(--green-soft);
  color: var(--green);
}

.result-icon.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.result-icon.error {
  background: var(--red-soft);
  color: var(--red);
}

.result-title h2 {
  font-size: 19px;
  letter-spacing: -0.2px;
}

.result-title p {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12px;
}

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

.result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
}

.result-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
}

.result-stat.has-error {
  color: var(--red);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot.blue {
  background: var(--brand);
}

.dot.green {
  background: var(--green);
}

.dot.red {
  background: var(--red);
}

.dot.gray {
  background: #aab2c0;
}

.result-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 24px;
  padding: 11px 13px;
  border: 1px solid #dbe7ff;
  border-radius: 9px;
  background: #f7faff;
  flex-wrap: wrap;
}

.result-note-label {
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
}

.result-note-text {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.result-note-hint {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 10.5px;
}

.result-table {
  min-width: 760px;
}

.result-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

/* =========================================================
   后台管理
   ========================================================= */
.admin-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 10px;
}

.search-lg {
  width: min(520px, 100%);
}

.search-lg input {
  height: 40px;
  padding-left: 36px;
  font-size: 13px;
  background: #fbfcff;
}

.search-lg .icon {
  left: 12px;
}

.search-lg kbd {
  position: absolute;
  right: 10px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-3);
  font-family: var(--font);
  font-size: 9.5px;
}

.admin-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px 18px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
}

.clear-filter {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 11.5px;
}

.clear-filter:hover {
  color: var(--brand);
}

.admin-table {
  min-width: 1120px;
}

/* =========================================================
   授权邀请页
   ========================================================= */
.invite-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f6f8fc;
}

.invite-aura {
  position: fixed;
  top: -340px;
  left: 50%;
  width: 920px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(51, 112, 255, 0.16),
    rgba(51, 112, 255, 0) 68%
  );
  pointer-events: none;
}

.invite-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 22px 28px;
}

.brand-invite {
  padding: 0;
}

.safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #d9e6ff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #5b76a3;
  font-size: 11px;
}

.invite-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 22px 52px;
}

.invite-hero {
  padding: 18px 8px 24px;
  text-align: center;
  animation: fadeUp 0.35s ease;
}

.invite-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid #d9e6ff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 500;
}

.invite-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.invite-pill.subtle {
  margin-top: 14px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink-3);
}

.invite-hero h1 {
  margin-top: 13px;
  font-size: 29px;
  letter-spacing: -0.6px;
  line-height: 1.3;
}

.invite-hero p {
  max-width: 480px;
  margin: 8px auto 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
}

.invite-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(29, 43, 69, 0.08);
  animation: fadeUp 0.4s ease;
}

.invite-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 26px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.invite-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.invite-account-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.invite-account-label {
  color: var(--ink-3);
  font-size: 11px;
}

.invite-account-main strong {
  font-size: 18px;
  letter-spacing: 0.2px;
}

.invite-note {
  margin: 20px 0;
  padding: 15px 16px;
  border: 1px solid #d9e6ff;
  border-radius: 11px;
  background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
}

.invite-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.invite-note-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-strong);
  font-size: 11.5px;
  font-weight: 600;
}

.invite-note-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(51, 112, 255, 0.1);
  color: var(--brand-strong);
  font-family: var(--mono);
  font-size: 9.5px;
}

.invite-note-text {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  word-break: break-word;
}

.invite-note-hint {
  margin-top: 7px;
  color: #6f82a3;
  font-size: 10.5px;
  line-height: 1.5;
}

.invite-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 26px;
  border-top: 1px solid var(--line);
}

.invite-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2f6;
  min-width: 0;
}

.invite-detail dt {
  color: var(--ink-3);
  font-size: 11px;
}

.invite-detail dd {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
  word-break: break-word;
}

.invite-detail-sub {
  display: block;
  color: var(--ink-3);
  font-size: 10.5px;
}

.agreement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfdff;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.6;
  cursor: pointer;
}

.agreement input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-ui {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  border: 1.5px solid #c7ceda;
  border-radius: 4px;
  background: #fff;
  transition: all 0.15s;
}

.agreement input:checked + .checkbox-ui {
  border-color: var(--brand);
  background: var(--brand);
}

.agreement input:checked + .checkbox-ui::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.agreement input:focus-visible + .checkbox-ui {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.invite-actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  margin-top: 18px;
}

.invite-safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 15px;
  color: var(--ink-3);
  font-size: 10.5px;
  text-align: center;
}

.invite-demo {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid #ffe1bd;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--orange);
  font-size: 11px;
  line-height: 1.55;
}

.invite-result {
  padding: 38px 32px 30px;
  text-align: center;
}

.result-orb {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 50%;
}

.result-orb.success {
  background: var(--green-soft);
  color: var(--green);
  box-shadow: 0 0 0 8px rgba(0, 166, 62, 0.07);
}

.result-orb.rejected {
  background: var(--red-soft);
  color: var(--red);
}

.result-orb.expired {
  background: var(--gray-soft);
  color: var(--ink-3);
}

.invite-result h1 {
  margin-top: 16px;
  font-size: 25px;
  letter-spacing: -0.4px;
}

.invite-result-desc {
  max-width: 440px;
  margin: 8px auto 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
}

.invite-result-desc strong {
  color: var(--ink);
}

.invite-result .invite-note {
  margin-top: 22px;
  text-align: left;
}

.invite-result .invite-details {
  margin-top: 6px;
  text-align: left;
}

.invite-result-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
}

.invite-result-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.invite-footer {
  position: relative;
  z-index: 1;
  padding: 0 24px 30px;
  color: #9aa4b5;
  font-size: 10.5px;
  text-align: center;
}

.invite-footer-sub {
  margin-top: 3px;
  color: #b3bbc8;
  font-size: 10px;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1120px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .toolbar-right .search {
    width: 210px;
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .brand {
    padding: 0;
    flex: none;
  }

  .brand-text {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 17px;
    border-radius: 9px;
  }

  .nav {
    flex-direction: row;
    gap: 2px;
  }

  .nav a {
    height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .nav a.active::before {
    display: none;
  }

  .sidebar-foot {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    top: 0;
    height: 56px;
    padding: 0 18px;
  }

  .content {
    padding: 20px 18px;
  }

  .page-head {
    flex-direction: column;
    gap: 10px;
  }

  .page-head-action {
    margin-top: 0;
  }

  .create-layout {
    grid-template-columns: 1fr;
  }

  .create-side {
    position: static;
    order: -1;
  }

  .summary-card {
    padding: 15px 16px;
  }

  .summary-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 20px;
  }

  .summary-status,
  .summary-note {
    display: none;
  }

  .admin-search {
    flex-direction: column;
    align-items: stretch;
  }

  .search-lg {
    width: 100%;
  }

  .admin-search-actions {
    flex-wrap: wrap;
  }

  .admin-search-actions .btn {
    margin-left: auto;
  }

  .result-head {
    flex-direction: column;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .head-steps {
    display: none;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 16px 14px;
  }

  .topbar {
    padding: 0 14px;
  }

  .crumb span,
  .crumb i {
    display: none;
  }

  .top-actions .env-chip {
    display: none;
  }

  .stats {
    gap: 10px;
  }

  .stat-card {
    min-height: 96px;
    padding: 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
  }

  .panel-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .toolbar-right {
    flex-wrap: wrap;
  }

  .toolbar-right .search {
    width: 100%;
    order: -1;
  }

  .toolbar-right .select {
    flex: 1;
  }

  .panel-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .pagination {
    width: 100%;
    justify-content: flex-end;
  }

  .form-section {
    padding: 18px 16px;
  }

  .section-index {
    width: 23px;
    height: 23px;
  }

  .radio-cards {
    grid-template-columns: 1fr;
  }

  .form-foot {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 15px 16px;
  }

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

  .form-foot-hint {
    justify-content: center;
  }

  .result-head {
    padding: 18px 16px;
  }

  .result-stats {
    padding: 12px 16px;
  }

  .result-note {
    margin: 14px 16px;
  }

  .drawer {
    width: 100%;
    max-width: 100%;
  }

  .drawer-head {
    padding: 16px;
  }

  .drawer-body {
    padding: 16px;
  }

  .drawer-foot {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

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

  .invite-top {
    padding: 16px 18px;
  }

  .safe-badge {
    font-size: 10px;
  }

  .invite-main {
    padding: 4px 14px 36px;
  }

  .invite-hero h1 {
    font-size: 24px;
  }

  .invite-card {
    padding: 20px 17px;
    border-radius: 15px;
  }

  .invite-details {
    grid-template-columns: 1fr;
  }

  .invite-detail {
    padding: 11px 0;
  }

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

  .invite-actions .btn:first-child {
    order: 2;
  }

  .invite-result {
    padding: 30px 18px 24px;
  }

  .invite-result h1 {
    font-size: 22px;
  }

  .invite-note-text {
    font-size: 15px;
  }

  .invite-footer {
    padding: 0 16px 22px;
  }

  .modal {
    width: 100%;
  }

  .modal-overlay {
    padding: 14px;
  }

  .toast-root {
    top: 12px;
    width: calc(100% - 24px);
  }

  .toast {
    max-width: 100%;
  }
}

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