/* ============================================================
   智慧星高报 — 智能选志愿 Quark 对标设计 v3
   设计参考：夸克高考 zhiyuan-recommend
   Token: #0D53FF (Primary Blue), #FF594D (Rush Red), 
          #060A26 (Title), #222 (Body), #999 (Meta)
   ============================================================ */

/* ===== CSS 变量 ===== */
:root {
  --rec-primary: #0D53FF;
  --rec-primary-light: rgba(13, 83, 255, 0.06);
  --rec-rush: #FF594D;
  --rec-rush-bg: rgba(255, 89, 77, 0.08);
  --rec-stable: #FF7A00;
  --rec-stable-bg: rgba(255, 122, 0, 0.08);
  --rec-safe: #00B42A;
  --rec-safe-bg: rgba(0, 180, 42, 0.08);
  --rec-hard: #94A3B8;
  --rec-hard-bg: rgba(148, 163, 184, 0.08);
  --rec-title: #060A26;
  --rec-body: #222222;
  --rec-meta: #999999;
  --rec-border: #EEF0F4;
  --rec-bg: #FFFFFF;
  --rec-shadow: 0 1px 3px rgba(0,0,0,0.04);
  --rec-radius-sm: 6px;
  --rec-radius-md: 8px;
  --rec-radius-lg: 12px;
}

/* ===== 容器 ===== */
.rec-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ===== 顶部信息栏 ===== */
.rec-top-bar {
  background: #fff;
  border-radius: var(--rec-radius-lg);
  padding: 14px 24px;
  box-shadow: var(--rec-shadow);
  margin-bottom: 16px;
}
.rec-top-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.rec-top-label {
  font-size: 13px;
  color: var(--rec-meta);
  padding: 2px 12px;
}
.rec-top-label strong {
  color: var(--rec-title);
  font-weight: 700;
  font-size: 14px;
}
.rec-top-sep {
  color: #E5E7EB;
}
.rec-btn-edit {
  margin-left: auto;
  padding: 5px 16px;
  border: 1px solid #D1D5DB;
  border-radius: var(--rec-radius-sm);
  background: #fff;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-btn-edit:hover {
  border-color: var(--rec-primary);
  color: var(--rec-primary);
  background: var(--rec-primary-light);
}
.rec-data-update {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  background: #FFF7E6;
  border-radius: var(--rec-radius-sm);
  font-size: 12px;
  color: #D48806;
}

/* ===== 标题行 + 模式切换 + 搜索 ===== */
.rec-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.rec-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--rec-title);
  margin: 0;
  white-space: nowrap;
  background: linear-gradient(135deg, #0D53FF, #6366F1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 模式Tab — 夸克风格 switcher */
.rec-mode-tabs {
  display: flex;
  gap: 0;
  background: #F1F5F9;
  border-radius: var(--rec-radius-md);
  padding: 3px;
  flex-shrink: 0;
}
.rec-mode-tab {
  padding: 6px 18px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.rec-mode-tab.active {
  background: #fff;
  color: var(--rec-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.rec-mode-tab:hover:not(.active) {
  color: var(--rec-primary);
}

/* 右侧：批次 + 搜索 */
.rec-title-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-batch-select select {
  padding: 7px 32px 7px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23999'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 100px;
}
.rec-search-box {
  position: relative;
  width: 220px;
}
.rec-search-box input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  background: #F9FAFB;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: all 0.2s;
}
.rec-search-box input:focus {
  border-color: var(--rec-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 83, 255, 0.08);
}
.rec-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

/* ===== 统计标签栏 — Quark Tab 风格 ===== */
.rec-stats-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: #fff;
  border-radius: var(--rec-radius-md);
  overflow: hidden;
  box-shadow: var(--rec-shadow);
}
.rec-stat-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-width: 0;
}
.rec-stat-chip::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  background: transparent;
  border-radius: 3px 3px 0 0;
  transition: all 0.2s;
}
.rec-stat-chip:hover {
  background: #FAFBFC;
}
.rec-stat-chip.active {
  background: #fff;
}
.rec-stat-chip.active::after {
  background: var(--rec-primary);
}
.rec-stat-chip.rec-stat-rush.active::after { background: var(--rec-rush); }
.rec-stat-chip.rec-stat-stable.active::after { background: var(--rec-stable); }
.rec-stat-chip.rec-stat-safe.active::after { background: var(--rec-safe); }
.rec-stat-chip.rec-stat-hard.active::after { background: var(--rec-hard); }
.rec-stat-chip.rec-stat-all.active::after { background: var(--rec-title); }

.rec-stat-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.2s;
}
.rec-stat-label {
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s;
}

/* 颜色 */
.rec-stat-chip.rec-stat-rush .rec-stat-num { color: var(--rec-rush); }
.rec-stat-chip.rec-stat-rush .rec-stat-label { color: #999; }
.rec-stat-chip.rec-stat-rush.active .rec-stat-label { color: var(--rec-rush); }

.rec-stat-chip.rec-stat-stable .rec-stat-num { color: var(--rec-stable); }
.rec-stat-chip.rec-stat-stable .rec-stat-label { color: #999; }
.rec-stat-chip.rec-stat-stable.active .rec-stat-label { color: var(--rec-stable); }

.rec-stat-chip.rec-stat-safe .rec-stat-num { color: var(--rec-safe); }
.rec-stat-chip.rec-stat-safe .rec-stat-label { color: #999; }
.rec-stat-chip.rec-stat-safe.active .rec-stat-label { color: var(--rec-safe); }

.rec-stat-chip.rec-stat-hard .rec-stat-num { color: var(--rec-hard); }
.rec-stat-chip.rec-stat-hard .rec-stat-label { color: #999; }
.rec-stat-chip.rec-stat-hard.active .rec-stat-label { color: #555; }

.rec-stat-chip.rec-stat-all .rec-stat-num { color: var(--rec-title); }
.rec-stat-chip.rec-stat-all .rec-stat-label { color: #999; }
.rec-stat-chip.rec-stat-all.active .rec-stat-label { color: var(--rec-title); }

/* ===== 筛选栏 — 夸克 Pill 风格 ===== */
.rec-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rec-filter-item {
  flex-shrink: 0;
}
.rec-filter-select {
  padding: 7px 30px 7px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23999'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.2s;
}
.rec-filter-select:hover {
  border-color: #D1D5DB;
}
.rec-filter-select:focus {
  outline: none;
  border-color: var(--rec-primary);
  box-shadow: 0 0 0 3px rgba(13, 83, 255, 0.08);
}
.rec-btn-reset {
  padding: 7px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  background: #fff;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-btn-reset:hover {
  border-color: var(--rec-primary);
  color: var(--rec-primary);
}

/* ===== 空状态 ===== */
.rec-empty {
  text-align: center;
  padding: 80px 20px;
}
.rec-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.rec-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--rec-title);
  margin: 0 0 8px;
}
.rec-empty-desc {
  font-size: 14px;
  color: var(--rec-meta);
  margin: 0 0 24px;
  line-height: 1.5;
}
.rec-empty-btn {
  padding: 10px 32px;
  border: 1px solid var(--rec-primary);
  border-radius: 24px;
  background: #fff;
  color: var(--rec-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-empty-btn:hover {
  background: var(--rec-primary-light);
}

/* ================================================================
   院校卡片 — Quark major-item 对标设计
   ================================================================ */
.rec-school-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #EEF0F4;
  border-radius: var(--rec-radius-lg);
  overflow: hidden;
}

/* 卡片容器 */
.rec-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 18px 0;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.rec-card:hover {
  background: #FAFBFC;
}
.rec-card.selected {
  background: #F8FAFF;
}
.rec-card + .rec-card {
  border-top: 1px solid #EEF0F4;
}

/* ===== 左侧：概率徽章（夸克风格：竖排，40×52px） ===== */
.rec-card-prob {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  flex-shrink: 0;
  padding: 0 10px;
}
.rec-prob-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  border-radius: 8px;
  line-height: 1.1;
}
.rec-prob-num {
  font-size: 18px;
  font-weight: 800;
}
.rec-prob-word {
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

/* 概率颜色 */
.rec-prob-rush {
  background: var(--rec-rush-bg);
  border: 1px solid rgba(255, 89, 77, 0.2);
}
.rec-prob-rush .rec-prob-num { color: var(--rec-rush); }
.rec-prob-rush .rec-prob-word { color: var(--rec-rush); }

.rec-prob-stable {
  background: var(--rec-stable-bg);
  border: 1px solid rgba(255, 122, 0, 0.2);
}
.rec-prob-stable .rec-prob-num { color: var(--rec-stable); }
.rec-prob-stable .rec-prob-word { color: var(--rec-stable); }

.rec-prob-safe {
  background: var(--rec-safe-bg);
  border: 1px solid rgba(0, 180, 42, 0.2);
}
.rec-prob-safe .rec-prob-num { color: var(--rec-safe); }
.rec-prob-safe .rec-prob-word { color: var(--rec-safe); }

.rec-prob-hard {
  background: var(--rec-hard-bg);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.rec-prob-hard .rec-prob-num { color: var(--rec-hard); }
.rec-prob-hard .rec-prob-word { color: var(--rec-hard); }

/* ===== 卡片主体内容区 ===== */
.rec-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 20px;
}

/* 院校头部行：Logo + 院校名+标签 + 操作按钮 */
.rec-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rec-card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

/* Logo */
.rec-card-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
}
.rec-card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.rec-card-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--rec-primary);
}

/* 院校名 + 标签行 */
.rec-card-title-group {
  min-width: 0;
}
.rec-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rec-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--rec-title);
  cursor: pointer;
  white-space: nowrap;
}
.rec-card-name:hover {
  color: var(--rec-primary);
}

/* 标签 */
.rec-card-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.rec-tag-level {
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
}
.rec-tag-l-985 { background: #FEF3C7; color: #92400E; }
.rec-tag-l-211 { background: #DBEAFE; color: #1E40AF; }
.rec-tag-l-double, .rec-tag-l-dsyl { background: #F3E8FF; color: #6B21A8; }
.rec-tag-l-szdy { background: #E0F2FE; color: #0369A1; }

/* 院校元信息（代码/类型/性质） */
.rec-card-meta {
  font-size: 12px;
  color: var(--rec-meta);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-meta-sep {
  color: #DDD;
  margin: 0 6px;
}

/* 卡片操作按钮 — 夸克风格 "可报专业组 N" */
.rec-card-action {
  flex-shrink: 0;
}
.rec-btn-major-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.rec-btn-major-group:hover {
  border-color: var(--rec-primary);
  color: var(--rec-primary);
  background: var(--rec-primary-light);
}
.rec-mg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #F1F5F9;
  color: #666;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
}
.rec-btn-major-group:hover .rec-mg-count {
  background: var(--rec-primary-light);
  color: var(--rec-primary);
}

/* ===== 专业信息行 ===== */
.rec-card-major {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rec-major-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--rec-body);
}
.rec-major-remark {
  font-size: 12px;
  color: var(--rec-meta);
  font-weight: 400;
}
.rec-major-code {
  font-size: 11px;
  color: var(--rec-meta);
  background: #F5F6FA;
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 6px;
}

/* ===== 数据行（夸克单行4列布局） ===== */
.rec-card-data-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.rec-data-item {
  font-size: 12px;
  color: var(--rec-meta);
}
.rec-data-item strong {
  color: var(--rec-body);
  font-weight: 600;
}
.rec-data-score {
  color: #D48806 !important;
}
.rec-data-rank {
  color: var(--rec-primary) !important;
}
.rec-data-sep {
  width: 1px;
  height: 14px;
  background: #E5E7EB;
  margin: 0 10px;
}

/* ===== 成绩高亮行 ===== */
.rec-card-score-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rec-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.rec-score-pill-score {
  background: #FFF7E6;
  color: #D48806;
}
.rec-score-pill-rank {
  background: #F0F5FF;
  color: var(--rec-primary);
}

/* 已填专业组提示 */
.rec-filled-hint {
  font-size: 11px;
  color: var(--rec-meta);
  margin-top: 2px;
}
.rec-filled-hint a {
  color: var(--rec-primary);
  text-decoration: none;
}
.rec-filled-hint a:hover {
  text-decoration: underline;
}

/* ===== 卡片选中勾 ===== */
.rec-card-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  border: 2px solid #D1D5DB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  transition: all 0.2s;
  background: #fff;
}
.rec-card.selected .rec-card-check {
  background: var(--rec-primary);
  border-color: var(--rec-primary);
}

/* ===== 底部操作栏 ===== */
.rec-bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-top: 1px solid #F0F0F0;
  border-radius: 12px 12px 0 0;
  z-index: 10;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  margin-top: 16px;
}
.rec-bottom-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.rec-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rec-primary);
}
.rec-selected-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rec-primary);
  font-size: 14px;
  font-weight: 500;
}
.rec-selected-info strong {
  font-size: 20px;
  font-weight: 700;
}
.rec-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: 1px solid #D1D5DB;
  border-radius: 24px;
  background: #fff;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-btn-export:hover {
  border-color: var(--rec-primary);
  color: var(--rec-primary);
}
.rec-btn-report {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--rec-primary), #6366F1);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(13, 83, 255, 0.3);
}
.rec-btn-report:hover {
  background: linear-gradient(135deg, #0A43D6, #4F46E5);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(13, 83, 255, 0.4);
}
.rec-btn-report:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== 加载骨架屏 ===== */
.rec-skeleton {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 18px 0;
  background: #fff;
}
.rec-skeleton + .rec-skeleton {
  border-top: 1px solid #EEF0F4;
}
.rec-skel-badge {
  width: 68px;
  display: flex;
  justify-content: center;
  padding: 0 10px;
}
.rec-skel-badge-inner {
  width: 48px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: rec-shimmer 1.5s infinite;
}
.rec-skel-body {
  flex: 1;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-skel-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: rec-shimmer 1.5s infinite;
}
.rec-skel-line:nth-child(1) { width: 35%; height: 18px; }
.rec-skel-line:nth-child(2) { width: 55%; }
.rec-skel-line:nth-child(3) { width: 80%; }

@keyframes rec-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .rec-container {
    padding: 0 0 80px;
  }
  .rec-top-bar {
    padding: 12px 16px;
    border-radius: 0;
  }
  .rec-title-row {
    flex-wrap: wrap;
  }
  .rec-title-right {
    margin-left: 0;
    width: 100%;
  }
  .rec-search-box {
    width: 100%;
  }
  .rec-stats-bar {
    overflow-x: auto;
  }
  .rec-stat-chip {
    padding: 10px 12px;
    min-width: 64px;
  }
  .rec-stat-num {
    font-size: 18px;
  }
  .rec-card-prob {
    width: 56px;
    padding: 0 8px;
  }
  .rec-prob-badge {
    width: 40px;
    height: 44px;
  }
  .rec-prob-num {
    font-size: 15px;
  }
  .rec-prob-word {
    font-size: 10px;
  }
  .rec-card-body {
    padding-right: 12px;
  }
  .rec-card-data-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .rec-data-group {
    flex-wrap: wrap;
    gap: 10px;
  }
  .rec-bottom-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }
  .rec-bottom-left,
  .rec-bottom-right {
    width: 100%;
    justify-content: center;
  }
  .rec-btn-report {
    width: 100%;
    justify-content: center;
  }
}
