﻿/* ─── CSS Variables ───────────────────────────────────────────────────────── */
:root {
  --sidebar-width: 195px;
  --card-bg: #ffffff;
  --primary: #363636;
  --primary-hover: #1B1B1B;
  --primary-light: #f3f4f6;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --text-primary: #1B1B1B;
  --text-secondary: #4B5563;
  --text-muted: #8B8E98;
  --border: #e5e5e5;
  --border-strong: rgba(0,0,0,0.1);
  --border-light: #f3f4f6;
  --radius-sm: 9px;
  --radius: 11px;
  --radius-lg: 26px;
  --transition: 150ms cubic-bezier(0.4,0,0.2,1);
  --transition-md: 250ms cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16.94px; overflow-y: scroll; scrollbar-gutter: stable; }

body {
  height: 100%;
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  scrollbar-gutter: stable;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input,select,textarea { font-family: inherit; font-size: inherit; }
a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
::selection { background: #bfdbfe; color: #1e3a8a; }

/* ─── App Layout ─────────────────────────────────────────────────────────── */
.app-layout {
  position: relative;
  display: flex;
  width: 1320px;
  height: 760px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.08), 0 32px 80px rgba(0,0,0,0.12);
}

/* ─── Background Layer ───────────────────────────────────────────────────── */
.bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  z-index: 0;
  pointer-events: none;
}

/* ─── Glass Sidebar ──────────────────────────────────────────────────────── */
.glass-sidebar {
  position: relative;
  z-index: 2;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  padding: 0 10px 20px;
  gap: 0;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 12px 0;
  margin: 0;
  flex-shrink: 0;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 20px;
}

.sidebar-search-wrap {
  padding: 6px 0 4px;
  flex-shrink: 0;
}
.sidebar-search-form {
  position: relative;
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  padding-inline: 0.7em;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  overflow: hidden;
}
.sidebar-search-form:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}
.sidebar-search-form:focus-within {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(99, 102, 241, 0.35);
}
.sidebar-search-input {
  font-size: 13px;
  background-color: transparent;
  width: 100%;
  height: 100%;
  padding-inline: 0.4em;
  padding-block: 0.7em;
  border: none;
  color: #1B1B1B;
}
.sidebar-search-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
.sidebar-search-input:focus {
  outline: none;
}
.sidebar-search-reset {
  border: none;
  background: none;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  padding: 0;
  transition: opacity 0.15s;
}
.sidebar-search-btn {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}
.sidebar-search-btn:hover {
  color: rgba(99, 102, 241, 0.6);
}
.sidebar-search-btn svg {
  width: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.28);
  padding: 0 10px;
  margin: 0;
  line-height: 21px;
}

#account-nav-item {
  padding: 0 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 38px;
  margin: 0;
  line-height: 36px;
  border-radius: var(--radius-sm);
  color: rgba(0,0,0,0.48);
  font-size: 14.850000000000001px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
  user-select: none;
  letter-spacing: 0.5px;
}
.nav-item:hover {
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.7);
}
.nav-item.active {
  background: rgba(0,0,0,0.06);
  color: #1B1B1B;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 3px;
  background: #1B1B1B;
  border-radius: 0 10px 10px 0;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name {
  font-size: 14.850000000000001px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#account-nav-item {
  gap: 8px;
  padding: 0 10px;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-divider {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-card {
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 0;
}

/* ─── Content Area ──────────────────────────────────────────────────────── */
.content-area {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 10px 10px 10px 0;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.4);
}

.content-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Top Bar ─────────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 16px;
  flex-shrink: 0;
}

.main-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: #F2F2F2;
  font-size: 14.3px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
  box-shadow: none;
}
.header-btn:hover {
  background-color: #e8e8e8;
  box-shadow: none;
}

/* 新样式：header-btn.primary */
.header-btn.primary {
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  padding: 8px 16px;
  background-color: #000000;
  border: none;
  color: #fff;
  font-size: 14.3px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease-in-out;
  outline: none;
}
.header-btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.25);
}
.header-btn.primary:focus {
  outline: none;
}
.header-btn.primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100px;
  width: 100px;
  height: 100%;
  background-image: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.header-btn.primary:hover::before {
  animation: shine 1.5s ease-out infinite;
}
@keyframes shine {
  0% { left: -100px; opacity: 0.6; }
  60% { left: 100%; opacity: 0.6; }
  100% { left: 100%; opacity: 0; }
}
.header-btn.primary svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.3s ease-in-out; }
.header-btn.primary:hover svg { transform: translate(4px); }
.header-btn.primary:active { transform: scale(1.02); }

/* ─── Page Wrap ──────────────────────────────────────────────────────────── */
.page-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  padding: 22px 28px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  animation: fadeIn 0.2s ease-out;
}
.page.active { display: flex; flex-direction: column; }

#page-stats-sticky {
  flex-shrink: 0;
}
.stats-summary-row {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  margin-bottom: 16px;
}

.stat-card {
  height: 120px;
  width: 120px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow 0.3s cubic-bezier(0.15, 0.83, 0.66, 1), transform 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.stat-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-card-value {
  font-size: 30.800000000000004px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

.stats-summary-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.stats-summary-row .stat-card {
  flex: 0 0 auto;
}

.ht-scroll-wrapper {
  position: relative;
}
.ht-scroll-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: htScroll var(--ht-scroll-duration, 12s) linear infinite;
}
.ht-scroll-track:hover {
  animation-play-state: paused;
}
@keyframes htScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(calc(-1 * var(--ht-scroll-distance, 100px))); }
}

.ht-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ht-list-item:hover { background: #f0f4ff; }
.ht-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.ht-info { flex: 1; min-width: 0; }
.ht-name {
  font-size: 14.3px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ht-company {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.ht-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(139,92,246,0.1);
  color: #7c3aed;
  flex-shrink: 0;
}

/* ─── Stats Page Cards ───────────────────────────────────────────────────── */
.stats-cards-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-shrink: 0;
}

.stats-chart-card {
  flex: 0 0 522px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  display: flex;
  flex-direction: column;
}

.stats-chart-card--narrow {
  flex: 0 0 250px;
}

#radar-chart-container {
  flex: 1;
  min-height: 0;
  height: 300px;
}

#pie-chart-container {
  flex: 1;
  height: 300px;
}

.stats-chart-title {
  font-size: 14.3px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

#recent-added-section {
  margin-bottom: 14px;
}

#recent-added-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.65);
  transition: background 0.15s;
  cursor: default;
  height: 70px;
  box-sizing: border-box;
  overflow: hidden;
}
.recent-item:hover { background: rgba(255,255,255,0.75); }
.recent-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.recent-item-info { flex: 1; min-width: 0; }
.recent-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-item-company {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.recent-item-cat {
  font-size: 11px;
  color: #fff;
  background: #3b82f6;
  padding: 1px 7px;
  border-radius: 20px;
}
.recent-item-cat.社会人员 { background: #f59e0b; }
.recent-item-time {
  font-size: 11px;
  color: #9ca3af;
}

#page-settings.page {
  padding: 0;
  overflow-y: auto;
}
#page-settings.page.active {
  display: flex;
  flex-direction: column;
}
#page-settings.page .settings-layout {
  align-items: flex-start;
}

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

/* ─── Stats Grid (Dashboard) ─────────────────────────────────────────────── */
.stats-row1 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.stats-row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}
.stat-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 0 0 1.5px rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  cursor: pointer;
}

.stat-card-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 28.6px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-value-lightblue {
  color: #60a5fa;
  text-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

.stat-delta {
  font-size: 12.65px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Charts ────────────────────────────────────────────────────────────── */
.chart-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-card-label {
  font-size: 14.3px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-wrap {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Chart Split Layout ─────────────────────────────────────────────────── */
.chart-row {
  margin-bottom: 18px;
  flex-shrink: 0;
}

.chart-split {
  display: flex;
  align-items: center;
  gap: 20px;
}

.chart-left {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  position: relative;
}

.chart-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-total-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(96,165,250,0.12));
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 12px;
  text-align: center;
}

.chart-total-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(59,130,246,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chart-total-value {
  font-size: 33px;
  font-weight: 700;
  color: #3b82f6;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(59,130,246,0.2);
}

.chart-total-sub {
  font-size: 11px;
  color: rgba(59,130,246,0.5);
  margin-top: 2px;
}

/* Breakdown list */
.chart-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-label {
  font-size: 14.3px;
  font-weight: 500;
  color: #374151;
  flex: 1;
}

.breakdown-count {
  font-size: 14.3px;
  font-weight: 700;
  color: #111827;
  min-width: 24px;
  text-align: right;
}

.breakdown-pct {
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  min-width: 42px;
  text-align: right;
}

.breakdown-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.breakdown-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid rgba(16,185,129,0.1);
}

.breakdown-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 28px;
  border-radius: 6px;
}

.breakdown-sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}

.breakdown-sub-label {
  font-size: 13px;
  color: #6b7280;
  flex: 1;
}

.breakdown-sub-count {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  min-width: 20px;
  text-align: right;
}

.breakdown-sub-pct {
  font-size: 12px;
  color: #9ca3af;
  min-width: 38px;
  text-align: right;
}

/* ─── Customer Cards ─────────────────────────────────────────────────────── */
.customer-cards-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.customer-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 2px;
  overflow-y: auto;
  flex: 1;
}

.customer-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.3s cubic-bezier(0.15, 0.83, 0.66, 1), transform 0.2s ease;
  height: 180px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.customer-card:hover {
  box-shadow: 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.customer-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17.6px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.customer-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.customer-card-name {
  font-size: 15.400000000000002px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-card-phone {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-card-type {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  align-self: flex-start;
  background: #F2F2F2;
  color: #242424;
}

.cat-大学生 { background: #eff6ff; color: #2563eb; }
.cat-社会人员 { background: #fef3c7; color: #d97706; }
.tag-blue { background: #eff6ff; color: #2563eb; }
.tag-green { background: #dcfce7; color: #16a34a; }
.tag-gray { background: #f3f4f6; color: #6b7280; }
.cat-天使启动资金 { background: #fefce8; color: #ca8a04; }
.cat-高新技术企业 { background: #faf5ff; color: #9333ea; }
.gender-男 { background: #f5f3ff; color: #7c3aed; }
.gender-女 { background: #fdf2f8; color: #db2777; }

/* ─── Angel Fund Tag ───────────────────────────────────────────────── */
.angel-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.angel-active { background: #fefce8; color: #ca8a04; }
.angel-inactive { background: #f3f4f6; color: #9ca3af; }
.status-tag { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: 0.01em; }
.status-active { background: #fefce8; color: #ca8a04; }
.status-inactive { background: #f3f4f6; color: #9ca3af; }

.customer-card-detail {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-card-detail-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-card-detail-row svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.customer-card-footer {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: auto;
}

.customer-card-btn {
  flex: 1;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  transition: all 0.15s ease;
}

.customer-card-btn.edit {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}

.customer-card-btn.edit:hover { background: rgba(59,130,246,0.2); }

.customer-card-btn.delete {
  background: rgba(220,38,38,0.08);
  color: #dc2626;
}

.customer-card-btn.delete:hover { background: rgba(220,38,38,0.15); }

.customer-card-btn svg {
  width: 13px;
  height: 13px;
}

.customer-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  flex-shrink: 0;
}

/* ─── Table Card ─────────────────────────────────────────────────────────── */
.table-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.table-title {
  font-size: 14.3px;
  font-weight: 600;
  color: var(--text-primary);
}

.table-wrap { overflow-x: auto; flex: 1; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fafafa;
  white-space: nowrap;
  border-bottom: 2px solid #e5e7eb;
  border-right: none;
}
.data-table thead th:last-child { border-right: none; }
.data-table tbody td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid #f0f0f0;
  border-right: none;
  vertical-align: middle;
}
.data-table tbody td:last-child { border-right: none; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover td { background: #f9fafb; }
.data-table .name { font-weight: 600; color: var(--text-primary); }

/* ─── Toolbar ───────────────────────────────────────────────────────────── */
/* ─── Table Footer ──────────────────────────────────────────────────────── */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  background: #f9fafb;
  flex-shrink: 0;
}
.table-info { font-size: 13px; color: var(--text-muted); }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: #F2F2F2;
  color: var(--text-secondary);
  font-size: 13.750000000000002px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}
.page-btn:hover { background-color: #e0e0e0; color: var(--text-primary); }
.page-btn.active { background: linear-gradient(180deg, #363636 0%, #1B1B1B 50%, #000000 100%); border-color: transparent; color: #ffffff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn svg { width: 13px; height: 13px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 14.3px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* 新样式：btn-primary */
.btn-primary {
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  padding: 7px 14px;
  background-color: #000000;
  border: none;
  color: #fff;
  font-size: 14.3px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease-in-out;
  outline: none;
}
.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.25);
}
.btn-primary:focus {
  outline: none;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100px;
  width: 100px;
  height: 100%;
  background-image: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before {
  animation: shine 1.5s ease-out infinite;
}
.btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.3s ease-in-out; }
.btn-primary:hover svg { transform: translate(4px); }
.btn-primary:active { transform: scale(1.02); }
.btn-secondary { background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-sm { padding: 4px 12px; font-size: 14.3px; }
.batch-delete-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 16px;
  color: #991b1b;
  font-size: 14.3px;
}
.btn-icon { width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-muted); transition: all var(--transition); }
.btn-icon:hover { background: var(--border-light); color: var(--text-primary); }
.btn-icon.edit:hover { background: #eff6ff; color: var(--primary); }
.btn-icon.delete:hover { background: #fef2f2; color: var(--danger); }
.btn-icon svg { width: 14px; height: 14px; }

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  color: var(--text-muted);
  padding: 40px;
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.4; }
.empty-state p   { font-size: 15.400000000000002px; font-weight: 500; }

/* ─── Settings Layout (New Aesthetic) ──────────────────────────────────── */
.settings-panel-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  padding: 24px;
  box-sizing: border-box;
  overflow: visible;
  flex: 1;
  min-height: 0;
}

.settings-nav-col {
  width: 176px;
  flex-shrink: 0;
  overflow-y: auto;
}

/* ── Left nav pill list ── */
.settings-nav-card {
  width: 176px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  flex: 1;
}

.settings-nav-card-inner {
  flex: 1;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14.3px;
  font-weight: 500;
  color: rgba(0,0,0,0.45);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  white-space: nowrap;
}
.settings-nav-item svg {
  flex-shrink: 0;
  transition: color 0.2s ease;
  color: rgba(0,0,0,0.3);
}
.settings-nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.75);
}
.settings-nav-item:hover svg { color: rgba(0,0,0,0.5); }
.settings-nav-item.active {
  background: rgba(0,0,0,0.07);
  color: #111111;
  font-weight: 600;
  position: relative;
}
.settings-nav-item.active svg { color: #111111; }

/* ── Right content ── */
.settings-content-col {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.settings-content-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.settings-content-card-inner {
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  scrollbar-gutter: stable;
}

/* ── Settings panels ── */
.settings-panel {
  display: none;
  padding: 28px 32px;
  animation: sFadeIn 0.22s ease;
  scrollbar-gutter: stable;
}
.settings-panel.active {
  display: block;
  padding-top: 20px;
}

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

/* ── Section header ── */
.s-section-header {
  margin-bottom: 24px;
}
.s-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.s-section-desc {
  font-size: 14.3px;
  color: rgba(0,0,0,0.45);
  margin: 0;
}

/* ── Profile hero ── */
.s-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  margin-bottom: 16px;
}
.s-profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 26.400000000000002px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(102,126,234,0.35);
}
.s-profile-hero-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.s-profile-hero-name {
  font-size: 19.8px;
  font-weight: 700;
  color: #111;
}
.s-profile-hero-role {
  font-size: 14.3px;
  color: rgba(0,0,0,0.45);
  margin-bottom: 8px;
}
.s-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 14.3px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.s-btn-outline {
  background: #fff;
  color: #374151;
  border: 1.5px solid #d1d5db;
}
.s-btn-outline:hover {
  border-color: #6b7280;
  background: #f9fafb;
}
.bg-setting-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bg-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 100%;
}
.bg-preset-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.2s ease;
  background: #f3f4f6;
  position: relative;
}
.bg-preset-item:hover {
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.bg-preset-item.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.bg-preset-thumb {
  height: 70px;
  border-radius: 10px 10px 0 0;
}
.bg-preset-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
}
.bg-preset-label {
  padding: 6px 8px;
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  text-align: center;
  background: #fff;
}
.s-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.s-btn-primary:hover {
  box-shadow: 0 4px 14px rgba(102,126,234,0.45);
  transform: translateY(-1px);
}
.s-btn svg { width: 14px; height: 14px; }

/* ── Info grid ── */
.s-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.s-info-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.s-info-card-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(0,0,0,0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.s-info-card-value {
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #111;
}
.s-info-card-id {
  font-family: "SF Mono","Fira Code",monospace;
  font-size: 14.3px;
  background: rgba(0,0,0,0.05);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.04em;
}
.s-info-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(102,126,234,0.12);
  color: #764ba2;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}
.s-info-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #10b981;
}
.s-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  flex-shrink: 0;
}

/* ── Action list ── */
.s-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.s-action-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.s-action-item:hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.1);
  transform: translateX(3px);
}
.s-action-item:hover .s-action-arrow { opacity: 1; transform: translateX(0); }
.s-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.s-action-icon--blue { background: rgba(99,102,241,0.12); color: #6366f1; }
.s-action-icon--green { background: rgba(16,185,129,0.12); color: #10b981; }
.s-action-icon--red { background: rgba(239,68,68,0.1); color: #ef4444; }
.s-action-icon svg { width: 18px; height: 18px; }
.s-action-body { flex: 1; min-width: 0; }
.s-action-title { font-size: 15.400000000000002px; font-weight: 600; color: #111; }
.s-action-desc { font-size: 13px; color: rgba(0,0,0,0.4); margin-top: 2px; }
.s-action-item--danger .s-action-title { color: #ef4444; }
.s-action-arrow {
  color: rgba(0,0,0,0.3);
  flex-shrink: 0;
  opacity: 0.5;
  transition: all 0.2s ease;
  transform: translateX(-4px);
}

/* ── Tip banner ── */
.s-tip-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(99,102,241,0.07);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 14px;
}
.s-tip-banner > svg { color: #6366f1; flex-shrink: 0; margin-top: 1px; }
.s-tip-title { font-size: 14.3px; font-weight: 600; color: #4338ca; margin-bottom: 3px; }
.s-tip-text { font-size: 13px; color: rgba(67,56,202,0.75); line-height: 1.5; }

/* ── Block ── */
.s-block {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
}
.s-block-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(0,0,0,0.38);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

/* ── Background swatches ── */
.s-bg-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.s-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}
.s-swatch:hover { background: rgba(0,0,0,0.04); }
.s-swatch.active {
  border-color: #6366f1;
  background: rgba(99,102,241,0.07);
}
.s-swatch-color {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
}
.s-swatch span { font-size: 11px; color: rgba(0,0,0,0.45); font-weight: 500; }

/* ── Setting row ── */
.s-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.s-setting-info { flex: 1; }
.s-setting-name { font-size: 15.400000000000002px; font-weight: 600; color: #111; }
.s-setting-desc { font-size: 13px; color: rgba(0,0,0,0.4); margin-top: 2px; }
.s-select {
  padding: 7px 28px 7px 12px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  color: #111;
  font-size: 14.3px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s ease;
}
.s-select:focus { border-color: rgba(99,102,241,0.6); }

/* ── Toggle list ── */
.s-toggle-list {
  display: flex;
  flex-direction: column;
}
.s-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.s-toggle-item:last-child { border-bottom: none; padding-bottom: 0; }
.s-toggle-item:first-child { padding-top: 0; }
.s-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.s-toggle input { opacity: 0; width: 0; height: 0; }
.s-toggle-track {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: 0.25s ease;
}
.s-toggle-track::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.s-toggle input:checked + .s-toggle-track { background-color: #6366f1; }
.s-toggle input:checked + .s-toggle-track::before { transform: translateX(18px); }

/* ── Notice ── */
.s-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 12px;
  font-size: 13.750000000000002px;
  color: #92400e;
  line-height: 1.5;
}
.s-notice svg { flex-shrink: 0; margin-top: 1px; color: #d97706; }

/* ── Brand card ── */
.s-brand-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
  border: 1px solid rgba(102,126,234,0.15);
  border-radius: 16px;
  margin-bottom: 16px;
}
.s-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(102,126,234,0.3);
}
.s-brand-name { font-size: 18.700000000000003px; font-weight: 700; color: #111; }
.s-brand-ver {
  font-size: 13px;
  color: rgba(0,0,0,0.4);
  font-family: "SF Mono","Fira Code",monospace;
  margin-top: 3px;
}

/* ── Info rows ── */
.s-info-rows {
  display: flex;
  flex-direction: column;
}
.s-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.s-info-row:last-child { border-bottom: none; }
.s-info-row-label { font-size: 14.3px; color: rgba(0,0,0,0.45); }
.s-info-row-value { font-size: 14.3px; font-weight: 600; color: #111; }
.s-mono { font-family: "SF Mono","Fira Code",monospace; font-size: 13px; }

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-md);
}
#confirm-modal.modal-overlay {
  z-index: 1100;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-md);
  overflow: hidden;
}
/* ─── Profile Dialog ──────────────────────────────────────────────────────── */
#profile-modal .profile-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-md);
}
#profile-modal.show .profile-dialog {
  transform: scale(1) translateY(0);
}
#profile-modal .profile-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
#profile-modal .profile-dialog-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
#profile-modal .profile-dialog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
#profile-modal .profile-dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#profile-modal .profile-avatar-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}

#profile-modal .avatar-upload-wrapper {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
}

#profile-modal .avatar-upload-btn {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #fff;
  transition: background 0.15s;
}
#profile-modal .avatar-upload-btn:hover { background: #2563eb; }

#profile-modal .avatar-hint {
  font-size: 12.8px;
  color: #9ca3af;
  margin: 0;
}
#profile-modal .reset-avatar-link {
  font-size: 12px;
  color: #9ca3af;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s;
}
#profile-modal .reset-avatar-link:hover { color: #6b7280; }

/* 头像区域初始化隐藏，JS 更新后显示，避免刷新闪烁 */
#nav-avatar,
#settings-profile-avatar,
#profile-modal #profile-avatar {
  visibility: hidden;
}
#nav-avatar.inited,
#settings-profile-avatar.inited,
#profile-modal #profile-avatar.inited {
  visibility: visible;
}

#profile-modal .profile-form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#profile-modal .profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#profile-modal .profile-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* 修改密码弹窗 */
#change-password-modal .profile-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 440px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: scaleUp 0.25s var(--ease-out-expo) both;
}
#change-password-modal .profile-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#change-password-modal .profile-dialog-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
#change-password-modal .profile-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
#change-password-modal .profile-dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#change-password-modal .profile-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}
#change-password-modal .profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 16.5px; font-weight: 600; color: var(--text-primary); }
.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border-light); color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }
.modal-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
}
.modal-body { padding: 20px; font-size: 14.850000000000001px; color: var(--text-secondary); line-height: 1.6; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; margin-bottom: 10px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-input,.form-select,.form-textarea {
  padding: 0 16px;
  height: 40px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm);
  background-color: #F2F2F2;
  color: var(--text-primary);
  font-size: 14.3px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}
.form-input:focus,.form-select:focus,.form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  background-color: #F2F2F2;
}
.form-input::placeholder,.form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error:empty { display: none; }
.form-error { font-size: 12px; color: var(--danger); }
.form-error:not(:empty) { min-height: 14px; line-height: 14px; }

/* ─── Toast ────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100000;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #242424;
  color: #fff;
  border-radius: var(--radius);
  font-size: 14.3px;
  font-weight: 500;
  box-shadow: 0px 0px 0px 0px #FFFFFF, 0px 0px 0px 0px #000000;
  animation: toastIn 0.25s ease-out;
  pointer-events: auto;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warn    { background: #d97706; }
.toast.info    { background: var(--primary); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.out {
  animation: toastOut 0.2s ease-in forwards;
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

.toast .toast-msg { line-height: 1.4; }
.toast-detail-btn {
  margin-left: 4px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 6px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
  transition: background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}
.toast-detail-btn:hover { background: rgba(255,255,255,0.28); }

/* ─── Upload Failures Modal ───────────────────────────────────────────────── */
.upload-failures-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  pointer-events: auto;
  animation: uploadFailuresFade 0.18s ease-out;
}
@keyframes uploadFailuresFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.upload-failures-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 92vw;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: uploadFailuresPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes uploadFailuresPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.upload-failures-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border-bottom: 1px solid #fecaca;
}
.upload-failures-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b91c1c;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.2px;
}
.upload-failures-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.upload-failures-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}
.upload-failures-close {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.upload-failures-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}
.upload-failures-close svg {
  width: 18px;
  height: 18px;
}
.upload-failures-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  background: #ffffff;
}
.upload-failures-list::-webkit-scrollbar { width: 8px; }
.upload-failures-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
.upload-failures-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
.upload-failures-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.12s;
}
.upload-failures-item:last-child { border-bottom: none; }
.upload-failures-item:hover { background: #fafafa; }
.upload-failures-no {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.upload-failures-body { flex: 1; min-width: 0; }
.upload-failures-name {
  font-size: 14px;
  color: #111827;
  word-break: break-all;
  font-weight: 500;
  line-height: 1.4;
}
.upload-failures-reason {
  margin-top: 6px;
  font-size: 12.5px;
  color: #b91c1c;
  background: #fef2f2;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid #fecaca;
  word-break: break-all;
  line-height: 1.4;
}
.upload-failures-empty {
  padding: 40px 22px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}
.upload-failures-footer {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.upload-failures-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
}
.upload-failures-btn:active { transform: translateY(1px); }
.upload-failures-btn svg { width: 15px; height: 15px; }
.upload-failures-btn-ghost {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.upload-failures-btn-ghost:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.upload-failures-btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 1px solid #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}
.upload-failures-btn-primary:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

/* ─── Badge ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-default  { background: var(--border-light); color: var(--text-secondary); }
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-success  { background: var(--success-light); color: #059669; }
.badge-warning  { background: #fffbeb; color: var(--warning); }
.badge-danger   { background: #fef2f2; color: var(--danger); }
.badge-blue     { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.badge-green    { background: rgba(16, 185, 129, 0.12); color: #059669; }
.badge-gray     { background: rgba(107, 114, 128, 0.12); color: #6b7280; }
.badge-red      { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

/* ─── Avatar ─────────────────────────────────────────────────────────── */
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}
.profile-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
  padding: 20px;
}
.avatar-edit-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.color-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.color-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: #111827; transform: scale(1.1); }
.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ─── Status Dot ─────────────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* ─── Category Tag ─────────────────────────────────────────────────── */
.category-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
/* ─── Skeleton ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.empty-row { text-align: center; }

/* ─── Customer Page Toolbar ─────────────────────────────────────────────── */
.page-customers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 14px;
  flex-shrink: 0;
  gap: 16px;
  position: relative;
}

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

.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.filter-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 14.3px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition);
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(54, 54, 54, 0.08);
}

/* ─── Filter Panel ────────────────────────────────────────────────────────── */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn-active { border-color: var(--primary); color: var(--primary); background: rgba(59, 130, 246, 0.06); }

.filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  min-width: 280px;
}

.filter-panel-inner {
  display: flex;
  flex-direction: column;
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.filter-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.filter-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.filter-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  padding: 3px 0;
}
.filter-check-label:hover { color: var(--primary); }
.filter-check-label input[type="checkbox"],
.filter-check-label input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.filter-search-input:focus { border-color: var(--primary); }
.filter-search-input::placeholder { color: var(--text-secondary); font-size: 12.5px; }

.filter-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-date-input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  min-width: 0;
}
.filter-date-input:focus { border-color: var(--primary); }

.filter-date-sep {
  color: var(--text-secondary);
  font-size: 13px;
  flex-shrink: 0;
}

.filter-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Active filter tags */
.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.filter-tag:hover { background: rgba(59, 130, 246, 0.18); }

.filter-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}
.filter-tag-remove:hover { background: rgba(59, 130, 246, 0.35); }

.filter-clear-all {
  padding: 3px 10px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition);
  white-space: nowrap;
}
.filter-clear-all:hover { color: var(--text-primary); }

/* ─── Data Panel Filter (data panel filter panel) ─────────────────────── */
.data-panel-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.data-panel-filter-group {
  position: relative;
}

.data-panel-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.data-panel-filter-btn:hover { border-color: var(--primary); color: var(--primary); }

.dp-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  min-width: 260px;
}

.dp-filter-inner {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.dp-filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.dp-filter-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.dp-filter-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.dp-filter-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  padding: 3px 0;
}
.dp-filter-check-label:hover { color: var(--primary); }
.dp-filter-check-label input[type="checkbox"],
.dp-filter-check-label input[type="radio"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

.dp-filter-date-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dp-filter-date-input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-width: 0;
}
.dp-filter-date-input:focus { border-color: var(--primary); outline: none; }

.dp-filter-date-sep {
  color: var(--text-secondary);
  font-size: 13px;
  flex-shrink: 0;
}

.dp-filter-search-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
  background: var(--bg-primary);
  box-sizing: border-box;
}
.dp-filter-search-input:focus { border-color: var(--primary); outline: none; }
.dp-filter-search-input::placeholder { color: var(--text-secondary); font-size: 12.5px; }

.dp-filter-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.dp-active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.dp-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.dp-filter-tag:hover { background: rgba(59, 130, 246, 0.18); }

.dp-filter-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}
.dp-filter-tag-remove:hover { background: rgba(59, 130, 246, 0.35); }

.dp-filter-clear-all {
  padding: 3px 10px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition);
  white-space: nowrap;
}
.dp-filter-clear-all:hover { color: var(--text-primary); }

.data-panel-filter-btn-active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(59, 130, 246, 0.06);
}

/* ─── Customer List View ──────────────────────────────────────────────── */
.customer-list-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Customer Detail Modal ─────────────────────────────────────────── */
.modal-xl {
  width: 800px;
  max-height: 90vh;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.detail-name {
  font-size: 19.8px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-id {
  font-size: 13px;
  font-family: "SF Mono","Fira Code",monospace;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-header-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.detail-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}

/* ─── 加载动画：打字循环 ─────────────────────────────── */
.loading-typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8B8E98;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 18px;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.loading-typing .words {
  overflow: hidden;
  position: relative;
  height: 1.2em;
}



.loading-typing .word {
  display: block;
  height: 100%;
  color: #956afa;
  animation: typingWords 4s infinite;
  font-size: inherit;
}

@keyframes typingWords {
  10%   { transform: translateY(-102%); }
  25%   { transform: translateY(-100%); }
  35%   { transform: translateY(-202%); }
  50%   { transform: translateY(-200%); }
  60%   { transform: translateY(-302%); }
  75%   { transform: translateY(-300%); }
  85%   { transform: translateY(-402%); }
  100%  { transform: translateY(-400%); }
}

.loading-typing-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

.loading-typing-center .loading-typing {
  background: transparent;
  padding: 10px 0;
}

.loading-typing-center-sm {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}

.loading-typing-center-sm .loading-typing {
  font-size: 14px;
  padding: 0;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-info-full {
  grid-column: 1 / -1;
}

.detail-info-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.detail-info-value {
  font-size: 14.850000000000001px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-edit-form {
  padding: 4px 0;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}

.form-group-full {
  grid-column: 1 / -1;
  margin-bottom: 14px;
}

.angel-fund-row {
  grid-column: 1 / -1;
  margin-top: 12px;
  margin-bottom: 14px;
}

.angel-fund-row-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.angel-fund-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.angel-fund-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.angel-fund-label span {
  font-size: 14.3px;
  color: #374151;
}

.angel-fund-amount {
  font-size: 14.3px;
  color: #6b7280;
}

.angel-fund-time-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid #e5e7eb;
}

.angel-fund-time-wrap span {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

.angel-fund-time-wrap .form-input {
  height: 34px;
  padding: 0 10px;
  font-size: 14.3px;
}

/* ─── File Sections ─────────────────────────────────────────────────── */
.detail-section-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

.file-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-category-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-category-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.file-upload-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--transition);
}

.file-row:hover {
  border-color: #c0c0c0;
}

.file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.file-icon {
  width: 48px;
  height: 54px;
  border-radius: 6px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.file-icon svg {
  display: none;
}

.file-icon .ext-icon {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
}

.file-icon .file-ext {
  display: none;
}

/* 文件主形状 - 白色文档 */
.file-icon .file-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fefefe 0%, #f0f0f0 100%);
  border-radius: 2px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.05),
    0 1px 3px rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

/* 文件内容线条 */
.file-icon .file-shape::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #e0e0e0;
  box-shadow: 0 6px 0 #e0e0e0, 0 12px 0 #e0e0e0, 0 18px 0 #e0e0e0;
}

/* 文件类型标签 - 左边彩色条 */
.file-icon .file-tag {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px 0 0 2px;
}

/* PDF */
.file-icon .ext-icon.pdf .file-tag { background: linear-gradient(180deg, #f55139 0%, #e53935 100%); }
/* Word */
.file-icon .ext-icon.doc .file-tag, .file-icon .ext-icon.docx .file-tag { background: linear-gradient(180deg, #2b7cd4 0%, #2b5797 100%); }
/* PPT */
.file-icon .ext-icon.ppt .file-tag, .file-icon .ext-icon.pptx .file-tag { background: linear-gradient(180deg, #d24726 0%, #c43e18 100%); }
/* Excel */
.file-icon .ext-icon.xlsx .file-tag, .file-icon .ext-icon.xls .file-tag { background: linear-gradient(180deg, #217346 0%, #1d6f42 100%); }
/* 图片 */
.file-icon .ext-icon.jpg .file-tag, .file-icon .ext-icon.jpeg .file-tag, 
.file-icon .ext-icon.png .file-tag, .file-icon .ext-icon.gif .file-tag { background: linear-gradient(180deg, #ab47bc 0%, #8e24aa 100%); }
/* 其他 */
.file-icon .ext-icon.other .file-tag { background: linear-gradient(180deg, #78909c 0%, #546e7a 100%); }

/* 标签上的字母 */
.file-icon .file-tag span {
  font-size: 6.6000000000000005px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.file-icon-hidden {
  display: none;
}

.file-ext {
  font-size: 8.8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 1px;
}

.file-ext.red { color: #ef4444; }
.file-ext.blue { color: #2563eb; }
.file-ext.orange { color: #f59e0b; }
.file-ext.green { color: #10b981; }
.file-ext.gray { color: #9ca3af; }

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 14.3px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.file-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f3f4f6;
  color: var(--text-muted);
}

.file-size {
  font-size: 12px;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.file-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.file-btn svg {
  width: 14px;
  height: 14px;
}

.file-btn.preview {
  color: var(--primary);
}

.file-btn.preview:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.file-btn.delete {
  color: var(--danger);
}

.file-btn.delete:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.file-btn.download {
  color: var(--text-muted);
  text-decoration: none;
}

.file-btn.download:hover {
  background: #f3f4f6;
  border-color: #c0c0c0;
}

.file-upload-btn-wrap {
  margin-top: 4px;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14.3px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}

.file-upload-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f9fafb;
}

.file-upload-btn svg {
  width: 13px;
  height: 13px;
}

.file-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  text-align: center;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── Modal File Section ─────────────────────────────────────────────────── */
.modal-file-section {
  border-top: 1px solid var(--border-light);
  padding: 14px 20px;
}

#modal-file-section-wrap {
  margin-top: 0;
}

#modal-file-section-wrap .modal-file-type-grid {
  margin-top: 6px;
}

.modal-file-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.modal-file-upload-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-file-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 10px;
  font-size: 14.3px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 8px;
}

.modal-file-drop-zone:hover,
.modal-file-drop-zone.on {
  border-color: rgba(79,140,255,0.45);
  background: rgba(79,140,255,0.05);
  color: #2563eb;
}

.modal-file-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

#detail-files-readonly-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px;
  width: 100%;
  min-height: 100px;
}

#detail-files-readonly-list .file-card {
  min-width: 0;
}

/* ─── File Card (Thumbnail) ───────────────────────────────────────────────── */
.file-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 2px;
}

.file-card-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 84px;
  align-items: flex-start;
  padding: 2px 0;
}

.file-card-add {
  height: 80px;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 2px dashed #cacaca;
  background-color: rgba(255, 255, 255, 1);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0px 8px 15px -8px rgba(0,0,0,0.1);
  color: rgba(75, 85, 99, 1);
  transition: all 0.18s;
  flex-shrink: 0;
}
.file-card-add:hover {
  border-color: #9ca3af;
  background: rgba(79, 140, 255, 0.04);
}
.file-card-add .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-card-add .icon svg {
  height: 28px;
  fill: rgba(75, 85, 99, 1);
}
.file-card-add .text {
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-card-add .text span {
  font-size: 9.9px;
  font-weight: 400;
  color: rgba(75, 85, 99, 1);
}

.file-card-thumb-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
}

.file-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
}
.file-card-icon.pdf { background: #fef2f2; color: #ef4444; }
.file-card-icon.doc { background: #eff6ff; color: #3b82f6; }
.file-card-icon.xls { background: #f0fdf4; color: #10b981; }
.file-card-icon.img { background: rgba(234,179,8,0.85); color: #fff; }
.file-card-icon.ppt { background: #fff7ed; color: #ea580c; }
.file-card-icon.txt { background: #f5f5f5; color: #525252; }
.file-card-icon.zip { background: #faf5ff; color: #7c3aed; }
.file-card-icon.other { background: #f9fafb; color: #6b7280; }

.file-card-name {
  font-size: 10px;
  color: #6b7280;
  text-align: center;
  padding: 2px 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-thumb-wrap[draggable="true"] {
  cursor: grab;
}
.file-card-thumb-wrap[draggable="true"]:active {
  cursor: grabbing;
}

.file-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  background: var(--bg-secondary);
}

.file-card-file {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  background: transparent;
  padding: 4px;
}
.file-card-file .ext-icon {
  width: 48px;
  height: 54px;
  display: flex;
  position: relative;
}

/* 文件主形状 - 白色文档 */
.ext-icon .file-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fefefe 0%, #f0f0f0 100%);
  border-radius: 2px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.05),
    0 1px 3px rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

/* 文件内容线条 */
.ext-icon .file-shape::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #e0e0e0;
  box-shadow: 0 6px 0 #e0e0e0, 0 12px 0 #e0e0e0, 0 18px 0 #e0e0e0;
}

/* 文件类型标签 - 左边彩色条 */
.ext-icon .file-tag {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px 0 0 2px;
}

/* PDF - 红色 */
.ext-icon.pdf .file-tag { background: linear-gradient(180deg, #f55139 0%, #e53935 100%); }
/* Word - 蓝色 */
.ext-icon.doc .file-tag, .ext-icon.docx .file-tag { background: linear-gradient(180deg, #2b7cd4 0%, #2b5797 100%); }
/* PPT - 橙色 */
.ext-icon.ppt .file-tag, .ext-icon.pptx .file-tag { background: linear-gradient(180deg, #d24726 0%, #c43e18 100%); }
/* Excel - 绿色 */
.ext-icon.xlsx .file-tag, .ext-icon.xls .file-tag { background: linear-gradient(180deg, #217346 0%, #1d6f42 100%); }
/* 图片 - 紫色标签 */
.ext-icon.jpg .file-tag, .ext-icon.jpeg .file-tag, .ext-icon.png .file-tag, .ext-icon.gif .file-tag { background: linear-gradient(180deg, #ab47bc 0%, #8e24aa 100%); }
/* TXT - 灰色 */
.ext-icon.txt .file-tag { background: linear-gradient(180deg, #78909c 0%, #546e7a 100%); }
/* ZIP - 棕色 */
.ext-icon.zip .file-tag, .ext-icon.rar .file-tag { background: linear-gradient(180deg, #a67c52 0%, #8d6e63 100%); }
/* 其他 */
.ext-icon.other .file-tag { background: linear-gradient(180deg, #78909c 0%, #546e7a 100%); }

/* 标签上的字母 */
.ext-icon .file-tag span {
  font-size: 6.6000000000000005px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.file-card-file span {
  font-size: 11px;
  font-weight: 500;
  color: #000;
  text-align: center;
  line-height: 1.2;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  margin-top: 2px;
}

/* 导师详情页文件卡片 */
.mentor-file-card {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--border-light);
  background: #f9fafb;
  position: relative;
  cursor: pointer;
}
.mentor-file-card .file-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.mentor-file-card .file-card-file {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  padding: 4px;
}
.mentor-file-card .file-card-file .ext-icon {
  width: 48px;
  height: 54px;
  position: relative;
  display: flex;
}
.file-card-overlay {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 6px;
  z-index: 2;
  background: rgba(0,0,0,0.55);
  padding: 2px 3px;
  pointer-events: none;
}

.file-card-thumb-wrap:hover .file-card-overlay,
.mentor-file-card:hover .file-card-overlay {
  opacity: 1;
  pointer-events: auto;
}

.file-card-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.file-card-btn:hover {
  background: #fff;
}
.file-card-btn.danger {
  color: var(--danger);
}
.file-card-btn svg {
  width: 12px;
  height: 12px;
}

.file-card.drag-over {
  border-color: var(--primary);
  background: rgba(79, 140, 255, 0.04);
  border-radius: 10px;
}

.modal-file-upload-slot {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-file-upload-slot-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 2px;
}

.modal-file-upload-slot-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-file-upload-slot-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f9fafb;
}

.modal-file-upload-slot-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.modal-file-upload-slot-btn.has-file {
  border-style: solid;
  border-color: var(--success);
  color: var(--success);
  background: var(--success-light);
}

.modal-file-upload-slot-count {
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 2px;
}

.modal-file-list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-file-list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.modal-file-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.modal-file-list-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 6px;
}

.modal-file-list-item-icon svg {
  width: 16px;
  height: 16px;
}

.modal-file-list-item-info {
  flex: 1;
  min-width: 0;
}

.modal-file-list-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-file-list-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-file-list-item-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.modal-file-list-item-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.modal-file-list-item-remove svg {
  width: 14px;
  height: 14px;
}

.detail-files-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.detail-file-category-group {
  margin-bottom: 20px;
}

.detail-file-category-group:last-child {
  margin-bottom: 0;
}

.detail-file-category-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 2px;
  margin-bottom: 10px;
}

.detail-file-category-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.detail-file-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 90px;
}

.detail-file-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-file-thumb svg {
  color: #9ca3af;
}

.detail-file-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-file-thumb:hover .detail-file-overlay {
  display: flex;
}

.detail-file-overlay button,
.detail-file-overlay a {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background 0.15s;
  text-decoration: none;
}

.detail-file-overlay button:hover,
.detail-file-overlay a:hover {
  background: #fff;
}

.detail-file-overlay svg {
  width: 12px;
  height: 12px;
}

.detail-file-name {
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
  max-width: 90px;
}

/* ─── Files Page ─────────────────────────────────────────────────────────── */
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-shrink: 0;
}

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

.files-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.files-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 14.3px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.files-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(54, 54, 54, 0.08);
}

.files-search-input::placeholder {
  color: var(--text-muted);
}

/* File Cards Container */
.files-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 2px;
}

/* Card */
.files-card {
  --bg-card: #ffffff;
  --primary: #6d28d9;
  --primary-800: #4c1d95;
  --primary-shadow: rgba(109, 40, 217, 0.15);
  --light: #374151;
  --zinc-800: #1f2937;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--bg-card);
  border-radius: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.files-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.files-card .card-top {
  overflow: hidden;
  position: relative;
  z-index: 5;
  width: 100%;
  height: 8rem;
  background-color: var(--primary-800);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
  overflow: clip;
}

.files-card .card-top .card-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.files-card .card-top .card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24.200000000000003px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.files-card .card-top .card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.files-card .card-top .card-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-bottom: 12px;
  position: relative;
  z-index: 1;
}

.files-card .card-top .card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
}

.files-card .card-top .card-border,
.files-card .card-top .card-border::before,
.files-card .card-top .card-corner {
  display: none;
}

.files-card .card-bottom {
  padding: 4px 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 2px;
}

.files-card .card-name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--light);
  text-transform: capitalize;
  text-wrap: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
}

.files-card .card-phone {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files-card .card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 2px;
}

.files-card .card-stat {
  flex: 1;
  text-align: center;
}

.files-card .card-stat + .card-stat {
  border-left: 1px solid #e5e7eb;
}

.files-card .card-stat .stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--light);
  display: block;
  line-height: 1;
}

.files-card .card-stat .stat-label {
  font-size: 0.7rem;
  margin-top: 3px;
  display: block;
  color: #9ca3af;
}

.files-card .card-stat .stat-num.blue { color: #3b82f6; }
.files-card .card-stat .stat-num.purple { color: #7c3aed; }
.files-card .card-stat .stat-num.orange { color: #f59e0b; }

/* Customer file modal */
.files-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-md);
}

.files-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.files-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 900px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-md);
  overflow: hidden;
}

.files-modal-overlay.show .files-modal {
  transform: scale(1) translateY(0);
}

.files-modal-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.files-modal-header-row1 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.files-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.files-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19.8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.files-modal-info {
  flex: 1;
  min-width: 0;
}

.files-modal-name {
  font-size: 17.6px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.files-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.files-modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.files-modal-close svg {
  width: 16px;
  height: 16px;
}

.files-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.files-modal-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.files-modal-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.files-modal-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.files-modal-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.files-modal-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.files-modal-tab .tab-count {
  background: rgba(255,255,255,0.25);
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 11px;
}

.files-modal-tab:not(.active) .tab-count {
  background: var(--border-light);
  color: var(--text-muted);
}

.files-modal-tab svg {
  width: 13px;
  height: 13px;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.files-modal-pending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.files-modal-pending-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.files-modal-pending-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  margin-bottom: 5px;
}

.files-modal-pending-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.files-modal-pending-type {
  font-size: 12px;
  color: var(--primary);
  background: #dbeafe;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.files-modal-pending-size {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.files-modal-pending-remove {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  border-radius: 4px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.files-modal-pending-remove:hover {
  background: #fee2e2;
  color: var(--danger);
}

.files-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.files-list-row:hover {
  border-color: #c0c0c0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.files-list-row .file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.files-list-row .file-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.files-list-row .file-icon svg {
  width: 20px;
  height: 20px;
}

.files-list-row .file-icon .file-ext-tag {
  font-size: 8.8px;
  font-weight: 700;
  margin-top: 1px;
}

.files-list-row .file-info {
  flex: 1;
  min-width: 0;
}

.files-list-row .file-name {
  font-size: 14.3px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files-list-row .file-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.files-list-row .file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.files-list-row .file-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.files-list-row .file-btn svg {
  width: 14px;
  height: 14px;
}

.files-list-row .file-btn.preview { color: var(--primary); }
.files-list-row .file-btn.preview:hover { background: #eff6ff; border-color: #3b82f6; }
.files-list-row .file-btn.download { color: var(--text-muted); }
.files-list-row .file-btn.download:hover { background: #f3f4f6; border-color: #c0c0c0; }
.files-list-row .file-btn.delete { color: var(--danger); }
.files-list-row .file-btn.delete:hover { background: #fef2f2; border-color: #ef4444; }

.files-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.files-empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin: 0 auto 12px;
  display: block;
}

.files-empty-state p {
  font-size: 14.3px;
  font-weight: 500;
}

.files-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(109, 40, 217, 0.3);
  color: #c084fc;
}

/* ─── Settings Page (New Design) ──────────────────────────────────────────── */
.settings-container {
  display: flex;
  gap: 20px;
  height: 100%;
  overflow: hidden;
}

/* ── Settings Nav ── */
.settings-nav {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-left: 12px;
}

.settings-nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.settings-nav-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 19.8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.settings-nav-user-info {
  flex: 1;
  min-width: 0;
}

.settings-nav-name {
  font-size: 16.5px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-nav-role {
  font-size: 13px;
  color: rgba(0,0,0,0.45);
  margin-top: 2px;
}

.settings-nav-section {
  background: rgba(255,255,255,0);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 12px;
}

.settings-nav-label {
  display: none;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(0,0,0,0.55);
  font-size: 14.850000000000001px;
  font-weight: 500;
}

.settings-nav-item span {
  flex: 1;
}

.settings-nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.85);
}

.settings-nav-item.active {
  background: rgba(102,126,234,0.12);
  color: #667eea;
  font-weight: 600;
}

.settings-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

/* ── Settings Content ── */
.settings-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 8px;
}
}

.settings-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.settings-panel.active {
  display: block;
  padding-top: 20px;
}

.settings-panel-header {
  margin-bottom: 24px;
}

.settings-panel-header h2 {
  font-size: 24.200000000000003px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.settings-panel-header p {
  font-size: 14.3px;
  color: rgba(0,0,0,0.45);
  margin: 0;
}

/* ── Profile Card ── */
.profile-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.profile-card-cover {
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-card-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0 24px 24px;
  margin-top: -40px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 30.800000000000004px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}

.profile-info {
  padding-top: 48px;
  flex: 1;
}

.profile-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}

.profile-role {
  font-size: 14.3px;
  color: rgba(0,0,0,0.45);
  margin: 0 0 12px;
}

.btn-edit-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14.3px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.btn-edit-profile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* ── Info Section ── */
.info-section {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.info-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.info-item:hover {
  background: #f3f4f6;
}

.info-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(102,126,234,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #667eea;
}

.info-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-item-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0,0,0,0.45);
}

.info-item-value {
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #111;
}

.info-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(102,126,234,0.12);
  color: #764ba2;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

/* ── Security Status ── */
.security-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.04) 100%);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: 16px;
  margin-bottom: 20px;
}

.security-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.security-status-info h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: #059669;
  margin: 0 0 4px;
}

.security-status-info p {
  font-size: 13px;
  color: rgba(5,150,105,0.75);
  margin: 0;
}

/* ── Action Cards ── */
.action-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}

.action-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.action-card.danger .action-card-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.action-card-content {
  flex: 1;
}

.action-card-content h4 {
  font-size: 16.5px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px;
}

.action-card-content p {
  font-size: 13px;
  color: rgba(0,0,0,0.45);
  margin: 0;
}

.action-card-arrow {
  color: rgba(0,0,0,0.25);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.action-card:hover .action-card-arrow {
  color: rgba(0,0,0,0.5);
  transform: translateX(4px);
}

/* ── Tip Card ── */
.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(251,191,36,0.04) 100%);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 16px;
}

.tip-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(251,191,36,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d97706;
}

.tip-card-content h4 {
  font-size: 14.3px;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 4px;
}

.tip-card-content p {
  font-size: 13px;
  color: rgba(146,64,14,0.75);
  margin: 0;
  line-height: 1.5;
}

/* ── Preference Section ── */
.preference-section {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.preference-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-swatch:hover {
  background: rgba(0,0,0,0.04);
}

.theme-swatch.active {
  border-color: #667eea;
  background: rgba(102,126,234,0.08);
}

.theme-swatch-color {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: all 0.2s ease;
}

.theme-swatch:hover .theme-swatch-color {
  transform: scale(1.05);
}

.theme-swatch span {
  font-size: 12px;
  color: rgba(0,0,0,0.5);
  font-weight: 500;
}

.preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preference-item-info h4 {
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px;
}

.preference-item-info p {
  font-size: 13px;
  color: rgba(0,0,0,0.45);
  margin: 0;
}

.preference-select {
  padding: 8px 32px 8px 14px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  background: #f9fafb;
  color: #111;
  font-size: 14.3px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s ease;
}

.preference-select:focus {
  border-color: #667eea;
}

/* ── Notification Section ── */
.notification-section {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.notification-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.notification-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notification-item:first-child {
  padding-top: 0;
}

.notification-item-info h4 {
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px;
}

.notification-item-info p {
  font-size: 13px;
  color: rgba(0,0,0,0.45);
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: 0.25s ease;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Admin Cards ── */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.admin-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.admin-card-cover {
  height: 6px;
}

.admin-card-body {
  padding: 20px;
}

.admin-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}

.admin-card-body h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}

.admin-card-body p {
  font-size: 13px;
  color: rgba(0,0,0,0.45);
  margin: 0;
  line-height: 1.4;
}

.admin-card-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.admin-card:hover .admin-card-arrow {
  color: rgba(0,0,0,0.4);
  transform: translateY(-50%) translateX(4px);
}

/* ── Warning Card ── */
.warning-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,0.1) 0%, rgba(251,191,36,0.05) 100%);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 14px;
  font-size: 13.750000000000002px;
  color: #92400e;
  line-height: 1.5;
}

.warning-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(217,119,6,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d97706;
}

/* ── About Card ── */
.about-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.about-card-cover {
  height: 80px;
}

.about-card-body {
  padding: 0 24px 24px;
  margin-top: -50px;
  text-align: center;
}

.about-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}

.about-card-body h3 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}

.about-card-body .version {
  font-size: 14.3px;
  color: rgba(0,0,0,0.45);
  font-family: "SF Mono","Fira Code",monospace;
  margin: 0;
}

/* ── System Info ── */
.system-info {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.system-info-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.system-info-list {
  display: flex;
  flex-direction: column;
}

.system-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.system-info-item:last-child {
  border-bottom: none;
}

.system-info-label {
  font-size: 14.3px;
  color: rgba(0,0,0,0.5);
}

.system-info-value {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
}

/* ─── Misc ──────────────────────────────────────────────────────────── */
.mono { font-family: "SF Mono","Fira Code",monospace; }
.text-muted { color: var(--text-muted); }
.action-btns { display: flex; align-items: center; gap: 2px; }
.nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

/* ─── Global Search Panel ────────────────────────────────────────────────── */
.global-search-panel {
  position: fixed;
  width: 300px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 9999;
  font-size: 14.3px;
  max-height: 360px;
  overflow-y: auto;
  animation: gs-fade-in 0.2s ease-out;
}
@keyframes gs-fade-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gs-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
  animation: gs-item-in 0.18s ease-out both;
}
@keyframes gs-item-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.gs-item:nth-child(1) { animation-delay: 0.02s; }
.gs-item:nth-child(2) { animation-delay: 0.05s; }
.gs-item:nth-child(3) { animation-delay: 0.08s; }
.gs-item:nth-child(4) { animation-delay: 0.11s; }
.gs-item:nth-child(5) { animation-delay: 0.14s; }
.gs-item:last-child { border-bottom: none; }
.gs-item:hover { background: #f0fdf4; }
.gs-item-expiring { border-left: 3px solid #f59e0b; }
.gs-name { font-weight: 600; color: #1f2937; margin-bottom: 2px; }
.gs-meta { font-size: 13px; color: #374151; margin-top: 1px; }
.gs-empty { padding: 14px; color: #6b7280; text-align: center; font-size: 14.3px; }
.gs-section-title {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gs-divider { height: 1px; background: #f3f4f6; margin: 2px 0; }

/* ─── Settings B&W Style ────────────────────────────────────────────────── */
.settings-container {
  display: flex;
  gap: 16px;
  height: 100%;
  overflow: hidden;
  padding: 16px;
  background: transparent;
}

.settings-nav {
  width: 200px;
  flex-shrink: 0;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-left: 12px;
  padding: 20px;
}

.settings-nav-header {
  padding: 8px 8px 12px;
  margin-bottom: 8px;
}

.window-dots-sm {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.dot-sm.red { background: #ff5f57; }
.dot-sm.yellow { background: #febc2e; }
.dot-sm.green { background: #28c840; }

.settings-nav-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-section {
  background: transparent;
  border: none;
  padding: 0;
}

.settings-nav-label {
  display: none;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14.3px;
  font-weight: 500;
  color: rgba(0,0,0,0.5);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  white-space: nowrap;
}

.settings-nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.8);
}

.settings-nav-item.active {
  background: rgba(255,255,255,0.7);
  color: #111;
  font-weight: 600;
  border: none;
  box-shadow: none;
}

.settings-nav-icon-dark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.45);
  transition: all 0.15s;
}

.settings-nav-item:hover .settings-nav-icon-dark {
  background: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.7);
}

.settings-nav-item.active .settings-nav-icon-dark {
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.45);
}

.settings-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: transparent;
  border-radius: 12px;
  border: none;
  padding: 0 20px 20px 20px;
}

.settings-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.settings-panel.active {
  display: block;
  padding-top: 20px;
}

/* Settings Panels */
.s-header {
  margin-bottom: 20px;
}

.s-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.s-header p {
  font-size: 13px;
  color: #999;
  margin: 0;
}

.s-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  margin-top: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.s-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* Profile */
.s-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.s-avatar-lg {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 19.8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s-profile-info {
  flex: 1;
}

.s-profile-info h3 {
  font-size: 17.6px;
  font-weight: 700;
  color: #111;
  margin: 0 0 2px;
}

.s-role {
  font-size: 13px;
  color: #999;
}

.s-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.s-btn-primary:hover {
  background: #333;
}

/* Info */
.s-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.s-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.s-info-label {
  font-size: 11px;
  color: #aaa;
}

.s-info-value {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
}

.s-badge {
  display: inline-flex;
  padding: 3px 8px;
  background: #f5f5f5;
  color: #333;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}

/* Status */
.s-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.s-status-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  flex-shrink: 0;
}

.s-status-title {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.s-status-desc {
  font-size: 12px;
  color: #999;
}

/* Action */
.s-action-list {
  margin-bottom: 14px;
}

.s-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.s-action-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateX(2px);
}

.s-action-icon-dark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  flex-shrink: 0;
}

.s-action-icon-dark.danger {
  background: #fef2f2;
  color: #dc2626;
}

.s-action-content {
  flex: 1;
}

.s-action-title {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.s-action-desc {
  font-size: 12px;
  color: #999;
}

.s-action-item.danger .s-action-title {
  color: #dc2626;
}

.s-arrow {
  color: #ccc;
  flex-shrink: 0;
}

/* Tip */
.s-tip {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.s-tip svg {
  color: #999;
  flex-shrink: 0;
  margin-top: 1px;
}

.s-tip-title {
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
}

.s-tip.warning {
  background: #fefce8;
  color: #92400e;
}

.s-tip.warning svg {
  color: #d97706;
}

/* Swatches */
.s-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.s-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.s-swatch:hover {
  background: #f5f5f5;
}

.s-swatch.active {
  border-color: #111;
  background: #f5f5f5;
}

.s-swatch-color {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.s-swatch span {
  font-size: 9.9px;
  color: #666;
  font-weight: 500;
}

/* Row */
.s-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.s-row-info {
  flex: 1;
}

.s-row-title {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.s-row-desc {
  font-size: 12px;
  color: #999;
}

.s-select {
  padding: 7px 28px 7px 12px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Toggle */
.s-toggle-list {
  display: flex;
  flex-direction: column;
}

.s-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.s-toggle-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.s-toggle-item:first-child {
  padding-top: 0;
}

.s-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.s-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.s-toggle-track {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ddd;
  border-radius: 20px;
  transition: 0.2s;
}

.s-toggle-track::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.s-toggle input:checked + .s-toggle-track {
  background-color: #111;
}

.s-toggle input:checked + .s-toggle-track::before {
  transform: translateX(18px);
}

/* Grid */
.s-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.s-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.s-grid-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.s-grid-card:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.s-grid-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  margin-bottom: 10px;
}

.s-grid-title {
  font-size: 14.3px;
  font-weight: 600;
  color: #111;
  margin-bottom: 3px;
}

.s-grid-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

.s-grid-item {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.s-grid-label {
  font-size: 9.9px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.s-grid-value {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

/* Center */
.s-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 14px;
}

.s-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  margin-bottom: 12px;
}

.window-dots-large {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-large {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.dot-large.red { background: #ff5f57; }
.dot-large.yellow { background: #febc2e; }
.dot-large.green { background: #28c840; }

.s-brand {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.s-subtitle {
  font-size: 13px;
  color: #999;
}

/* List */
.s-list {
  display: flex;
  flex-direction: column;
}

.s-list-item {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}

.s-list-item:last-child {
  border-bottom: none;
}

.s-list-item span:first-child {
  color: #999;
}

.s-list-item span:last-child {
  color: #111;
  font-weight: 500;
}

/* Features */
.s-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.s-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
}

.s-feature-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
  flex-shrink: 0;
}

/* Mono */
.mono {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ── Overview Tab Navigation ──────────────────────────────── */
.overview-tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}
.overview-tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14.3px;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--dur-fast) var(--ease-smooth), border-color var(--dur-fast) var(--ease-smooth);
}
.overview-tab-btn.active {
  color: #3b82f6;
  font-weight: 600;
  border-bottom-color: #3b82f6;
}
.overview-tab-btn:hover:not(.active) {
  color: #374151;
}
.overview-tab-panel {
  display: none;
}
.overview-tab-panel.active {
  display: block;
}
.overview-empty {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 14.3px;
}

/* ─── Trend Chart ──────────────────────────────────────────────────────────── */
.stats-chart-panel {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  padding: 18px 22px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.trend-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trend-selects {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-select-wrap {
  position: relative;
}

.trend-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 5px 30px 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  outline: none;
}

.trend-select-wrap select:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
}

.trend-select-wrap select:focus {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.trend-select-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.trend-chart-wrap {
  flex: 1;
  min-height: 180px;
  position: relative;
  margin-top: 8px;
}

.trend-empty-state {
  flex: 1;
  min-height: 180px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trend-empty-state p {
  font-size: 14.3px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.trend-empty-state span {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Inline stats inside panel-header (title right side) */
.trend-stats-inline {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 7px 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.trend-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  min-width: 44px;
}

.trend-stat-label {
  font-size: 9.9px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.trend-stat-value {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trend-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

/* ─── Premium Stats Dashboard ────────────────────────────────────────────────── */
.trend-panel-row {
  margin-bottom: 12px;
  flex-shrink: 0;
}

.stats-row2 {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
  align-items: stretch;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: stretch;
  margin-bottom: 0;
  flex-shrink: 0;
}

.kpi-mini-card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px 10px;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  cursor: default;
}

.kpi-mini-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  opacity: 0.9;
}

.kpi-bar-green  { background: linear-gradient(90deg, #10b981, #34d399); }
.kpi-bar-purple { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.kpi-bar-orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.kpi-bar-red    { background: linear-gradient(90deg, #ef4444, #f87171); }

.kpi-mini-card:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.kpi-mini-value {
  font-size: 30.800000000000004px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-mini-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Side Chart Card — Donut */
.side-chart-card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.3px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}
.panel-title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.panel-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  font-size: 12.65px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.panel-link-btn:hover {
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
}

.side-chart-body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin-top: 4px;
}
.side-chart-left {
  width: 320px;
  height: 320px;
  flex-shrink: 0;
  position: relative;
}

.side-total-block {
  text-align: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.side-total-num {
  font-size: 30.800000000000004px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.side-total-label {
  font-size: 11.55px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.side-breakdown { display: flex; flex-direction: column; gap: 5px; flex: 1; margin-left: 8px; }
.side-breakdown-row {
  display: grid;
  grid-template-columns: 10px 1fr auto 36px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  transition: all 0.2s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  font-size: 12.65px;
}
.side-breakdown-row:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: translateX(2px);
}
.side-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.side-label { font-weight: 500; color: var(--text-secondary); }
.side-count { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.side-pct { font-size: 11.55px; color: var(--text-muted); min-width: 36px; text-align: right; }

.side-chart-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  padding: 3px 10px;
}
.side-stat-num {
  font-size: 15.400000000000002px;
  font-weight: 700;
  color: #059669;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.side-stat-lbl {
  font-size: 11px;
  font-weight: 500;
  color: rgba(5, 150, 105, 0.7);
}
.side-stat-pill-secondary {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.15);
}
.side-stat-pill-secondary .side-stat-num { color: #d97706; }
.side-stat-pill-secondary .side-stat-lbl { color: rgba(217, 119, 6, 0.7); }

/* Stats table — glassmorphism */
.stats-table-card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.stats-table-card .panel-header {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.3);
}

.stats-table { width: 100%; border-collapse: collapse; }
.stats-table thead th {
  padding: 9px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.stats-table tbody td {
  padding: 10px 18px;
  font-size: 13.750000000000002px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  vertical-align: middle;
}
.stats-table tbody tr:last-child td { border-bottom: none; }
.stats-table tbody tr:hover td { background: rgba(59, 130, 246, 0.03); cursor: pointer; }
.stats-table .name { font-weight: 600; color: #111827; }
.stats-table .empty-cell { text-align: center; padding: 20px; }

/* ─── Activities Page ───────────────────────────────────────────────────────── */
.act-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.act-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 300px;
  text-align: center;
}

.act-empty-title {
  font-size: 16.5px;
  font-weight: 600;
  color: #9ca3af;
  margin: 0 0 6px;
}

.act-empty-sub {
  font-size: 14.3px;
  color: #d1d5db;
  margin: 0;
}

.act-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

/* ─── Mentors Layout ─────────────────────────────── */
#mentors-layout {
  display: flex;
  gap: 16px;
  height: 100%;
  overflow: hidden;
  animation: fadeSlideIn 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}

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

.mentors-topbar {
  display: none;
}

.mentors-body {
  display: flex;
  gap: 16px;
  width: 100%;
}

.mentors-left {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  padding: 16px;
}

.mentors-left-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.mentors-left-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mentors-left-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeSlideIn 0.25s ease-out;
}

.mentors-right {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  padding-left: 0;
  animation: fadeSlideIn 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.mentor-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.mentor-nav-item:hover {
  background: rgba(255, 255, 255, 0.35);
}

.mentor-nav-item.active {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mentor-nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15.400000000000002px;
  font-weight: 700;
  flex-shrink: 0;
}

.mentor-nav-info {
  flex: 1;
  min-width: 0;
}

.mentor-nav-name {
  font-weight: 600;
  font-size: 14.3px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mentor-nav-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mentor-nav-empty {
  padding: 20px 0;
  text-align: center;
  color: #9ca3af;
  font-size: 14.3px;
}

/* Mentor detail right panel */
.mentor-detail-card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.mentor-detail-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.mentor-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.mentor-detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24.200000000000003px;
  font-weight: 700;
  flex-shrink: 0;
}

.mentor-detail-name {
  font-size: 19.8px;
  font-weight: 700;
  color: #1e293b;
}

.mentor-detail-gender {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.mentor-detail-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mentor-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.mentor-info-item {
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 10px 14px;
}

.mentor-info-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mentor-info-value {
  font-size: 14.3px;
  color: #334155;
  font-weight: 500;
}

.mentor-intro-box {
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 14.3px;
  color: #475569;
  line-height: 1.6;
}

.mentor-files-section {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 16px;
}

.mentor-file-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mentor-file-info {
  text-align: center;
  max-width: 80px;
}
.mentor-file-info-name {
  font-size: 10px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.mentor-file-info-size {
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.3;
}

.mentor-files-title {
  font-size: 15.400000000000002px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mentor-file-upload-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.mentor-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mentor-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.mentor-file-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
}

.mentor-file-size {
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
}

.mentor-file-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.mentor-file-btn {
  padding: 3px 8px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.mentor-file-btn.open {
  background: rgba(99,102,241,0.1);
  color: #4f46e5;
}

.mentor-file-btn.open:hover {
  background: rgba(99,102,241,0.2);
}

.mentor-file-btn.del {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
}

.mentor-file-btn.del:hover {
  background: rgba(239,68,68,0.2);
}

.mentor-file-btn.download {
  background: rgba(16,185,129,0.1);
  color: #059669;
}

.mentor-file-btn.download:hover {
  background: rgba(16,185,129,0.2);
}

.mentor-no-files {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 16px 0;
}



.act-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.act-card:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(79, 140, 255, 0.12), 0 2px 0 rgba(255, 255, 255, 0.95) inset;
  transform: translateY(-2px);
}

.act-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.act-card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.4;
  flex: 1;
  cursor: pointer;
}

.act-card-excerpt {
  font-size: 13.750000000000002px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  line-height: 1.6;
  cursor: pointer;
}

.act-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  cursor: pointer;
}

.act-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.act-meta-item svg { flex-shrink: 0; }

/* ─── Activity Modal (Glassmorphism) ──────────────────────────────────────── */
.act-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.act-modal-overlay[data-editing] {
  display: flex;
}

.act-modal-box {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  width: 680px;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255,255,255,0.6) inset;
  animation: actModalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.act-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.act-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17.6px;
  font-weight: 700;
  color: #111827;
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.act-modal-title svg { color: #4F8CFF; }

.act-modal-x {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.act-modal-x:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.act-modal-bd {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.act-f-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.act-f-row:last-child { margin-bottom: 0; }

.act-fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* ─── Activity File Wrap ────────────────────────────────────────────────────────── */
.act-file-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

/* ─── Activity File Group (row: zone+thumbs inline, label on top) ────────────── */
.act-file-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}

.act-file-group-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.act-file-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.act-file-group-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.act-file-zone {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed #cacaca;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 10px;
  box-shadow: 0px 8px 15px -8px rgba(0,0,0,0.1);
  color: rgba(75, 85, 99, 1);
  transition: all 0.18s;
  flex-shrink: 0;
}
.act-file-zone:hover {
  border-color: #9ca3af;
  background: rgba(79, 140, 255, 0.04);
}
.act-file-zone-on {
  border-color: rgba(79, 140, 255, 0.5);
  background: rgba(79, 140, 255, 0.06);
}
.act-file-zone svg { flex-shrink: 0; }

.act-file-thumbs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.act-photo-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.act-file-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.act-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.act-req { color: #ef4444; }

.act-input {
  padding: 9px 13px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 14.3px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: all 0.18s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.act-input::placeholder { color: var(--text-muted); }

.act-input:focus {
  border-color: rgba(79, 140, 255, 0.45);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.act-area { resize: vertical; min-height: 80px; }

.act-select {
  padding: 9px 30px 9px 13px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 14.3px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: all 0.18s;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.act-select:focus {
  border-color: rgba(79, 140, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.act-drop-zone {
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.18s;
  background: rgba(0, 0, 0, 0.015);
}

.act-drop-zone.act-drop-on {
  border-color: rgba(79, 140, 255, 0.5);
  background: rgba(79, 140, 255, 0.06);
}

.act-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.act-drop-inner svg { color: #9ca3af; }

.act-drop-inner p {
  margin: 0;
  font-size: 14.3px;
  color: var(--text-secondary);
}

.act-drop-link {
  color: #2563eb;
  cursor: pointer;
  font-weight: 500;
}

.act-drop-link:hover { text-decoration: underline; }

.act-drop-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.act-pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.act-pitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.act-pitem-add {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  border: 2px dashed #d1d5db;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.15s;
  flex-shrink: 0;
}
.act-pitem-add:hover {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.04);
  color: #4f46e5;
}

.act-pthumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.15s;
}

.act-pthumb:hover { transform: scale(1.04); }

.act-pthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.act-pname {
  font-size: 9.9px;
  color: var(--text-muted);
  text-align: center;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-pdel {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.88);
  color: #fff;
  border: 1.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
  flex-shrink: 0;
}

.act-pitem:hover .act-pdel { opacity: 1; }

.act-plan-wrap {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  transition: all 0.18s;
}
.act-plan-wrap:focus-within {
  border-color: rgba(79, 140, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}
.act-plan-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}
.act-plan-btn {
  padding: 4px 7px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}
.act-plan-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  color: var(--text-primary);
}
.act-plan-sep {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 2px;
}
.act-plan-editor {
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px 13px;
  font-size: 14.3px;
  line-height: 1.7;
  color: var(--text-primary);
  outline: none;
}
.act-plan-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
.act-plan-editor img {
  max-width: 320px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 6px;
  margin: 6px 0;
  display: block;
  object-fit: cover;
}
.mentor-editor-cell .act-plan-editor {
  max-height: 200px;
}
#mentor-editor-intro {
  min-height: 100px;
  max-height: 160px;
}
.mentor-rich-content {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  word-break: break-all;
}
.mentor-rich-content img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 6px;
  display: block;
}
#mentor-col-cert,
#mentor-col-agreement,
#mentor-col-credential,
#mentor-col-other {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.act-plan-editor ul, .act-plan-editor ol {
  padding-left: 20px;
  margin: 4px 0;
}

.act-modal-ft {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.act-btn-cancel {
  padding: 9px 22px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  font-size: 14.3px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}

.act-btn-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.15);
}

.act-btn-save {
  padding: 9px 24px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #4F8CFF, #2563EB);
  color: #fff;
  font-size: 14.3px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.act-btn-save:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

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

/* Delete btn on cards */
.act-del-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.act-del-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Empty / Loading state */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 14.3px;
}

.otp-input {
  width: 36px;
  height: 40px;
  text-align: center;
  border: none;
  border-bottom: 1.5px solid #d2d2d2;
  margin: 0 6px;
  font-size: 19.8px;
  font-weight: 700;
  color: #1f2937;
  background: transparent;
  transition: border-color 0.2s;
  border-radius: 0;
}

.otp-input:focus {
  border-bottom: 1.5px solid royalblue;
  outline: none;
}

.delete-item-row {
  display: grid;
  grid-template-columns: 24px 90px 1fr 110px 80px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}
.delete-item-row:last-child { border-bottom: none; }
.delete-item-row:hover { background: #f9fafb; }
.delete-item-row input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; }
.delete-item-name { font-weight: 600; color: #111827; }
.delete-item-company { color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-item-phone { color: #374151; }
.delete-item-date { color: #9ca3af; text-align: right; }

/* ─── Account Management Modal ───────────────────────────────────────────────── */
#account-management-modal .am-dialog,
#add-user-modal .am-dialog {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: scaleUp 0.25s var(--ease-out-expo) both;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}
#account-management-modal .am-dialog {
  width: 900px;
  max-width: 94vw;
}
#add-user-modal .am-dialog {
  width: 440px;
  max-width: 92vw;
}

.am-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}
.am-dialog-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.am-dialog-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.am-dialog-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px;
}
.am-dialog-sub {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}
.am-dialog-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.am-dialog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
  flex-shrink: 0;
}
.am-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 10px;
  color: #9ca3af;
  flex: 1;
  max-width: 280px;
}
.am-search-wrap:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.am-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #374151;
  width: 100%;
  padding: 7px 0;
}
.am-search-input::placeholder { color: #9ca3af; }
.am-count-badge {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}

.am-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.am-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.am-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #f0f0f0;
}
.am-table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}
.am-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f9fafb;
  vertical-align: middle;
}
.am-table tbody tr:hover { background: #fafafa; }
.am-table tbody tr:last-child td { border-bottom: none; }

.am-temp-password {
  font-family: 'Courier New', monospace;
  color: #16a34a;
  font-weight: 600;
  background: #f0fdf4;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px dashed #bbf7d0;
}

.am-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
}
.am-badge-admin {
  background: #dbeafe;
  color: #1d4ed8;
}
.am-badge-user {
  background: #f3f4f6;
  color: #6b7280;
}

.am-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

/* Add/Edit user form */
.am-form-group {
  margin-bottom: 16px;
}
.am-form-group:last-child { margin-bottom: 0; }
.am-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
.am-required { color: #ef4444; }
.am-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #111;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  box-sizing: border-box;
}
.am-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.am-input:disabled {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}
.am-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  min-height: 16px;
}
.am-password-wrap {
  position: relative;
}
.am-password-wrap .am-input {
  padding-right: 40px;
}
.am-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.am-password-toggle:hover { color: #6b7280; }

/* Role selector */
.am-role-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.am-role-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.am-role-option:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}
.am-role-option.active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.am-role-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.am-role-name {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}
.am-role-desc {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 1px;
}
.am-role-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}
.am-role-option.active .am-role-check {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 0.8s linear infinite; }

/* ─── 导出/导入数据模态框样式 ───────────────────────────────────────────────── */
.export-type-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.export-type-item:hover {
  border-color: #10b981;
  background: #f0fdf4;
}
.export-type-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #10b981;
}
.export-type-info {
  flex: 1;
}
.export-type-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.export-type-desc {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* ─── 导出模态框标签页样式 ─────────────────────────────────────────────── */
.export-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.export-tab-btn:hover {
  color: #374151;
}
.export-tab-btn.active {
  color: #10b981;
  border-bottom-color: #10b981;
}

/* ─── 导出列表样式 ─────────────────────────────────────────────────── */
.export-list-wrap {
  padding: 0 16px 12px;
}
.export-list-inner {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin: 12px 16px;
}
.export-item-row {
  display: grid;
  grid-template-columns: 24px 100px 160px 110px auto;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}
.export-item-row:last-child { border-bottom: none; }
.export-item-row:hover { background: #f9fafb; }
.export-item-row.selected { background: #f0fdf4; }
.export-item-row input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #10b981; }
.export-item-name { font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-item-company { color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-item-phone { color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-item-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e0e7ff;
  color: #4f46e5;
  text-align: center;
  white-space: nowrap;
}
.export-item-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  text-align: center;
  white-space: nowrap;
}

/* ─── 企业资质模块样式 ────────────────────────────────────────────────────── */
.qual-layout {
  display: flex;
  gap: 14px;
  height: 100%;
  overflow: hidden;
}

/* ── 玻璃拟态左侧导航栏 ── */
.qual-sidebar {
  width: 272px;
  min-width: 272px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.qual-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
}

.qual-tree-title {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qual-add-cat-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.qual-add-cat-btn:hover { background: rgba(0, 0, 0, 0.9); }
.qual-add-cat-btn:active { transform: scale(0.96); }

.qual-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

/* 一级目录 */
.qual-cat {
  margin-bottom: 2px;
}

.qual-cat-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  margin: 0 8px;
  transition: background 0.12s;
}
.qual-cat-header:hover { background: rgba(0,0,0,0.04); }

.qual-cat-arrow {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #9ca3af;
}
.qual-cat-arrow svg { transition: transform 0.2s; }
.qual-cat.collapsed .qual-cat-arrow svg { transform: rotate(-90deg); }

.qual-cat-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-left: 4px;
  letter-spacing: 0.01em;
}

.qual-cat-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.qual-cat-header:hover .qual-cat-actions { opacity: 1; }

.qual-icon-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: none;
  color: #6b7280;
  transition: background 0.12s, color 0.12s;
}
.qual-icon-btn:hover { background: rgba(0,0,0,0.08); color: #374151; }
.qual-icon-btn.danger:hover { background: #fee2e2; color: #ef4444; }

/* 二级目录 */
.qual-cat-items {
  padding-left: 36px;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.qual-cat.collapsed .qual-cat-items { max-height: 0 !important; }

.qual-item {
  display: flex;
  align-items: center;
  padding: 7px 16px 7px 8px;
  cursor: pointer;
  border-radius: 7px;
  margin: 1px 8px;
  transition: background 0.12s;
  position: relative;
}
.qual-item:hover { background: rgba(0, 0, 0, 0.04); }
.qual-item.active { background: rgba(0, 0, 0, 0.06); }
.qual-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: #1f2937;
  border-radius: 2px;
}

.qual-item-order {
  display: none;
}

.qual-item-title {
  flex: 1;
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qual-item.active .qual-item-title { color: #111827; font-weight: 500; }

.qual-item-actions {
  display: flex;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.qual-item:hover .qual-item-actions { opacity: 1; }

/* 拖拽占位符 */
.qual-item.drag-over { border-top: 2px solid #1f2937; }
.qual-cat.drag-over { background: rgba(0, 0, 0, 0.04); }

/* ── 玻璃拟态右侧内容区 ── */
.qual-content {
  flex: 1;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.qual-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #9ca3af;
  font-size: 14px;
}

.qual-content-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.qual-content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.qual-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.qual-item-title-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.qual-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qual-mode-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.qual-mode-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  cursor: pointer;
  transition: all 0.15s;
}
.qual-mode-btn.active {
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.qual-mode-btn:hover:not(.active) { color: #374151; }

/* 预览模式 */
.qual-preview-mode {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.qual-preview-text {
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 20px;
  min-height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.qual-preview-text h3 { font-size: 16px; margin: 0 0 10px; }
.qual-preview-text h4 { font-size: 15px; margin: 0 0 8px; }
.qual-preview-text h5 { font-size: 14px; margin: 0 0 6px; }
.qual-preview-text p { margin: 0 0 10px; }
.qual-preview-text ul, .qual-preview-text ol { padding-left: 22px; margin: 0 0 10px; }
.qual-preview-text li { margin-bottom: 4px; }
.qual-preview-text:empty::before {
  content: '暂无文字内容';
  color: #d1d5db;
  font-style: italic;
}

.qual-preview-files { margin-top: 20px; }

.qual-files-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qual-files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 12px;
}

/* 隐藏旧的横向文件卡片样式（已由 qual-file-card-doc / qual-file-card-img 替代） */
.qual-file-card:not(.qual-file-card-doc):not(.qual-file-card-img) {
  display: none !important;
}

.qual-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}
.qual-file-icon.pdf { background: #fef2f2; color: #ef4444; }
.qual-file-icon.doc { background: #eff6ff; color: #3b82f6; }
.qual-file-icon.xls { background: #f0fdf4; color: #10b981; }
.qual-file-icon.img { background: rgba(234,179,8,0.85); color: #fff; }
.qual-file-icon.ppt { background: #fff7ed; color: #ea580c; }
.qual-file-icon.txt { background: #f5f5f5; color: #525252; }
.qual-file-icon.zip { background: #faf5ff; color: #7c3aed; }
.qual-file-icon.other { background: #f9fafb; color: #6b7280; }

.qual-file-info { flex: 1; min-width: 0; }
.qual-file-name {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qual-file-size { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.qual-file-download {
  color: #9ca3af;
  transition: color 0.12s;
}
.qual-file-card:hover .qual-file-download { color: #374151; }

/* 编辑模式 */
.qual-edit-mode {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.qual-edit-section {
  margin-bottom: 20px;
}

.qual-edit-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.qual-rich-editor-wrap {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.15s;
}
.qual-rich-editor-wrap:focus-within { border-color: rgba(0, 0, 0, 0.3); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04); }

.qual-rich-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.4);
}

.qual-rich-toolbar button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}
.qual-rich-toolbar button:hover { background: rgba(0,0,0,0.07); }
.qual-rich-toolbar button:active { background: rgba(0,0,0,0.12); }

.qual-rtb-sep {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
  margin: 0 3px;
}

.qual-heading-select {
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.qual-rich-editor {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  outline: none;
}
.qual-rich-editor h3 { font-size: 16px; margin: 0 0 10px; }
.qual-rich-editor h4 { font-size: 15px; margin: 0 0 8px; }
.qual-rich-editor h5 { font-size: 14px; margin: 0 0 6px; }
.qual-rich-editor p { margin: 0 0 10px; }
.qual-rich-editor ul, .qual-rich-editor ol { padding-left: 22px; margin: 0 0 10px; }
.qual-rich-editor li { margin-bottom: 4px; }

/* 文件上传区 */
.qual-files-upload-area {
  margin-bottom: 10px;
}

.qual-upload-drop-zone {
  cursor: pointer;
  position: relative;
}
.qual-upload-drop-zone.qual-upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
  text-align: center;
}
.qual-upload-drop-zone.qual-upload-empty:hover,
.qual-upload-drop-zone.dragover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}
.qual-upload-drop-zone p { margin: 8px 0 4px; font-size: 13px; color: #6b7280; }
.qual-upload-drop-zone span { font-size: 11px; color: #9ca3af; }
.qual-upload-link { color: #374151; font-weight: 600; cursor: pointer; }
.qual-upload-link:hover { text-decoration: underline; }
.qual-upload-hint { font-size: 12px; color: #9ca3af; margin-left: 6px; }

/* 编辑模式文件列表 - 卡片网格样式 */
.qual-edit-files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  gap: 8px;
}

/* 隐藏旧样式，兼容已有类名 */
.qual-edit-file-item {
  display: contents;
}
.qual-edit-file-info {
  display: none;
}

/* 文件卡片删除按钮 */
.qual-file-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.qual-file-card:hover .qual-file-delete-btn {
  opacity: 1;
}
.qual-file-delete-btn:hover {
  background: rgba(239, 68, 68, 0.85);
}
.qual-edit-file-size { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.qual-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.qual-save-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.qual-save-btn:hover { background: #111827; }
.qual-save-btn:active { transform: scale(0.97); }

.qual-cancel-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #6b7280;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.qual-cancel-btn:hover { border-color: rgba(0, 0, 0, 0.2); color: #374151; }

/* 新增/编辑目录/节点弹窗 */
.qual-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qual-modal {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 18px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.8);
}
.qual-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}
.qual-modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 16px;
  box-sizing: border-box;
  background: rgba(255,255,255,0.7);
}
.qual-modal-input:focus { border-color: rgba(0,0,0,0.4); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.qual-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.qual-modal-cancel {
  padding: 9px 20px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}
.qual-modal-cancel:hover { border-color: rgba(0,0,0,0.2); color: #374151; }
.qual-modal-confirm {
  padding: 9px 20px;
  border: none;
  border-radius: 10px;
  background: #1f2937;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.qual-modal-confirm:hover { background: #111827; }

/* 节点为空状态 */
.qual-no-files {
  text-align: center;
  padding: 16px;
  color: #d1d5db;
  font-size: 12px;
}

/* 图片缩略图（已由下方 .qual-file-card-img 替代，保留兼容） */
.qual-file-img-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.qual-file-img-actions {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.55);
  border-radius: 6px;
  padding: 4px 6px;
}
.qual-file-img-actions button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qual-file-img-actions button:hover {
  background: rgba(0,0,0,0.9);
}
.qual-file-card-img:hover .qual-file-img-overlay { opacity: 1; }
.qual-file-img-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0 0 14px 14px;
}

/* 编辑区图片缩略图 */
.qual-edit-file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

/* 图片灯箱 */
.qual-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

/* 顶部关闭栏 */
.qual-lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.qual-lightbox-close-x {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s;
}
.qual-lightbox-close-x:hover { background: rgba(255, 255, 255, 0.25); }

.qual-lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  margin: 56px auto;
}

.qual-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.qual-lightbox-close:hover { background: rgba(255,255,255,0.25); }

.qual-lightbox-toolbar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  padding: 8px 12px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.qual-lightbox-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.qual-lightbox-btn:hover { background: rgba(255,255,255,0.28); }
.qual-lightbox-delete-btn { background: rgba(239,68,68,0.6) !important; border-color: rgba(239,68,68,0.8) !important; }
.qual-lightbox-delete-btn:hover { background: rgba(239,68,68,0.8) !important; }

.qual-lightbox-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  color: #fff;
}
.qual-lightbox-close-btn:hover { background: rgba(255,255,255,0.25); }

/* 文件灯箱（非图片） */
.qual-lightbox-file-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 40px 60px;
}
.qual-lightbox-file-icon-box { }
.qual-lightbox-file-icon {
  width: 80px !important;
  height: 80px !important;
  font-size: 24px !important;
  border-radius: 16px !important;
}
.qual-lightbox-file-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  word-break: break-all;
  max-width: 400px;
}

/* 文件卡片改为卡片样式 */
.qual-files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 12px;
}

.qual-file-card-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.qual-file-card-doc:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.qual-file-card-doc:hover .qual-file-doc-overlay { opacity: 1; }

.qual-file-doc-icon-wrap {
  margin-bottom: 4px;
}
.qual-file-doc-icon-wrap .qual-file-icon {
  width: 36px;
  height: 40px;
  font-size: 10px;
  border-radius: 8px;
}

.qual-file-doc-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity 0.15s;
  color: #374151;
}

.qual-file-doc-name {
  font-size: 12px;
  color: #374151;
  text-align: center;
  word-break: break-all;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.qual-file-doc-size {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* 图片文件卡片 */
.qual-file-card-img {
  position: relative;
  height: 100px;
  width: 100px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  background: #f9fafb;
  padding: 0;
  display: flex;
  flex-shrink: 0;
}
.qual-file-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.qual-file-card-img .file-card-overlay {
  top: 3px;
  right: 3px;
}

/* ===== 活动弹窗：skeleton 缩略图 + 图片懒加载淡入 ===== */
.skeleton-thumb {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  background: #eef0f3;
  position: relative;
  overflow: hidden;
}
.skeleton-thumb .skeleton-img {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #eef0f3 0%, #f6f7f9 50%, #eef0f3 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-thumb .skeleton-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 14px;
  border-radius: 4px;
  background: rgba(220, 224, 230, 0.6);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.act-photo-thumbs img.file-card-img,
.act-signin-thumbs img.file-card-img,
.act-plan-thumbs img.file-card-img {
  opacity: 0;
  transition: opacity 0.25s ease;
  background: #eef0f3;
}
.act-photo-thumbs img.file-card-img.loaded,
.act-signin-thumbs img.file-card-img.loaded,
.act-plan-thumbs img.file-card-img.loaded {
  opacity: 1;
}

/* ===== 活动弹窗：保存中锁定 ===== */
#activity-modal.act-saving {
  pointer-events: none;
}
#activity-modal.act-saving .act-modal-box {
  pointer-events: auto;
  position: relative;
}

/* ─── Unified non-image file icons: B / 精细描边 ─────────────────────────── */
.ext-icon {
  --file-tone: #64748b;
  --file-tint: #f8fafc;
  position: relative;
  display: grid !important;
  place-items: center;
  width: 48px;
  height: 54px;
  flex: 0 0 auto;
  color: var(--text-primary);
  transition: transform 0.16s ease;
}

.file-icon > .ext-icon {
  width: 100%;
  height: 100%;
}

.file-card-file > .ext-icon {
  width: 48px;
  height: 54px;
}

.ext-icon .file-shape {
  position: absolute;
  inset: 3px 5px;
  width: auto !important;
  height: auto !important;
  border: 1.5px solid var(--file-tone);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.09);
  clip-path: polygon(0 0, 68% 0, 100% 25%, 100% 100%, 0 100%);
  overflow: hidden;
}

.ext-icon .file-shape::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  left: auto;
  width: 13px;
  height: 13px;
  background: var(--file-tint);
  border-left: 1.5px solid var(--file-tone);
  border-bottom: 1.5px solid var(--file-tone);
  box-shadow: none;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.ext-icon::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 13px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--file-tone);
}

.ext-icon .file-tag,
.file-icon .ext-icon .file-tag,
.file-card-file .ext-icon .file-tag {
  position: relative;
  z-index: 3;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  min-width: 28px;
  max-width: 40px;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--file-tone) 32%, #dbe2ea);
  border-radius: 5px;
  background: var(--file-tint);
}

.ext-icon .file-tag span,
.file-icon .ext-icon .file-tag span,
.file-card-file .ext-icon .file-tag span {
  display: block;
  margin: 0;
  padding: 0;
  max-width: none;
  overflow: visible;
  color: #1f2937;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  text-shadow: none;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.file-card-file > span {
  color: var(--text-primary);
}

.ext-icon.pdf      { --file-tone: #e5484d; --file-tint: #fff1f2; }
.ext-icon.doc      { --file-tone: #3b82f6; --file-tint: #eff6ff; }
.ext-icon.docx     { --file-tone: #2563eb; --file-tint: #eef4ff; }
.ext-icon.wps      { --file-tone: #cf4454; --file-tint: #fff1f2; }
.ext-icon.xls      { --file-tone: #15803d; --file-tint: #f0fdf4; }
.ext-icon.xlsx     { --file-tone: #16a34a; --file-tint: #ecfdf3; }
.ext-icon.et       { --file-tone: #0f766e; --file-tint: #f0fdfa; }
.ext-icon.ppt      { --file-tone: #ea580c; --file-tint: #fff7ed; }
.ext-icon.pptx     { --file-tone: #f97316; --file-tint: #fff7ed; }
.ext-icon.txt      { --file-tone: #64748b; --file-tint: #f8fafc; }
.ext-icon.zip      { --file-tone: #7c3aed; --file-tint: #faf5ff; }
.ext-icon.rar      { --file-tone: #6366f1; --file-tint: #eef2ff; }
.ext-icon.sevenzip { --file-tone: #b7791f; --file-tint: #fffbeb; }
.ext-icon.other    { --file-tone: #64748b; --file-tint: #f8fafc; }

.file-card-thumb-wrap:hover .ext-icon,
.mentor-file-card:hover .ext-icon,
.file-row:hover .ext-icon,
.qual-file-card-doc:hover .ext-icon {
  transform: translateY(-1px);
}

.file-card-icon-wrap > .ext-icon {
  width: 40px;
  height: 46px;
}

.qual-file-doc-icon-wrap > .ext-icon {
  width: 36px;
  height: 40px;
}

.qual-file-doc-icon-wrap > .ext-icon .file-tag,
.file-card-icon-wrap > .ext-icon .file-tag {
  min-width: 24px;
  padding: 2px 3px;
}

.qual-file-doc-icon-wrap > .ext-icon .file-tag span,
.file-card-icon-wrap > .ext-icon .file-tag span {
  font-size: 6.5px;
}

.qual-lightbox-file-icon {
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.qual-lightbox-file-icon > .ext-icon {
  width: 80px;
  height: 90px;
}

.qual-lightbox-file-icon > .ext-icon::after {
  left: 8px;
  top: 21px;
  bottom: 18px;
  width: 5px;
}

.qual-lightbox-file-icon > .ext-icon .file-tag {
  min-width: 46px;
  max-width: 62px;
  padding: 6px 8px;
  border-radius: 8px;
}

.qual-lightbox-file-icon > .ext-icon .file-tag span {
  font-size: 12px;
}
#activity-modal.act-saving .act-modal-bd {
  opacity: 0.6;
  pointer-events: none;
}
#activity-modal.act-saving .act-modal-ft {
  pointer-events: auto;
}
#activity-modal.act-saving .act-modal-ft .act-btn-cancel {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
#activity-modal.act-saving .act-btn-save {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
/* 保存按钮内置 spinner —— 任何带 .is-saving 的按钮都会显示 */
.btn-saving-spin::before,
.act-btn-save.is-saving::before,
#detail-save-btn.is-saving::before,
#modal-submit.is-saving::before,
#mentor-modal-submit.is-saving::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpinnerSpin 0.8s linear infinite;
}
@keyframes btnSpinnerSpin {
  to { transform: rotate(360deg); }
}

/* 保存按钮 disabled 时的通用灰态 */
#mentor-modal-submit:disabled,
#modal-submit:disabled,
#detail-save-btn:disabled,
.act-btn-save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
  pointer-events: none;
}
#activity-modal.act-saving .act-modal-hd .act-modal-x {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
#activity-modal.act-saving .act-modal-overlay-mask {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 5;
  border-radius: 22px;
}

/* ===== 全局保存锁：保存中禁止滚动和点击，视觉反馈交给按钮 disabled + 文字 ===== */
body.save-in-progress {
  overflow: hidden !important;
  touch-action: none;
}
body.save-in-progress * {
  pointer-events: none !important;
}
body.save-in-progress .toast-container,
body.save-in-progress .toast,
body.save-in-progress .toast * {
  pointer-events: auto !important;
}
body.save-in-progress input,
body.save-in-progress textarea,
body.save-in-progress select,
body.save-in-progress button {
  user-select: none !important;
}
