/* ============================================================
   RCGateway 控制台样式
   深灰蓝底 + 青绿点缀，纯原生 CSS，无外部依赖
   ============================================================ */

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

:root {
  --bg: #080d17;
  --bg-soft: #0b1220;
  --panel: #0f1a2b;
  --panel-2: #122036;
  --panel-3: #16263f;
  --border: #1d2f49;
  --border-strong: #2a4262;
  --text: #e6eef8;
  --text-soft: #c3d2e4;
  --muted: #8ba3bd;
  --faint: #5f7a97;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-2: #22d3ee;
  --accent-soft: rgba(45, 212, 191, 0.11);
  --accent-line: rgba(45, 212, 191, 0.32);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --violet: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 252px;
  --shadow: 0 18px 45px -18px rgba(0, 0, 0, 0.75);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Cascadia Mono",
    Consolas, "Liberation Mono", monospace;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 8% -12%, rgba(45, 212, 191, 0.1), transparent 62%),
    radial-gradient(900px 620px at 100% 0%, rgba(34, 211, 238, 0.07), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

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

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

::selection {
  background: rgba(45, 212, 191, 0.28);
  color: #fff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #29405d transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #29405d;
  border: 3px solid transparent;
  border-radius: 8px;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}

.icon svg {
  display: block;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

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

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

.link {
  color: var(--accent);
  border-bottom: 1px dashed rgba(45, 212, 191, 0.35);
}

.link:hover {
  border-bottom-style: solid;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
    box-shadow 0.16s ease, transform 0.06s ease;
}

.btn:hover {
  background: var(--panel-3);
  border-color: #35557c;
  color: var(--text);
}

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

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.28);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.is-busy {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(230, 238, 248, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  color: #04211d;
  font-weight: 650;
  box-shadow: 0 10px 24px -12px rgba(45, 212, 191, 0.8);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5eead4, #2dd4bf);
  border-color: transparent;
  color: #04211d;
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.35);
}

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

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: 7px;
  gap: 5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

/* ------------------------------------------------------------
   表单
   ------------------------------------------------------------ */

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

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea,
.input,
.select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0a1422;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input::placeholder,
.field textarea::placeholder,
.input::placeholder {
  color: #526b86;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
  background: #0c1828;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.field .hint {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

.field .field-error {
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.5;
}

select,
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #7d97b3 50%),
    linear-gradient(135deg, #7d97b3 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select option {
  background: #0d1929;
  color: var(--text);
}

.select-sm {
  width: auto;
  padding: 6px 30px 6px 10px;
  font-size: 12.5px;
}

.form-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.field-span {
  grid-column: 1 / -1;
}

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

.radio-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0a1422;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.radio-option:hover {
  border-color: #35557c;
}

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

.radio-option strong {
  font-size: 13px;
  color: var(--text-soft);
}

.radio-option span {
  font-size: 11.5px;
  color: var(--faint);
}

.radio-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-option:has(input:checked) strong {
  color: var(--accent-strong);
}

.radio-option:has(input:disabled) {
  opacity: 0.65;
  cursor: not-allowed;
}

.input-suffix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0a1422;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.input-suffix input {
  flex: 1;
  min-width: 0;
  padding: 9px 4px 9px 12px;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.input-suffix input:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.input-suffix .suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px 0 2px;
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.inline-field select {
  min-width: 170px;
}

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

.login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.login-glow-a {
  top: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.3), transparent 68%);
}

.login-glow-b {
  bottom: -260px;
  right: -180px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 68%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 408px;
  padding: 34px 32px 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(18, 32, 54, 0.96), rgba(10, 18, 30, 0.97));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: rise 0.35s ease both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(45, 212, 191, 0.55), transparent 38%, transparent 72%, rgba(34, 211, 238, 0.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 6px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.2), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--accent);
  box-shadow: 0 0 22px -6px rgba(45, 212, 191, 0.55);
}

.login-brand .brand-name {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #f1f7fc 10%, #5eead4 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.login-form .btn-block {
  margin-top: 6px;
  padding: 11px 16px;
  font-size: 14.5px;
}

.login-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   骨架布局
   ------------------------------------------------------------ */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(18, 32, 54, 0.55), rgba(9, 16, 28, 0.82)),
    rgba(8, 14, 24, 0.72);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 20px;
  border-bottom: 1px solid rgba(29, 47, 73, 0.7);
}

.brand .brand-name {
  display: block;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--text);
}

.brand .brand-name b {
  color: var(--accent);
  font-weight: 750;
}

.brand .brand-tag {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 18px;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-link .icon {
  color: var(--faint);
  transition: color 0.16s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.07);
}

.nav-link:hover .icon {
  color: var(--muted);
}

.nav-link.active {
  color: var(--accent-strong);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.03));
}

.nav-link.active .icon {
  color: var(--accent);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
}

.side-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 47, 73, 0.7);
}

.tenant-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 10px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.tenant-line strong {
  color: var(--muted);
  font-weight: 600;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(11, 20, 34, 0.7);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.side-meta {
  min-width: 0;
  flex: 1;
}

.side-name {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-role {
  margin-top: 1px;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 9px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn-logout:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.22);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 13, 23, 0.78);
  backdrop-filter: blur(12px);
}

.page-title {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

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

.view {
  flex: 1;
  padding: 24px 28px 40px;
  min-width: 0;
}

/* ------------------------------------------------------------
   通用页面元素
   ------------------------------------------------------------ */

.page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  animation: rise 0.24s ease both;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-desc {
  color: var(--muted);
  font-size: 13px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
}

.info-banner {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(45, 212, 191, 0.03));
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.info-banner .icon {
  margin-top: 2px;
  color: var(--accent-2);
}

.info-banner p + p {
  margin-top: 2px;
}

.info-banner .banner-title {
  color: var(--text-soft);
  font-weight: 600;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 32, 54, 0.6), rgba(11, 20, 34, 0.7));
  box-shadow: 0 12px 30px -24px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.panel-sub {
  margin-top: 2px;
  color: var(--faint);
  font-size: 12px;
}

.panel-body {
  padding: 0;
}

.panel-pad {
  padding: 18px;
}

/* 概览统计卡片 */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 16px 17px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(22, 38, 63, 0.75), rgba(11, 20, 34, 0.85));
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.45), transparent);
  opacity: 0.6;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.stat-label .icon {
  color: var(--accent);
  opacity: 0.8;
}

.stat-value {
  margin-top: 8px;
  color: var(--text);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stat-value.accent {
  color: var(--accent-strong);
}

.stat-sub {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* 表格 */

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 19, 32, 0.6);
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(29, 47, 73, 0.55);
  color: var(--text-soft);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

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

.data-table tbody tr:hover {
  background: rgba(45, 212, 191, 0.035);
}

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

.data-table .cell-main {
  color: var(--text);
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.data-table .cell-sub {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.data-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 220px;
}

.address-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.address-cell .link {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 徽章 / 状态 */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.65;
  white-space: nowrap;
}

.badge-ok {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.badge-warn {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
}

.badge-err {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.badge-muted {
  border-color: var(--border);
  background: rgba(148, 163, 184, 0.05);
  color: var(--faint);
}

.badge-info {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.1);
  color: #93c5fd;
}

.badge-tcp {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-strong);
}

.badge-http {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}

.badge-role-owner {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
}

.badge-role-admin {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(96, 165, 250, 0.1);
  color: #93c5fd;
}

.badge-role-operator {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(45, 212, 191, 0.09);
  color: var(--accent-strong);
}

.badge-role-viewer {
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.07);
  color: var(--muted);
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

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

.dot-on {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.13), 0 0 9px rgba(52, 211, 153, 0.7);
}

.dot-off {
  background: #4a6179;
}

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

/* 开关 */

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 21px;
  flex: none;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #101c2d;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #7d93ac;
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked + .track {
  border-color: var(--accent-line);
  background: rgba(45, 212, 191, 0.2);
}

.switch input:checked + .track::after {
  background: var(--accent);
  transform: translateX(17px);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
}

.switch input:focus-visible + .track {
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.24);
}

.switch input:disabled + .track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 动作彩色标签（审计） */

.action-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  white-space: nowrap;
}

.action-green {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.09);
  color: #6ee7b7;
}

.action-red {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
}

.action-cyan {
  border-color: rgba(45, 212, 191, 0.32);
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent-strong);
}

.action-violet {
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(167, 139, 250, 0.09);
  color: #c4b5fd;
}

.action-amber {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.09);
  color: #fcd34d;
}

.action-blue {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.09);
  color: #93c5fd;
}

.action-gray {
  border-color: var(--border);
  background: rgba(148, 163, 184, 0.05);
  color: var(--muted);
}

/* 空状态 / 加载 / 错误 */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 54px 24px 58px;
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.05);
  color: var(--accent);
}

.empty h3 {
  font-size: 15px;
  font-weight: 650;
  color: var(--text-soft);
}

.empty p {
  max-width: 420px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.7;
}

.empty-action {
  margin-top: 12px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(45, 212, 191, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.error-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  margin: 60px auto;
  padding: 28px 26px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  border-radius: var(--radius);
  background: rgba(248, 113, 113, 0.05);
  text-align: center;
}

.error-panel .icon {
  color: var(--danger);
}

.error-panel h3 {
  font-size: 15px;
  font-weight: 650;
}

.error-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.error-panel .btn {
  margin-top: 8px;
}

/* 分页 */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
}

.page-info {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

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

/* 角色说明卡片 */

.role-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.role-card {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 26, 43, 0.7);
}

.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.role-card p {
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.65;
}

.role-card code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------
   弹窗
   ------------------------------------------------------------ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(5px);
  animation: fade 0.16s ease both;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: min(88vh, 780px);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: linear-gradient(170deg, #132239, #0b1524);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: pop 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

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

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

.modal-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.modal-sub {
  margin-top: 3px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.55;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: -2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  background: rgba(8, 14, 24, 0.35);
}

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

.confirm-text {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.modal-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.06);
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.65;
}

/* 一次性令牌 */

.token-box {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.token-warning {
  padding: 11px 13px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
  font-size: 12.5px;
  line-height: 1.65;
}

.token-warning strong {
  color: #fde68a;
}

.token-value {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: #07111d;
  color: var(--accent-strong);
  font-size: 14px;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.token-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.token-device {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */

.toast-region {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-left-width: 3px;
  border-radius: 10px;
  background: rgba(15, 27, 45, 0.97);
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.85);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow-wrap: anywhere;
}

.toast-success {
  border-left-color: var(--ok);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-info {
  border-left-color: var(--accent-2);
}

.toast-out {
  animation: toast-out 0.2s ease forwards;
}

/* ------------------------------------------------------------
   远程桌面
   ------------------------------------------------------------ */

.desktop-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 132px);
  min-height: calc(100dvh - 132px);
  max-width: 1680px;
  margin: 0 auto;
  animation: rise 0.24s ease both;
}

.desktop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.desktop-title-block {
  min-width: 0;
}

.desktop-device {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.desktop-device-name {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-meta {
  margin-top: 3px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.desktop-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(15, 26, 43, 0.75);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.tool-group .tool-label {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.tool-group .fps-value {
  min-width: 20px;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quality-range {
  width: 104px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.range-value {
  min-width: 22px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 26, 43, 0.8);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #526c88;
  flex: none;
}

.status-connecting {
  background: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}

.status-live {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

.status-error {
  background: var(--danger);
}

.status-offline {
  background: #526c88;
}

.desktop-stage {
  position: relative;
  flex: 1;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, rgba(45, 212, 191, 0.035), transparent 62%),
    #04070c;
  overflow: hidden;
  outline: none;
}

.desktop-stage:fullscreen,
.desktop-stage:-webkit-full-screen {
  border: 0;
  border-radius: 0;
  background: #000;
}

.screen-wrap {
  position: absolute;
  inset: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.desktop-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 3px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(42, 66, 98, 0.6), 0 20px 60px -24px rgba(0, 0, 0, 0.9);
  image-rendering: auto;
  outline: none;
  cursor: default;
}

.desktop-canvas:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.55);
}

.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(3px);
}

.overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  max-width: 460px;
  padding: 24px 26px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(15, 26, 43, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.overlay-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
}

.overlay-text {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.overlay-actions {
  display: flex;
  gap: 9px;
  margin-top: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.overlay-card .spinner {
  margin-bottom: 4px;
}

.desktop-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
  flex-wrap: wrap;
}

.kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.07);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   动画
   ------------------------------------------------------------ */

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

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

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

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

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

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

@media (max-height: 640px) {
  .login {
    align-items: flex-start;
  }
}

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

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

@media (max-width: 1080px) {
  :root {
    --sidebar-w: 220px;
  }

  .view {
    padding: 20px 20px 34px;
  }

  .topbar {
    padding: 14px 20px;
  }

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

@media (max-width: 820px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 14, 24, 0.94);
  }

  .brand {
    padding: 0;
    border: 0;
    gap: 8px;
  }

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

  .brand .brand-name {
    font-size: 16px;
  }

  .brand .brand-tag {
    display: none;
  }

  .nav {
    order: 3;
    flex-direction: row;
    flex: none;
    width: 100%;
    margin-top: 3px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  .nav-link {
    padding: 7px 10px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .nav-link.active::before {
    display: none;
  }

  .side-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    flex-wrap: nowrap;
  }

  .tenant-line,
  .side-role,
  .btn-logout .logout-label {
    display: none;
  }

  .side-user {
    padding: 5px 8px;
    background: transparent;
    border-color: var(--border);
  }

  .avatar {
    width: 27px;
    height: 27px;
    font-size: 11px;
  }

  .side-name {
    max-width: 92px;
    font-size: 12px;
  }

  .btn-logout {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border-color: var(--border);
  }

  .main {
    min-height: calc(100dvh - 104px);
  }

  .topbar {
    position: static;
    padding: 13px 16px;
  }

  .page-title {
    font-size: 16px;
  }

  .view {
    padding: 16px 14px 32px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

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

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

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

  .desktop-page {
    min-height: 0;
  }

  .desktop-stage {
    min-height: 300px;
    height: 52vh;
    flex: none;
  }

  .screen-wrap {
    inset: 7px;
  }

  .desktop-toolbar {
    gap: 7px;
  }

  .tool-group {
    padding: 5px 9px;
  }

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

  .modal {
    max-height: 90vh;
    max-height: 90dvh;
  }

  .toast-region {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .page-toolbar {
    align-items: stretch;
  }

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

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

  .inline-field {
    width: 100%;
  }

  .inline-field select {
    flex: 1;
    min-width: 0;
  }

  .login-card {
    padding: 28px 22px 22px;
  }

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

  .pagination {
    justify-content: center;
  }

  .desktop-stage {
    height: 46vh;
    min-height: 240px;
  }
}

/* ============================================================
   文件中心
   ============================================================ */

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 34px 22px 32px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(45, 212, 191, 0.07), transparent 62%),
    rgba(11, 20, 34, 0.55);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.file-drop:hover {
  border-color: var(--accent-line);
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(45, 212, 191, 0.12), transparent 62%),
    rgba(11, 20, 34, 0.55);
}

.file-drop:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file-drop.is-drag {
  border-color: var(--accent);
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(45, 212, 191, 0.18), transparent 65%),
    rgba(16, 30, 48, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(45, 212, 191, 0.28),
    0 0 34px -14px rgba(45, 212, 191, 0.6);
}

.file-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
  border: 1px dashed var(--border-strong);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.file-drop:hover .file-drop-icon,
.file-drop.is-drag .file-drop-icon {
  border-color: var(--accent-line);
  color: var(--accent-strong);
}

.file-drop.is-drag .file-drop-icon {
  transform: translateY(-2px);
}

.file-drop-title {
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
}

.file-drop-sub {
  color: var(--faint);
  font-size: 12px;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
}

.upload-list:empty {
  display: none;
}

.upload-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(18, 32, 54, 0.55);
  transition: border-color 0.16s ease;
}

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

.upload-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-pct {
  flex: none;
  color: var(--faint);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.upload-bar {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.upload-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.18s ease;
}

.upload-item.is-error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.06);
}

.upload-item.is-error .upload-bar-fill {
  background: var(--danger);
}

.upload-item.is-error .upload-pct {
  color: #fca5a5;
}

.file-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 420px;
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-ext {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}


/* 一机一码自动注册提示条 */
.enroll-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.enroll-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.enroll-copy .cell-sub { max-width: 860px; line-height: 1.6; }
