/* ============================================================
   智慧星高报 — 导航与子页面样式
   设计规范：智慧星高报高考志愿填报平台
   ============================================================ */

/* ------------------------------------------------------------
   CSS Variables / Design Tokens
   ------------------------------------------------------------ */
:root {
  /* Primary Blue */
  --blue-primary: #2B6FF2;
  --blue-light: #4F8AF7;
  --blue-dark: #1a5cd8;
  --blue-50: #eef3fe;
  --blue-100: #d6e4fd;
  --blue-200: #b0cafb;

  /* Status Colors */
  --rush-red: #FF4D4F;
  --rush-red-bg: #fff1f0;
  --stable-orange: #FA8C16;
  --stable-orange-bg: #fff7e6;
  --safe-green: #52C41A;
  --safe-green-bg: #f6ffed;

  /* Neutrals */
  --bg-page: #f5f6fa;
  --bg-card: #ffffff;
  --bg-gray: #f0f2f5;
  --bg-hover: #e8eaef;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-placeholder: #bfbfbf;
  --border-color: #e8e8e8;
  --border-light: #f0f0f0;

  /* Spacing & Sizing */
  --max-width: 1320px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);

  /* Hero Gradient */
  --hero-gradient: linear-gradient(160deg, #5B9DF8 0%, #2B6FF2 40%, #1a5cd8 100%);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
}

/* ------------------------------------------------------------
   Global Reset & Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

select {
  font-family: inherit;
  font-size: inherit;
}

/* ------------------------------------------------------------
   Layout Container
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ------------------------------------------------------------
   Navigation (.quark-nav)
   ------------------------------------------------------------ */
.quark-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  transition: box-shadow var(--transition-base);
}

/* Box-shadow on scroll class (added via JS) */
.quark-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.quark-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Row 1: Logo + Search + Bind Info ---- */
.nav-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-primary);
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.85;
}

/* Search in top row - centered, large */
.nav-center {
  flex: 1;
  max-width: 520px;
  min-width: 200px;
}

.nav-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.nav-search-box:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(43,111,242,0.15);
}

.nav-search-box input {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--font-size-base);
  min-width: 0;
}

.nav-search-box input::placeholder {
  color: var(--text-placeholder);
}

.search-icon-right {
  flex-shrink: 0;
  margin-right: 14px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.search-icon-right:hover {
  color: var(--blue-primary);
}

/* Top right: bind info */
.nav-top-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-bind-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-bind-btn:hover {
  color: #2563EB;
  background: #EFF6FF;
  border-color: #BFDBFE;
  text-decoration: none;
}
.nav-bind-btn:active {
  transform: scale(0.97);
}

.nav-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
}

/* ---- Row 2: Navigation Links ---- */
.nav-links-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  border-top: 1px solid var(--border-light);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast),
              background var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-primary);
  background: var(--blue-50);
}

.nav-link svg,
.nav-link img {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

/* ------------------------------------------------------------
   Hero Section (.hero-wave)
   ------------------------------------------------------------ */
.hero-wave {
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.hero-wave-bg {
  background: var(--hero-gradient);
  position: relative;
  padding: 32px 0 50px;
}

/* Wave bottom shape */
.hero-wave-bg::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-page);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-wave-content,
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ---- Hero Main Content ---- */
.hero-main {
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Preference Bar */
.pref-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pref-select {
  flex: 1;
  min-width: 140px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

.pref-select:hover,
.pref-select:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  outline: none;
}

/* Hero Action Buttons */
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: var(--font-size-md);
  font-weight: 600;
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-hero-primary {
  background: var(--blue-primary);
  color: #ffffff;
  border: 2px solid var(--blue-primary);
}

.btn-hero-primary:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 111, 242, 0.4);
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Hero Stats Row */
.hero-stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* Stat color variants */
.stat-item.rush .stat-num { color: #FF8A80; }
.stat-item.stable .stat-num { color: #FFB74D; }
.stat-item.safe .stat-num { color: #81C784; }

/* ---- Hero Sidebar (Quick Access Icons) ---- */
.hero-sidebar {
  flex-shrink: 0;
  width: 280px;
}

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

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.quick-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-item svg,
.quick-item img {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
}

.quick-item span {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* ------------------------------------------------------------
   Dashboard Section (.dashboard)
   ------------------------------------------------------------ */
.quark-dashboard,
.dashboard {
  max-width: var(--max-width);
  margin: -20px auto 0;
  padding: 0 20px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dashboard Card */
.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: all var(--transition-base);
}

.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.dash-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--blue-primary);
  border-radius: 2px;
}

/* ---- 我的志愿表 (Volunteer Table) ---- */
.volunteer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.volunteer-table th {
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
}

.volunteer-table td {
  padding: 10px 8px;
  text-align: center;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.volunteer-table tr:hover td {
  background: var(--blue-50);
}

.volunteer-table .tag-rush {
  color: var(--rush-red);
  background: var(--rush-red-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  display: inline-block;
}

.volunteer-table .tag-stable {
  color: var(--stable-orange);
  background: var(--stable-orange-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  display: inline-block;
}

.volunteer-table .tag-safe {
  color: var(--safe-green);
  background: var(--safe-green-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  display: inline-block;
}

/* ---- 我的报告 (Report Card) ---- */
.report-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.report-card svg {
  width: 64px;
  height: 64px;
  color: var(--blue-primary);
  margin-bottom: 12px;
}

.report-card .report-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.report-card .report-desc {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.report-card .btn-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--blue-primary);
  color: #ffffff;
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.report-card .btn-report:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(43, 111, 242, 0.35);
}

/* ---- 招生信息 (News List) ---- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 8px;
}

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

.news-item:hover {
  color: var(--blue-primary);
  padding-left: 4px;
}

.news-item .news-text {
  flex: 1;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-item .news-date {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Bottom Panels Section (.bottom-panels)
   ------------------------------------------------------------ */
.bottom-panels {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- 高考真题 Section (.exam-section) ---- */
.exam-section {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.exam-section .section-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.exam-selectors {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.exam-selectors select {
  flex: 1;
  min-width: 100px;
  padding: 8px 32px 8px 12px;
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.exam-selectors select:hover {
  border-color: var(--blue-primary);
}

.exam-selectors select:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(43, 111, 242, 0.15);
  outline: none;
}

/* Subject Grid */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.subject-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.subject-item:hover {
  background: var(--blue-50);
  color: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(43, 111, 242, 0.15);
}

.subject-item.active {
  background: var(--blue-primary);
  color: #ffffff;
}

/* ---- 高考日历 Section (.calendar-section) ---- */
.calendar-section {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.calendar-section .section-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Calendar Tabs */
.cal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
}

.cal-tab {
  flex: 1;
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.cal-tab:hover {
  color: var(--text-primary);
}

.cal-tab.active {
  background: var(--bg-card);
  color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

/* Calendar Timeline */
.cal-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

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

.timeline-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--blue-primary);
  border-radius: 50%;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

.timeline-item:not(:last-child) .timeline-dot::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 4px;
  width: 2px;
  height: calc(100% + 6px);
  background: var(--border-color);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-content .tl-date {
  font-size: var(--font-size-xs);
  color: var(--blue-primary);
  font-weight: 600;
  margin-bottom: 3px;
}

.timeline-content .tl-title {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.timeline-content .tl-desc {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Footer Section
   ------------------------------------------------------------ */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 40px 20px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--blue-primary);
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col .footer-heading {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--blue-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* ------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------ */
.text-rush  { color: var(--rush-red); }
.text-stable { color: var(--stable-orange); }
.text-safe   { color: var(--safe-green); }
.text-blue   { color: var(--blue-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }

.bg-rush-bg   { background: var(--rush-red-bg); }
.bg-stable-bg { background: var(--stable-orange-bg); }
.bg-safe-bg   { background: var(--safe-green-bg); }

.font-bold  { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }

.text-xs  { font-size: var(--font-size-xs); }
.text-sm  { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md  { font-size: var(--font-size-md); }
.text-lg  { font-size: var(--font-size-lg); }
.text-xl  { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge / Tag Shared Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.badge-rush {
  color: var(--rush-red);
  background: var(--rush-red-bg);
}

.badge-stable {
  color: var(--stable-orange);
  background: var(--stable-orange-bg);
}

.badge-safe {
  color: var(--safe-green);
  background: var(--safe-green-bg);
}

/* Card hover effect (reusable) */
.card-hover {
  transition: all var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ------------------------------------------------------------
   Skeleton Loading Animation
   ------------------------------------------------------------ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-gray) 25%, #e8eaef 50%, var(--bg-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   Responsive Design
   ------------------------------------------------------------ */

/* ---- Tablet: <= 1024px ---- */
@media (max-width: 1024px) {
  .hero-wave-content,
  .hero-inner {
    flex-direction: column;
  }

  .hero-sidebar {
    width: 100%;
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-panels {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    gap: 24px;
  }
}

/* ---- Mobile: <= 768px ---- */
@media (max-width: 768px) {
  /* Navigation */
  .nav-top-row {
    height: 52px;
    gap: 12px;
  }

  .nav-logo {
    font-size: var(--font-size-md);
  }

  /* Hide center search on mobile */
  .nav-center {
    display: none;
  }

  .nav-links-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 2px;
    height: 44px;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: var(--font-size-sm);
  }

  /* Hero */
  .hero-wave-bg {
    padding: 32px 0 64px;
  }

  .hero-title {
    font-size: var(--font-size-xl);
  }

  .hero-sub {
    font-size: var(--font-size-sm);
    margin-bottom: 16px;
  }

  .pref-bar {
    flex-direction: column;
    gap: 8px;
  }

  .pref-select {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn-hero-primary,
  .btn-hero-outline {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    justify-content: space-around;
    gap: 12px;
  }

  .stat-num {
    font-size: var(--font-size-2xl);
  }

  /* Hide sidebar on mobile */
  .hero-sidebar {
    display: none;
  }

  /* Dashboard: stack to single column */
  .dashboard {
    grid-template-columns: 1fr;
    padding: 24px 16px 32px;
    gap: 16px;
  }

  .dash-card {
    padding: 18px;
  }

  .dash-title {
    font-size: var(--font-size-md);
  }

  /* Bottom panels */
  .bottom-panels {
    padding: 0 16px 40px;
  }

  .exam-section,
  .calendar-section {
    padding: 18px;
  }

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cal-tab {
    font-size: var(--font-size-xs);
    padding: 6px 10px;
  }

  /* Volunteer table: horizontal scroll */
  .volunteer-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .volunteer-table {
    min-width: 500px;
  }
}

/* ---- Small Mobile: <= 480px ---- */
@media (max-width: 480px) {
  :root {
    --max-width: 100%;
  }

  .hero-wave-bg {
    padding: 24px 0 56px;
  }

  .hero-title {
    font-size: var(--font-size-lg);
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-item {
    flex: 1;
    min-width: 80px;
  }

  .stat-num {
    font-size: var(--font-size-xl);
  }

  .stat-label {
    font-size: var(--font-size-xs);
  }

  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .quick-item {
    padding: 12px 6px;
  }

  .quick-item svg,
  .quick-item img {
    width: 22px;
    height: 22px;
  }

  .quick-item span {
    font-size: 11px;
  }

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .exam-selectors {
    flex-direction: column;
    gap: 8px;
  }

  .footer-inner {
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }
}

/* ------------------------------------------------------------
   Print Styles
   ------------------------------------------------------------ */
@media print {
  .quark-nav,
  .hero-wave,
  .hero-sidebar,
  .site-footer {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .dashboard,
  .bottom-panels {
    break-inside: avoid;
  }

  .dash-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* ------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--blue-primary);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   COMPREHENSIVE QUARK HOMEPAGE MODULES
   ============================================================ */

/* ------------------------------------------------------------
   1. Updated Hero with Score Input
   ------------------------------------------------------------ */
.hero-score-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-score-input {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: 600;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.hero-score-input:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-score-input::placeholder {
  color: var(--text-placeholder);
  font-weight: 400;
}

.hero-wave-illustration {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}

.hero-wave-illustration .wave-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-sm);
  flex: 1;
}

.hero-wave-tags {
  display: flex;
  gap: 8px;
}

.hero-wave-tag {
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: var(--font-size-xs);
  font-weight: 600;
  white-space: nowrap;
}

.hero-wave-tag.rush { background: rgba(255, 77, 79, 0.3); color: #FFB3B3; }
.hero-wave-tag.stable { background: rgba(250, 140, 22, 0.3); color: #FFD591; }
.hero-wave-tag.safe { background: rgba(82, 196, 26, 0.3); color: #B7EB8F; }

/* Hero CTA Button */
.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--blue-primary);
  color: #ffffff;
  font-size: var(--font-size-md);
  font-weight: 700;
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(43, 111, 242, 0.4);
}

.btn-hero-cta:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 111, 242, 0.5);
}

.btn-hero-cta .btn-star {
  font-size: 18px;
}

/* Toolbox dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-dropdown-toggle:hover {
  color: var(--blue-primary);
  background: var(--blue-50);
}

.nav-dropdown-toggle .dropdown-arrow {
  font-size: 10px;
  transition: transform var(--transition-fast);
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  padding: 8px 0;
  z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-dropdown-menu a:hover {
  color: var(--blue-primary);
  background: var(--blue-50);
}

/* ------------------------------------------------------------
   2. Updated Dashboard Cards
   ------------------------------------------------------------ */
.dash-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.dash-feature-item .feat-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dash-feature-item .feat-check {
  color: var(--safe-green);
  font-weight: 700;
}

.btn-create-volunteer,
.btn-create-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: var(--blue-primary);
  color: #ffffff;
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-create-volunteer:hover,
.btn-create-report:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 111, 242, 0.3);
}

/* ------------------------------------------------------------
   3. Exam Papers Section (Updated)
   ------------------------------------------------------------ */
.exam-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--blue-50);
  color: var(--blue-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-xl);
  margin-left: 8px;
}

.subject-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.subject-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.subject-card:hover {
  background: var(--blue-50);
  transform: translateY(-2px);
}

.subject-card .subject-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
}

.subject-card .subject-actions {
  display: flex;
  gap: 6px;
}

.subject-action-link {
  padding: 4px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: var(--blue-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.subject-action-link:hover {
  background: var(--blue-primary);
  color: #ffffff;
}

.subject-action-link.dim {
  color: var(--text-tertiary);
}

.subject-action-link.dim:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.btn-expand-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-expand-more:hover {
  background: var(--bg-hover);
  color: var(--blue-primary);
}

/* ------------------------------------------------------------
   4. Calendar Table Format
   ------------------------------------------------------------ */
.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.cal-table th {
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  font-size: var(--font-size-xs);
  border-radius: 0;
}

.cal-table th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cal-table th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.cal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.cal-table tr:hover td {
  background: var(--blue-50);
}

.cal-table .cal-date-cell {
  color: var(--blue-primary);
  font-weight: 600;
  white-space: nowrap;
}

.cal-table .cal-time-cell {
  font-weight: 500;
}

/* Calendar watermark */
.cal-watermark {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 48px;
  opacity: 0.06;
  color: var(--blue-primary);
  font-weight: 900;
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------------------------------
   5. Same-Score Destination Module
   ------------------------------------------------------------ */
.same-score-module {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.ss-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.ss-module-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ss-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--blue-50);
  color: var(--blue-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-xl);
}

.ss-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 16px;
}

.ss-tab {
  flex: 1;
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all var(--transition-base);
}

.ss-tab:hover {
  color: var(--text-primary);
}

.ss-tab.active {
  background: var(--bg-card);
  color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

.ss-destination-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ss-dest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.ss-dest-item:hover {
  background: var(--blue-50);
  transform: translateY(-1px);
}

.ss-dest-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

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

.ss-dest-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-dest-percent {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

.ss-dest-bar {
  width: 60px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.ss-dest-bar-fill {
  height: 100%;
  background: var(--blue-primary);
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.ss-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding: 10px;
  color: var(--blue-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.ss-view-all:hover {
  background: var(--blue-50);
}

/* ------------------------------------------------------------
   6. News Cards Module
   ------------------------------------------------------------ */
.news-cards-module {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.news-cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.news-cards-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.news-card-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.news-card-item:hover {
  background: var(--blue-50);
  transform: translateY(-2px);
}

.news-card-thumb {
  width: 80px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.news-card-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.news-card-meta {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* ------------------------------------------------------------
   7. Expanded Enrollment Module
   ------------------------------------------------------------ */
.expand-module {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.expand-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.expand-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 16px;
}

.expand-tab {
  flex: 1;
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all var(--transition-base);
}

.expand-tab:hover {
  color: var(--text-primary);
}

.expand-tab.active {
  background: var(--bg-card);
  color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

.expand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.expand-table th {
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  font-size: var(--font-size-xs);
}

.expand-table th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.expand-table th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.expand-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.expand-table .change-up {
  color: var(--rush-red);
  font-weight: 600;
}

.expand-table .change-down {
  color: var(--safe-green);
  font-weight: 600;
}

.expand-table tr:hover td {
  background: var(--blue-50);
}

/* ------------------------------------------------------------
   8. Score Lines Module (通用：本科/专科/地方)
   ------------------------------------------------------------ */
.score-lines-module {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.sl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.sl-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.sl-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 16px;
}

.sl-tab {
  flex: 1;
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.sl-tab:hover {
  color: var(--text-primary);
}

.sl-tab.active {
  background: var(--bg-card);
  color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

.sl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.sl-table th {
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  font-size: var(--font-size-xs);
}

.sl-table th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.sl-table th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.sl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.sl-table tr:hover td {
  background: var(--blue-50);
}

.sl-table .sl-score {
  font-weight: 600;
  color: var(--blue-primary);
}

.sl-table .sl-location {
  color: var(--text-tertiary);
}

.sl-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding: 10px;
  color: var(--blue-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.sl-view-all:hover {
  background: var(--blue-50);
}

/* ------------------------------------------------------------
   9. University Rankings Module
   ------------------------------------------------------------ */
.rankings-module {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.rk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.rk-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.rk-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rk-tab {
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.rk-tab:hover {
  color: var(--text-primary);
}

.rk-tab.active {
  background: var(--bg-card);
  color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

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

.rk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.rk-card:hover {
  background: var(--blue-50);
  transform: translateY(-2px);
}

.rk-rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.rk-rank-badge.top { background: var(--rush-red); color: #fff; }
.rk-rank-badge.high { background: var(--stable-orange); color: #fff; }
.rk-rank-badge.normal { background: var(--bg-hover); color: var(--text-secondary); }

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

.rk-college-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-college-tags {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.rk-tag {
  padding: 1px 6px;
  background: var(--blue-50);
  color: var(--blue-primary);
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.rk-college-city {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Module Layout Utilities
   ------------------------------------------------------------ */
.module-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.module-row-full {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Combined section for exam papers + calendar */
.exam-cal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 24px;
}

/* Same score + news row */
.ss-news-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Expand + undergrad row */
.expand-undergrad-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Local + vocational row */
.local-voc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Dashboard card: 我的志愿表 / 我的报告 updated */
.volunteer-demo-card,
.report-demo-card,
.news-dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all var(--transition-base);
}

.volunteer-demo-card:hover,
.report-demo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.demo-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.demo-feature-item .demo-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-primary);
  margin-top: 6px;
  flex-shrink: 0;
}

.news-dash-list {
  display: flex;
  flex-direction: column;
}

.news-dash-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.news-dash-item:last-child {
  border-bottom: none;
}

.news-dash-item:hover {
  color: var(--blue-primary);
}

.news-dash-item .nd-text {
  flex: 1;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-dash-item .nd-date {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
  padding-top: 2px;
}

/* Volunteer table in dashboard */
.vol-table-wrapper {
  margin-bottom: 16px;
}

.vol-table-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-xs);
}

.vol-table-mini th {
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
}

.vol-table-mini td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.tag-rush-sm, .tag-stable-sm, .tag-safe-sm {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
}

.tag-rush-sm { color: var(--rush-red); background: var(--rush-red-bg); }
.tag-stable-sm { color: var(--stable-orange); background: var(--stable-orange-bg); }
.tag-safe-sm { color: var(--safe-green); background: var(--safe-green-bg); }

/* ------------------------------------------------------------
   Responsive for New Modules
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .module-row,
  .exam-cal-row,
  .ss-news-row,
  .expand-undergrad-row,
  .local-voc-row {
    grid-template-columns: 1fr;
  }

  .ss-destination-list {
    grid-template-columns: 1fr;
  }

  .news-cards-grid {
    grid-template-columns: 1fr;
  }

  .rk-grid {
    grid-template-columns: 1fr;
  }

  .subject-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-score-row {
    flex-direction: column;
  }

  .hero-wave-illustration {
    flex-direction: column;
  }

  .hero-wave-tags {
    width: 100%;
    justify-content: center;
  }

  .expand-table,
  .sl-table {
    min-width: 400px;
  }

  .expand-table-wrapper,
  .sl-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rk-tabs {
    flex-wrap: nowrap;
  }
}

/* ============================================================
   New Quark Homepage Modules - Added 2026-06-06
   ============================================================ */

/* ---------- Toolbox Dropdown ---------- */
.nav-toolbox { position: relative; }
.toolbox-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 480px;
  padding: 12px 0;
  z-index: 1000;
  border: 1px solid var(--border-color);
}
.toolbox-dropdown.show { display: flex; gap: 0; }
.toolbox-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 6px;
  margin: 1px 8px;
  text-decoration: none;
}
.toolbox-dropdown a:hover { background: var(--blue-50); color: var(--blue-primary); }
.toolbox-dropdown-section {
  flex: 1;
  padding: 4px 0;
  border-right: 1px solid var(--border-color);
}
.toolbox-dropdown-section:last-child { border-right: none; }
.toolbox-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 8px 16px 6px;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ---------- Hero Fixes ---------- */
.hero-hint {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.stat-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.rush-dot { background: var(--rush-red); }
.stable-dot { background: var(--stable-orange); }
.safe-dot { background: var(--safe-green); }
.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* Score input in pref bar */
.pref-score-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  padding: 6px 16px;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pref-score-input input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 70px;
  color: var(--text-primary);
  text-align: center;
}
.pref-score-input input::placeholder { color: var(--text-tertiary); }
.pref-score-unit {
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Sidebar title */
.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-50);
}

/* Quick icon colors */
.qicon-college { background: #e8f0fe; color: #2B6FF2; }
.qicon-major { background: #e6f7e6; color: #52C41A; }
.qicon-rank { background: #fff3e0; color: #FA8C16; }
.qicon-cutoff { background: #fce4ec; color: #e91e63; }
.qicon-pk { background: #ede7f6; color: #673AB7; }
.qicon-same { background: #e0f2f1; color: #009688; }
.qicon-expand { background: #fff8e1; color: #f57c00; }
.qicon-policy { background: #f3e5f5; color: #9C27B0; }

/* ---------- Dashboard Cards Fixes ---------- */
.dash-illustration {
  font-size: 48px;
  margin-bottom: 16px;
  text-align: center;
}
.dash-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-align: center;
}
.dash-sub-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  text-align: center;
}
.dash-action-wrap { text-align: center; }
.btn-dash-create {
  display: inline-block;
  padding: 10px 28px;
  background: var(--blue-50);
  color: var(--blue-primary);
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-dash-create:hover { background: var(--blue-100); transform: translateY(-1px); }

/* ---------- Panel (common) ---------- */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.panel-more {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}
.panel-more:hover { color: var(--blue-primary); }
.panel-filter-tag {
  font-size: 12px;
  color: var(--blue-primary);
  background: var(--blue-50);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
}
.full-panel { margin-top: 16px; }
.wide-panel { flex: 1.618; }

/* ---------- Bottom Panels Layout ---------- */
.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.exam-panel, .calendar-panel { min-height: 320px; }

/* ---------- Exam Table ---------- */
.exam-select-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-right: 4px;
}
.exam-type-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0;
  padding: 6px 12px;
  background: var(--bg-gray);
  border-radius: 8px;
  display: inline-block;
}
.exam-table-wrap { margin-top: 8px; }
.exam-table {
  width: 100%;
  border-collapse: collapse;
}
.exam-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.exam-subj {
  font-weight: 600;
  color: var(--text-primary);
  width: 100px;
}
.exam-link {
  color: var(--blue-primary);
  font-size: 13px;
  margin: 0 4px;
  transition: opacity var(--transition-fast);
}
.exam-link:hover { opacity: 0.7; }
.dim-link { color: var(--text-tertiary); }
.btn-expand-more {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  background: transparent;
  border: none;
  color: var(--blue-primary);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  border-radius: 8px;
  transition: background var(--transition-fast);
}
.btn-expand-more:hover { background: var(--blue-50); }

/* ---------- Calendar Table ---------- */
.cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cal-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px solid var(--border-color);
}
.cal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.cal-row-dimmed { background: var(--bg-gray); }
.cal-expand {
  text-align: center;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 13px;
  padding: 8px;
}

/* ---------- Two Column Section (同分去向 + 资讯) ---------- */
.two-col-section {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* ---------- Data Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px solid var(--border-color);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table-loading {
  text-align: center;
  color: var(--text-tertiary);
  padding: 24px;
}
.school-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.school-logo-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.school-info-mini { line-height: 1.4; }
.school-name-mini { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.school-meta-mini { font-size: 12px; color: var(--text-tertiary); }
.percent-cell { color: var(--blue-primary); font-weight: 600; }
.change-up { color: #52C41A; font-weight: 600; }
.change-down { color: #FF4D4F; font-weight: 600; }

/* Two-column table layout */
.two-col-table-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.half-table { flex: 1; }

/* View All link */
.view-all-link {
  display: block;
  text-align: center;
  padding: 12px;
  margin-top: 8px;
  color: var(--blue-primary);
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}
.view-all-link:hover { background: var(--blue-50); }

/* ---------- News Module ---------- */
.news-featured {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}
.news-featured:hover { box-shadow: var(--shadow-sm); }
.news-featured-img {
  width: 80px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2B6FF2, #5B9DF8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  color: #fff;
}
.news-featured-body { flex: 1; min-width: 0; }
.news-featured-tag {
  display: inline-block;
  font-size: 10px;
  background: #2B6FF2;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.news-featured-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-side-list { display: flex; flex-direction: column; gap: 8px; }
.news-side-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.news-side-item:hover { background: var(--bg-gray); }
.news-side-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-side-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ---------- Ranking Grid ---------- */
.ranking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.ranking-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ranking-card:hover { background: var(--blue-50); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ranking-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ranking-info { flex: 1; min-width: 0; }
.ranking-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.ranking-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.ranking-city { font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }

/* ==================================================================
   NEW HOMEPAGE (2026-06-06 redesign)
   Compact, Quark-inspired — Hero + Dashboard + Tools only
   ================================================================== */

/* ---- Hero Content (new wrapper) ---- */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 0;
  text-align: center;
}
.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 6px;
}
.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
}

/* ---- Hero Bar (horizontal input row) ---- */
.hero-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-select {
  padding: 9px 32px 9px 14px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: box-shadow 0.15s;
  min-width: 120px;
}
.hero-select:hover,
.hero-select:focus {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  outline: none;
}
.hero-score {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  overflow: hidden;
}
.hero-score-input {
  width: 90px;
  padding: 9px 4px 9px 14px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text-primary);
}
.hero-score-unit {
  padding: 0 12px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 28px;
  background: #fff;
  color: var(--blue-primary);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.hero-btn:hover {
  background: #f0f3ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43,111,242,0.3);
}

/* ---- Hero Stats Row ---- */
.hero-stats-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 8px;
}
.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.hero-stat-num {
  font-size: 22px;
  font-weight: 700;
}
.hero-stat.rush .hero-stat-num { color: #FF8A80; }
.hero-stat.stable .hero-stat-num { color: #FFB74D; }
.hero-stat.safe .hero-stat-num { color: #81C784; }
.hero-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* ---- Dashboard (compact 3-column) ---- */
.dashboard {
  max-width: var(--max-width);
  margin: -16px auto 0;
  padding: 0 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dash-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 20px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.dash-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.dash-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.dash-card-link {
  font-size: 13px;
  color: var(--blue-primary);
  font-weight: 500;
  margin-top: auto;
  padding-top: 8px;
  display: inline-block;
  transition: color 0.15s;
}
.dash-card-link:hover { color: var(--blue-dark); }

/* ---- Dashboard: Timeline (in-card) ---- */
.dash-timeline {
  margin-top: 4px;
}
.tl-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  font-size: 13px;
}
.tl-date {
  color: var(--text-tertiary);
  font-size: 12px;
  min-width: 48px;
}
.tl-text {
  color: var(--text-secondary);
}

/* ---- Dashboard: News list (in-card) ---- */
.dash-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow: hidden;
}
.dash-news-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-news-item:last-child { border-bottom: none; }

/* ---- Tools Section ---- */
.tools-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
}
.tools-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 8px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.tool-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.tool-item span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- Responsive (new homepage) ---------- */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-content { padding: 16px 12px 0; }
  .hero-title { font-size: 22px; }
  .hero-sub { font-size: 13px; margin-bottom: 14px; }
  .hero-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero-select { min-width: 0; }
  .hero-btn { justify-content: center; }
  .hero-stats-row { gap: 16px; }
  .hero-stat-num { font-size: 18px; }
  .dashboard { grid-template-columns: 1fr; gap: 10px; padding: 0 12px 20px; margin-top: -8px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tools-section { padding: 0 12px 32px; }
  .tools-title { font-size: 16px; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats-row { gap: 10px; }
}

/* ============================================================
   PREMIUM HOMEPAGE v3 — Complete Redesign 2026-06-06
   Design language: Deep hero + glass morphism + refined cards
   Independent of previous styles; scoped under .quark-home
   ============================================================ */

/* ------------------------------------------------------------
   Reset quark-home for new design
   ------------------------------------------------------------ */
.quark-home {
  background: #F8FAFC;
}

/* ------------------------------------------------------------
   1. HERO — Dark premium gradient with geometric depth
   ------------------------------------------------------------ */
.hero-premium {
  position: relative;
  background: linear-gradient(170deg, #0A0E27 0%, #101840 30%, #162D5A 65%, #1E4380 100%);
  padding: 64px 20px 80px;
  overflow: hidden;
  isolation: isolate;
}

/* Subtle radial glow in center */
.hero-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(79,142,247,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 70%, rgba(139,92,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 80% 30%, rgba(79,247,208,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle dot grid pattern */
.hero-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 70%);
}

/* Floating decorative circles */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero-orb-1 {
  width: 300px; height: 300px;
  background: rgba(79,142,247,0.12);
  top: -80px; right: -60px;
}
.hero-orb-2 {
  width: 200px; height: 200px;
  background: rgba(139,92,246,0.1);
  bottom: 40px; left: -40px;
}
.hero-orb-3 {
  width: 150px; height: 150px;
  background: rgba(16,185,129,0.08);
  top: 40%; left: 60%;
}

.hero-premium-body {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4F8EF7;
  box-shadow: 0 0 8px rgba(79,142,247,0.6);
  animation: hero-dot-pulse 2s ease-in-out infinite;
}
@keyframes hero-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Heading */
.hero-heading {
  font-size: 48px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero-heading .hero-accent {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ---- Search Panel (Glass Morphic) ---- */
.hero-search-panel {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px;
  max-width: 780px;
  margin: 0 auto 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 1px rgba(255,255,255,0.1) inset;
}
.hsp-row {
  display: flex;
  gap: 2px;
  align-items: stretch;
}
.hsp-field {
  flex: 1;
  min-width: 0;
}
.hsp-field label {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  padding-left: 16px;
}
.hsp-field select,
.hsp-field input {
  width: 100%;
  padding: 12px 36px 12px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid transparent;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.hsp-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.hsp-field select:hover,
.hsp-field select:focus {
  background-color: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.2);
}
.hsp-field select option {
  background: #1a1f3a;
  color: #fff;
}
.hsp-field input {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.hsp-field input::placeholder {
  color: rgba(255,255,255,0.3);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0;
}
.hsp-field input:focus {
  background-color: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.2);
}
.hsp-field input::-webkit-inner-spin-button,
.hsp-field input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hsp-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px;
  background: linear-gradient(135deg, #4F8EF7, #6366F1);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(79,142,247,0.35);
}
.hsp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79,142,247,0.5);
}
.hsp-btn:active {
  transform: translateY(0);
}
.hsp-btn svg {
  width: 18px; height: 18px;
}

/* ---- Trust Metrics ---- */
.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hm-item {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1.3;
  padding: 0 24px;
}
.hm-item span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.hm-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.12);
}

/* ------------------------------------------------------------
   2. STAT CARDS — 冲/稳/保 colorful elevation cards
   ------------------------------------------------------------ */
.stat-cards-row {
  max-width: 1080px;
  margin: -36px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 3;
}

.stat-card-premium {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.stat-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

/* Left accent bar */
.stat-card-premium::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 0 4px 4px 0;
}
.stat-card-premium.rush::before { background: #FF6B6B; }
.stat-card-premium.stable::before { background: #F59E0B; }
.stat-card-premium.safe::before { background: #10B981; }

/* Background wash */
.stat-card-premium.rush { background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F5 100%); }
.stat-card-premium.stable { background: linear-gradient(135deg, #FFFFFF 0%, #FFFBF0 100%); }
.stat-card-premium.safe { background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%); }

.scp-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}
.stat-card-premium.rush .scp-icon { background: #FFF0F0; }
.stat-card-premium.stable .scp-icon { background: #FFF7E6; }
.stat-card-premium.safe .scp-icon { background: #ECFDF5; }

.scp-info {
  flex: 1;
}
.scp-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.stat-card-premium.rush .scp-num { color: #FF6B6B; }
.stat-card-premium.stable .scp-num { color: #F59E0B; }
.stat-card-premium.safe .scp-num { color: #10B981; }

.scp-label {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  margin-top: 2px;
}
.scp-desc {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   3. CORE ACTIONS — 2x2 prominent feature cards
   ------------------------------------------------------------ */
.core-actions {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ca-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 28px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.ca-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.ca-card:active {
  transform: translateY(-1px);
}

.ca-card-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: transform 0.3s;
}
.ca-card:hover .ca-card-icon {
  transform: scale(1.08);
}
.ca-card:nth-child(1) .ca-card-icon { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }
.ca-card:nth-child(2) .ca-card-icon { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.ca-card:nth-child(3) .ca-card-icon { background: linear-gradient(135deg, #FAF5FF, #F3E8FF); }
.ca-card:nth-child(4) .ca-card-icon { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); }

.ca-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}
.ca-card-desc {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.4;
}

/* ------------------------------------------------------------
   4. DASHBOARD CARDS — 3-column info area
   ------------------------------------------------------------ */
.dashboard-premium {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dp-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.dp-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.dp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.dp-card-icon-wrap {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dp-card:nth-child(1) .dp-card-icon-wrap { background: #EFF6FF; }
.dp-card:nth-child(2) .dp-card-icon-wrap { background: #FFF7ED; }
.dp-card:nth-child(3) .dp-card-icon-wrap { background: #F0FDF4; }
.dp-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
}
.dp-card-subtitle {
  font-size: 12px;
  color: #94A3B8;
}

.dp-card-body {
  flex: 1;
  min-height: 0;
}

/* Timeline in card */
.dp-timeline {
  display: flex;
  flex-direction: column;
}
.dp-tl-item {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
}
.dp-tl-item:last-child { border-bottom: none; }
.dp-tl-date {
  color: #94A3B8;
  font-weight: 500;
  min-width: 52px;
  font-size: 12px;
}
.dp-tl-text {
  color: #475569;
  flex: 1;
}

/* News list in card */
.dp-news-list {
  display: flex;
  flex-direction: column;
}
.dp-news-item {
  font-size: 13px;
  color: #475569;
  padding: 7px 0;
  border-bottom: 1px solid #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.15s;
}
.dp-news-item:hover { color: #4F8EF7; }
.dp-news-item:last-child { border-bottom: none; }

/* Volunteer list in card */
.dp-vol-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dp-vol-empty {
  color: #94A3B8;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.dp-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}
.dp-card-link {
  font-size: 13px;
  color: #4F8EF7;
  font-weight: 600;
  transition: color 0.15s;
  cursor: pointer;
}
.dp-card-link:hover { color: #3B5DE7; }

/* ------------------------------------------------------------
   5. ALL TOOLS SECTION
   ------------------------------------------------------------ */
.all-tools-section {
  max-width: 1080px;
  margin: 32px auto 48px;
  padding: 0 20px;
}

.ats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ats-title {
  font-size: 20px;
  font-weight: 800;
  color: #1E293B;
}
.ats-subtitle {
  font-size: 13px;
  color: #94A3B8;
}

.ats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ats-item {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 20px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  border: 1px solid transparent;
}
.ats-item:hover {
  border-color: #E2E8F0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.ats-item-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s;
}
.ats-item:hover .ats-item-icon {
  transform: scale(1.1);
}

.ats-item span {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

/* Icon color variants for tools */
.ats-icon-blue { background: #EFF6FF; }
.ats-icon-purple { background: #FAF5FF; }
.ats-icon-orange { background: #FFF7ED; }
.ats-icon-green { background: #F0FDF4; }
.ats-icon-red { background: #FFF0F0; }
.ats-icon-teal { background: #F0FDFA; }
.ats-icon-indigo { background: #EEF2FF; }

/* ------------------------------------------------------------
   RESPONSIVE — Premium Homepage
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .hero-heading { font-size: 36px; }
  .hero-text { font-size: 16px; }
  .hsp-row { flex-wrap: wrap; }
  .hsp-field { flex: 1 1 45%; }
  .hsp-btn { flex: 1 1 100%; justify-content: center; padding: 14px; }
  .hero-metrics { flex-wrap: wrap; gap: 16px; }
  .hm-divider { display: none; }
  .stat-cards-row { grid-template-columns: 1fr; }
  .core-actions { grid-template-columns: repeat(2, 1fr); }
  .dashboard-premium { grid-template-columns: 1fr; }
  .ats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-premium { padding: 48px 16px 64px; }
  .hero-heading { font-size: 28px; }
  .hero-text { font-size: 14px; margin-bottom: 24px; }
  .hero-search-panel { border-radius: 16px; padding: 4px; }
  .hsp-field { flex: 1 1 100%; }
  .hsp-field select,
  .hsp-field input { padding: 10px 14px; font-size: 14px; }
  .hsp-field input { font-size: 18px; }
  .hsp-btn { border-radius: 12px; }
  .hero-metrics { gap: 8px; }
  .hm-item { font-size: 18px; padding: 0 12px; }
  .stat-cards-row { margin-top: -24px; padding: 0 12px; gap: 10px; }
  .core-actions { padding: 0 12px; gap: 10px; }
  .dashboard-premium { padding: 0 12px; gap: 10px; }
  .all-tools-section { padding: 0 12px; }
  .ats-title { font-size: 18px; }
  .ats-grid { gap: 8px; }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 24px; }
  .core-actions { grid-template-columns: 1fr; }
  .ats-grid { grid-template-columns: repeat(2, 1fr); }
}
