/* 量多多传媒 · 7 个模块页面的通用样式
 * 依赖 styles.css 的 :root 令牌与基础组件（.sidebar/.topbar/.card/.btn-primary 等）。
 * 本文件只放模块页面特有的布局与组件，深空暗色 + 紫色，与全站一致。
 */

/* ---------------- 页面骨架 ---------------- */

.page-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
}

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

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

.page-title .t-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cf6, #9a7bfd);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  box-shadow: 0 6px 16px -6px rgba(124, 92, 246, 0.7);
}

.page-title .t-ico svg { width: 19px; height: 19px; }

.page-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.page-title .t-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--sub);
}

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

/* ---------------- 通用面板卡片 ---------------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.panel-title svg { width: 17px; height: 17px; color: var(--purple); }

.panel-sub {
  font-size: 12px;
  color: var(--sub);
  margin: 4px 0 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(var(--ink), 0.04);
  color: var(--text-2);
  transition: border-color 0.15s, color 0.15s, background 0.15s, filter 0.15s;
  white-space: nowrap;
}

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

.btn:hover { border-color: var(--purple-line); color: var(--purple-deep); }

.btn.primary {
  background: linear-gradient(100deg, #6a58e8, #8272f2);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(106, 88, 232, 0.26);
}

.btn.primary:hover { filter: brightness(1.05); color: #fff; }

.btn.ghost { background: transparent; }

.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: rgba(255, 109, 99, 0.42); background: rgba(255, 109, 99, 0.12); color: #ff9d94; }

.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 7px; }
.btn.sm svg { width: 13px; height: 13px; }

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

/* ---------------- 输入 / 下拉 ---------------- */

.input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(var(--ink), 0.045);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder { color: var(--hint); }

.input:focus {
  border-color: rgba(150, 120, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 246, 0.16);
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 640px;
}

table.grid th {
  text-align: left;
  padding: 11px 14px;
  font-weight: 500;
  color: var(--sub);
  background: rgba(var(--ink), 0.03);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.grid td {
  padding: 12px 14px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

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

table.grid tbody tr:hover { background: rgba(var(--ink), 0.025); }

table.grid .num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------------- 状态徽标 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}

.badge .dot { width: 6px; height: 6px; border-radius: 50%; }

.badge.ok { color: var(--mint-text); background: var(--mint-bg); }
.badge.ok .dot { background: #52c98f; }

.badge.fail { color: #ff9d94; background: rgba(255, 109, 99, 0.12); }
.badge.fail .dot { background: #ff6d63; }

.badge.warn { color: #f5c16c; background: rgba(245, 193, 108, 0.12); }
.badge.warn .dot { background: #f5c16c; }

.badge.info { color: var(--purple-deep); background: rgba(124, 92, 246, 0.14); }
.badge.info .dot { background: var(--purple); }

.badge.gray { color: var(--sub); background: rgba(var(--ink), 0.06); }
.badge.gray .dot { background: var(--sub); }

/* ---------------- 空态 ---------------- */

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--hint);
}

.empty .e-ico {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(124, 92, 246, 0.12);
  color: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty .e-ico svg { width: 26px; height: 26px; }

.empty h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.empty p { margin: 0; font-size: 12.5px; line-height: 1.7; }

/* ---------------- 提示条 / 说明条 ---------------- */

.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
}

.note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }

.note.info { background: rgba(124, 92, 246, 0.1); color: #b6a9ec; }
.note.info svg { color: var(--purple-deep); }

.note.warn { background: rgba(245, 193, 108, 0.1); color: #d9b574; }
.note.warn svg { color: #f5c16c; }

.note.ok { background: var(--mint-bg); color: var(--mint-text); }
.note.ok svg { color: var(--mint-text); }

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

@media (max-width: 900px) {
  .page-wrap { padding: 14px; }
  .page-head { flex-direction: column; }
  .page-actions { flex-wrap: wrap; }
}
