/* ============================================
   零界Geo · 暗色模式样式
   ============================================ */

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body {
  font-feature-settings: "tnum" on, "lnum" on;
  background: #0a0d18;
  color: #d8dde8;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a4255; }
::-webkit-scrollbar-track { background: transparent; }

/* 导航项 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  color: #b8bfd1;
  font-weight: 500;
  transition: all .15s ease;
  position: relative;
}
.nav-item:hover { background: rgba(123, 63, 228, 0.1); color: #eef0f5; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(123, 63, 228, 0.25) 0%, rgba(123, 63, 228, 0.05) 100%);
  color: #cf8aff;
  box-shadow: inset 0 0 0 1px rgba(123, 63, 228, 0.2);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #06b6d4, #7b3fe4);
  box-shadow: 0 0 8px rgba(123, 63, 228, 0.6);
}

/* 卡片 */
.card {
  background: linear-gradient(180deg, rgba(29, 34, 48, 0.6) 0%, rgba(20, 24, 38, 0.6) 100%);
  border: 1px solid #1d2230;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px -8px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}

/* 表格 */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #8a92a7;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  background: rgba(29, 34, 48, 0.4);
  border-bottom: 1px solid #1d2230;
  white-space: nowrap;
}
.tbl tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: #d8dde8;
  border-bottom: 1px solid rgba(29, 34, 48, 0.6);
  white-space: nowrap;
}
.tbl tbody tr:hover { background: rgba(123, 63, 228, 0.05); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* 输入控件 */
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid #2a3142;
  border-radius: 8px;
  outline: none;
  background: #0f1320;
  color: #eef0f5;
  transition: all .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: #7b3fe4;
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.2);
  background: #141826;
}
.textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.input::placeholder, .textarea::placeholder { color: #5d6577; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #d8dde8;
  margin-bottom: 6px;
}
.hint { font-size: 12px; color: #8a92a7; margin-top: 4px; }
.required::after { content: " *"; color: #f43f5e; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #7b3fe4 100%);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(123, 63, 228, 0);
}
.btn-primary:hover {
  box-shadow: 0 0 24px -4px rgba(123, 63, 228, 0.6);
  filter: brightness(1.1);
}
.btn-secondary {
  background: #141826;
  color: #d8dde8;
  border-color: #2a3142;
}
.btn-secondary:hover { background: #1d2230; border-color: #3a4255; }
.btn-ghost { background: transparent; color: #b8bfd1; }
.btn-ghost:hover { background: rgba(123, 63, 228, 0.08); color: #eef0f5; }
.btn-danger { background: #141826; color: #fb7185; border-color: rgba(244, 63, 94, 0.3); }
.btn-danger:hover { background: rgba(244, 63, 94, 0.15); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* 标签徽标 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: 12px; font-weight: 500;
  border-radius: 999px;
  background: rgba(123, 63, 228, 0.12);
  color: #b8bfd1;
  border: 1px solid rgba(123, 63, 228, 0.15);
}
.tag-brand { background: rgba(123, 63, 228, 0.18); color: #cf8aff; border-color: rgba(123, 63, 228, 0.3); }
.tag-green { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.tag-rose  { background: rgba(244, 63, 94, 0.15); color: #fb7185; border-color: rgba(244, 63, 94, 0.25); }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.tag-sky   { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border-color: rgba(6, 182, 212, 0.25); }
.tag-gray  { background: rgba(90, 101, 119, 0.2); color: #8a92a7; border-color: rgba(90, 101, 119, 0.3); }

/* Toast */
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; min-width: 240px;
  background: #141826;
  border: 1px solid #2a3142;
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.6);
  font-size: 14px; color: #eef0f5;
  animation: slideIn .25s ease;
}
.toast.success { border-left: 3px solid #10b981; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid #7b3fe4; }

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  to { transform: translateX(20px); opacity: 0; }
}

/* Modal */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
  animation: fadeIn .2s ease;
}
.modal {
  background: linear-gradient(180deg, #1a1f30 0%, #141826 100%);
  border: 1px solid #2a3142;
  border-radius: 16px;
  max-width: 560px; width: 100%;
  max-height: 90vh;
  min-height: 0;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.8);
  animation: zoomIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 进度条 / 指标条 */
.meter {
  position: relative;
  height: 6px; border-radius: 999px;
  background: #1d2230; overflow: hidden;
}
.meter > span {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #06b6d4, #7b3fe4);
  border-radius: 999px;
  transition: width .4s ease;
}

/* 数字 */
.tabular { font-variant-numeric: tabular-nums; }

/* 表格在窄屏横向滚动 */
.tbl-wrap { overflow-x: auto; }

/* Loading */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* 响应式 */
@media (max-width: 1023px) {
  .nav-item.active::before { display: none; }
}

/* Logo 渐变文字统一处理 */
.text-gradient {
  background: linear-gradient(90deg, #22d3ee 0%, #b566ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* KPI 卡片图标背景柔光 */
.icon-glow {
  background: radial-gradient(circle at 30% 30%, rgba(123, 63, 228, 0.3), transparent 70%);
}
