/* ============================================================
 * 咨询师匹配 · 样式（企微工作台风格）
 * ============================================================ */

:root {
  --c-primary: #07c160;
  --c-primary-dark: #06a050;
  --c-primary-light: #dcfce7;
  --c-blue: #3b82f6;
  --c-blue-light: #dbeafe;
  --c-orange: #f59e0b;
  --c-orange-light: #fef3c7;
  --c-red: #ef4444;
  --c-red-light: #fee2e2;

  --c-bg: #f7f7f7;
  --c-card: #ffffff;
  --c-border: #e2e8f0;
  --c-text-dark: #0f172a;
  --c-text-mute: #475569;
  --c-text-subtle: #94a3b8;
  --c-text-light: #cbd5e1;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--c-text-dark);
  background: var(--c-bg);
  min-height: 100vh;
}

/* ============================================================
 * 顶栏
 * ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__logo {
  width: 40px; height: 40px;
  border-radius: var(--r-lg);
  background: var(--c-primary);
  color: var(--c-card);
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.topbar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-dark);
  line-height: 1.2;
}
.topbar__title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--c-text-mute);
  margin-top: 2px;
}

.topbar__spacer { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-card);
  white-space: nowrap;
}
.chip--user { background: var(--c-primary); }
.chip--clinic { background: var(--c-blue); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn--ghost {
  background: transparent;
  border-color: var(--c-border);
  color: var(--c-text-mute);
}
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-card);
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: var(--c-card);
}
.btn--primary:disabled {
  background: #d1d5db;
  border-color: #d1d5db;
  color: var(--c-card);
  cursor: not-allowed;
}
.btn--xl {
  padding: 18px 36px;
  font-size: 16px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
}

/* ============================================================
 * 主页面布局
 * ============================================================ */
.page {
  max-width: 1640px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.page--center {
  display: grid;
  place-items: center;
  min-height: 80vh;
}

.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.filter-field span {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-mute);
}
.filter-field input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-card);
  color: var(--c-text-dark);
  font: inherit;
}
.filter-field input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12);
}

.columns {
  display: grid;
  grid-template-columns: 1fr 240px 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: calc(100vh - 180px);
}

/* ============================================================
 * 卡片列（左右两栏）
 * ============================================================ */
.col {
  background: var(--c-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.col__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  background: #fbfcfd;
}
.col__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.col__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
}
.col__hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--c-text-subtle);
}

.col__body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
}

/* ============================================================
 * 列表卡片
 * ============================================================ */
.item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.item:hover {
  border-color: var(--c-primary);
  background: #fafffd;
}
.item--selected {
  border-color: var(--c-primary);
  border-width: 2px;
  background: var(--c-primary-light);
  padding: 11px 13px;
}

.item__radio {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: var(--c-card);
  margin-top: 2px;
  position: relative;
}
.item--selected .item__radio {
  border-color: var(--c-primary);
}
.item--selected .item__radio::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
}

.item__body { flex: 1; min-width: 0; }
.item__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.item__sub {
  font-size: 12px;
  color: var(--c-text-mute);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.item__doctor {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 9px;
  background: var(--c-blue-light);
  color: var(--c-blue);
  font-size: 11px;
  font-weight: 600;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--c-text-subtle);
  font-size: 13px;
}

/* ============================================================
 * 中间确认按钮区
 * ============================================================ */
.middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 80px;
}
.middle__hint {
  font-size: 11px;
  color: var(--c-text-subtle);
}
.middle__sub {
  font-size: 11px;
  color: var(--c-text-subtle);
  margin-top: 4px;
}

/* ============================================================
 * 底部 footer
 * ============================================================ */
.footer {
  margin-top: 24px;
  padding: 14px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--c-text-mute);
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer__sep { color: var(--c-text-light); }
.footer__muted { color: var(--c-text-subtle); font-size: 11px; }

/* ============================================================
 * Toast
 * ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--c-card);
  font-size: 13px;
  font-weight: 600;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast--err {
  background: var(--c-red);
}
.toast--ok {
  background: var(--c-primary);
}

/* ============================================================
 * 403 提示页
 * ============================================================ */
.card-403 {
  max-width: 520px;
  padding: 40px;
  background: var(--c-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.card-403__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--c-red-light);
  color: var(--c-red);
  font-size: 36px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.card-403__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text-dark);
  margin: 0 0 12px;
}
.card-403__msg {
  font-size: 14px;
  color: var(--c-text-mute);
  margin: 8px 0;
}
.card-403__hint {
  font-size: 12px;
  color: var(--c-text-subtle);
  margin: 6px 0;
}
.card-403__hint code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Menlo', monospace;
  color: var(--c-text-dark);
}

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 1200px) {
  .columns {
    grid-template-columns: 1fr 180px 1fr;
  }
}
@media (max-width: 900px) {
  .filters {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .filter-field {
    flex: 1 1 140px;
  }
  .columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .middle { padding-top: 0; }
}
