:root {
  /* Soft UI Evolution — Ocean 设计系统 */
  --bg: #EEF2FF;
  --bg-alt: #F3F6FF;
  --surface: #FFFFFF;
  --border: #E2E7F3;
  --border-light: #EEF1F9;
  --text: #1E1B4B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #E0E7FF;
  --primary-lightest: #EEF2FF;
  --primary-dark: #3730A3;
  --success: #05B969;
  --success-light: #D1FAE5;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --danger-bg: #FEF2F2;
  --info: #6366F1;
  --info-light: #E0E7FF;
  --info-bg: #EEF2FF;
  /* Sidebar */
  --sidebar-bg: #1E1B4B;
  --sidebar-active: #302D82;
  --sidebar-text: #A5B4FC;
  --sidebar-text-hover: #FFFFFF;
  --sidebar-icon: #C7D2FE;
  --sidebar-divider: rgba(255,255,255,0.06);
  /* Shadows — Soft UI multi-layer */
  --shadow-xs: 0 1px 2px rgba(79,70,229,0.04);
  --shadow-sm: 0 2px 8px rgba(79,70,229,0.06);
  --shadow-md: 0 4px 16px rgba(79,70,229,0.08);
  --shadow-lg: 0 8px 32px rgba(79,70,229,0.10);
  --shadow-xl: 0 12px 48px rgba(79,70,229,0.12);
  /* Radii */
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  /* Layout */
  --sidebar-w: 240px;
  --topbar-h: 64px;
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.35s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app { height: 100vh; display: flex; flex-direction: column; }

/* ========== Auth Pages ========== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.auth-card .logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card .logo-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.auth-card .logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.auth-card h2 {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text);
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.role-select {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.role-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.role-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-light);
}

.role-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 500;
}

.role-option input[type="radio"] {
  width: auto;
  accent-color: var(--primary);
}

/* Study Direction Select */
.study-direction-select {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.direction-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  background: var(--bg-primary);
}

.direction-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-light);
}

.direction-option.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(79,70,229,0.08) 100%);
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(79,70,229,0.15);
}

.direction-option input[type="radio"] {
  width: auto;
  accent-color: var(--primary);
}

.direction-option .direction-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.direction-option .direction-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.direction-option .direction-title {
  font-weight: 600;
}

.direction-option .direction-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.direction-option.active .direction-desc {
  color: var(--primary);
  opacity: 0.8;
}.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { opacity: 0.9; }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.auth-switch a:hover { text-decoration: underline; }

/* ========== Layout ========== */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar — Canvas LMS style (dark blue-gray) */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-divider);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo-mark {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: none;
}

.sidebar-header .logo-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-group-label {
  padding: 20px 20px 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin: 2px 8px;
  height: 42px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--sidebar-text-hover);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-hover);
  font-weight: 600;
  border-left-color: var(--primary);
  border-radius: var(--radius-sm);
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
}

.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--sidebar-icon);
  transition: color var(--transition-fast);
}

.nav-item:hover .nav-icon {
  color: #FFFFFF;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  line-height: 16px;
  box-shadow: 0 1px 3px rgba(239,68,68,0.3);
}

/* Sidebar student list — Canvas dark sidebar style */
.student-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 12px;
  margin: 1px 8px;
  height: 40px;
  font-size: 13px;
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
}
.student-nav-item.active {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--primary);
  color: #FFFFFF;
}
.student-nav-item:hover:not(.active) {
  background: rgba(255,255,255,0.06);
}
.student-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
}
.student-nav-item.active .student-nav-icon {
  background: var(--primary);
  color: #fff;
}
.student-nav-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.student-nav-item.active .student-nav-name {
  color: #FFFFFF;
  font-weight: 600;
}

/* Sidebar task count badge — red, only shown when > 0 */
.student-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ea4335;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-students-list {
  max-height: 300px;
  overflow-y: auto;
}

/* Topbar — Canvas LMS style (flat, no shadow) */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid #DDDDDD;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

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

.topbar-title {
  font-size: 18px;
  font-weight: 400;
  color: #888888;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-switch {
  position: relative;
  display: inline-block;
}

.portal-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #dadce0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: #5f6368;
  transition: all 0.2s;
}

.portal-switch-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #e8f0fe;
}

.portal-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(60,64,67,0.2), 0 8px 24px rgba(60,64,67,0.12);
  min-width: 140px;
  z-index: 100;
  display: none;
  overflow: hidden;
}

.portal-dropdown.show { display: block; }

.portal-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.portal-dropdown-item:hover {
  background: #e8f0fe;
  color: var(--primary);
}

.topbar-help {
  font-size: 18px;
  cursor: pointer;
  color: #9aa0a6;
  transition: color 0.2s;
}
.topbar-help:hover { color: var(--primary); }

.topbar-user {
  font-size: 13px;
  color: #5f6368;
  font-weight: 500;
}

.topbar-logout {
  font-size: 13px;
  color: #ea4335;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.topbar-logout:hover { opacity: 0.7; }

/* Main content */




/* ========== Cards & Stats — Canvas LMS style ========== */






.stat-icon {
  width: 44px; height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: #EBF3FC; color: var(--primary); }
.stat-icon.green { background: #E6F4EA; color: #34a853; }
.stat-icon.yellow { background: #FEF7E0; color: #fbbc04; }
.stat-icon.red { background: #FCE8E2; color: #ea4335; }
.stat-icon.purple { background: #F3E8FF; color: #7c3aed; }

.stat-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--sidebar-bg);
  line-height: 1.2;
}

.stat-info p {
  font-size: 13px;
  color: #888888;
  margin-top: 2px;
}





.card {
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid #DDDDDD;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.card-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid #F5F6F8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--sidebar-bg);
}

.card-body {
  padding: 20px;
}

/* ========== Tables — Canvas LMS style ========== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th, table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #E8E8E8;
}

table th {
  font-weight: 600;
  color: #888888;
  background: #F5F6F8;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.3px;
}

table tbody tr:nth-child(even) {
  background: #F9F9F9;
}

table tr:hover td {
  background: #EBF3FC;
}

/* Status Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* Group mini-tag — compact inline label */
.group-tag {
  display: inline-flex;
  align-items: center;
  padding: 0px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--info-light);
  color: var(--info);
  white-space: nowrap;
  vertical-align: middle;
}
.group-tag::before {
  content: '📁';
  font-size: 9px;
  margin-right: 2px;
}

/* Student remark card */
.remark-card {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(79,70,229,0.03) 100%);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  position: relative;
}
.remark-card .remark-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.remark-card .remark-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.remark-card .remark-actions {
  position: absolute;
  top: 8px;
  right: 10px;
}
.remark-empty-btn {
  margin-top: 8px;
}

.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-primary { background: var(--primary-light); color: var(--primary); }

/* Quick status selector - looks like a tag but is a dropdown */
.status-select {
  display: inline-block;
  padding: 2px 6px 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%236b7280'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  padding-right: 18px;
  outline: none;
  transition: box-shadow 0.15s;
}
.status-select:hover { box-shadow: 0 0 0 2px rgba(26,115,232,0.2); }
.status-select:focus { box-shadow: 0 0 0 2px rgba(26,115,232,0.35); }
.status-select.s-pending { background-color: var(--warning-light); color: var(--warning); }
.status-select.s-in-progress { background-color: var(--info-light); color: var(--info); }
.status-select.s-completed { background-color: var(--success-light); color: var(--success); }
.status-select.s-confirmed { background-color: var(--success-light); color: var(--success); }
.status-select.s-cancelled { background-color: var(--danger-light); color: var(--danger); }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--surface);
  border-radius: 4px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}
.modal-close:hover { background: var(--bg); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========== Chat ========== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h) - 48px);
  max-height: 600px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-bubble.sent {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  background: var(--bg);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-sender {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.chat-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
}

.chat-input-area input:focus { border-color: var(--primary); }




/* ========== AI Assistant Sidebar Entry + Center Panel ========== */
/* Sidebar bottom AI entry — student only */
.sidebar-ai-entry {
  flex-shrink: 0;
  margin: 8px 12px 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}
.sidebar-ai-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,115,232,0.45);
}
.sidebar-ai-entry:active {
  transform: translateY(0);
}
.sidebar-ai-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-ai-text {
  min-width: 0;
}
.sidebar-ai-label {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
}
.sidebar-ai-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
  line-height: 1.2;
}

/* Overlay backdrop */
.ai-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.32);
  z-index: 10000;
  animation: ai-fade-in 0.15s ease-out;
}
@keyframes ai-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Center panel - 放大版 */
.ai-floating-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1100px;
  height: 750px;
  max-height: calc(100vh - 60px);
  max-width: calc(100vw - 40px);
  background: #FFFFFF;
  border: 1px solid #DDDDDD;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ai-panel-in 0.2s ease-out;
}
@keyframes ai-panel-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #E8E8E8;
  background: #F5F6F8;
  flex-shrink: 0;
}
.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sidebar-bg);
}
.ai-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Prominent "New Chat" button */
.ai-new-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.ai-new-chat-btn:hover {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.ai-panel-btn {
  background: none;
  border: none;
  color: #888888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.ai-panel-btn:hover {
  background: #EBF3FC;
  color: var(--primary);
}

.ai-panel-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ai-panel-sidebar {
  width: 280px;
  border-right: 1px solid #E8E8E8;
  overflow-y: auto;
  background: #F5F6F8;
  flex-shrink: 0;
}

.ai-panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #FFFFFF;
}

.ai-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #FAFBFC;
}

.ai-welcome {
  text-align: center;
  padding: 60px 24px;
  color: #888888;
}
.ai-welcome h3 {
  margin: 8px 0;
  color: var(--sidebar-bg);
  font-size: 18px;
}
.ai-welcome p {
  font-size: 14px;
  margin: 4px 0;
}

/* Quick action buttons on welcome screen */
.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.ai-quick-btn {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid #DDDDDD;
  background: #FFFFFF;
  color: var(--sidebar-bg);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-quick-btn:hover {
  border-color: var(--primary);
  background: #EBF3FC;
  color: var(--primary);
}

.ai-panel-input {
  padding: 18px 24px;
  border-top: 1px solid #E8E8E8;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: #FFFFFF;
  flex-shrink: 0;
}
.ai-panel-input textarea {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #DDDDDD;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  resize: none;
  min-height: 52px;
  max-height: 150px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.ai-panel-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}
.ai-panel-input .btn-primary {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* AI conversation list items */
.ai-conv-list {
  padding: 10px;
}
.ai-conv-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 3px;
  position: relative;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.ai-conv-item:hover {
  background: #EBF3FC;
  border-color: #B4D7FB;
}
.ai-conv-item.active {
  background: #EBF3FC;
  border-color: var(--primary);
}
.ai-conv-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 18px;
}
.ai-conv-item.active .ai-conv-title {
  color: var(--primary);
  font-weight: 600;
}
.ai-conv-time {
  font-size: 11px;
  color: #888888;
  margin-top: 3px;
}
.ai-conv-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #888888;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.ai-conv-item:hover .ai-conv-delete {
  opacity: 1;
}
.ai-conv-delete:hover {
  background: #FCE8E2;
  color: #ea4335;
}

/* AI typing dots */
.ai-typing-dots {
  display: inline-flex;
  gap: 5px;
  padding: 4px 0;
}
.ai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #888888;
  animation: ai-blink 1.4s infinite both;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* AI chat bubbles in panel */
.ai-panel-messages .chat-bubble.sent {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  max-width: 80%;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.6;
}
.ai-panel-messages .chat-bubble.received {
  background: #F5F6F8;
  color: var(--sidebar-bg);
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  max-width: 80%;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #E8E8E8;
}
.ai-panel-messages .chat-sender {
  font-size: 11px;
  color: #888888;
  margin-bottom: 3px;
}
.ai-panel-messages .chat-bubble.sent .chat-sender {
  color: rgba(255,255,255,0.7);
}
.ai-panel-messages .chat-time {
  font-size: 11px;
  color: #aaaaaa;
  margin-top: 4px;
}
.ai-stream-content {
  word-break: break-word;
  line-height: 1.7;
}

/* ========== Markdown content styling inside AI chat bubbles ========== */
.ai-md-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--sidebar-bg);
}
.ai-md-content > *:first-child { margin-top: 0; }
.ai-md-content > *:last-child { margin-bottom: 0; }

.ai-md-content h1, .ai-md-content h2, .ai-md-content h3,
.ai-md-content h4, .ai-md-content h5, .ai-md-content h6 {
  margin: 14px 0 8px;
  line-height: 1.35;
  color: var(--primary);
  font-weight: 700;
}
.ai-md-content h1 { font-size: 20px; border-bottom: 2px solid #EBF3FC; padding-bottom: 6px; }
.ai-md-content h2 { font-size: 17px; border-bottom: 1px solid #EBF3FC; padding-bottom: 4px; }
.ai-md-content h3 { font-size: 15px; }
.ai-md-content h4 { font-size: 14px; color: var(--sidebar-bg); }

.ai-md-content p {
  margin: 8px 0;
  line-height: 1.7;
}
.ai-md-content ul {
  margin: 8px 0;
  padding-left: 22px;
  list-style-type: disc;
}
.ai-md-content ol {
  margin: 8px 0;
  padding-left: 22px;
  list-style-type: decimal;
}
.ai-md-content li {
  margin: 4px 0;
  line-height: 1.6;
}
.ai-md-content li::marker {
  color: var(--primary);
}
.ai-md-content strong {
  font-weight: 700;
  color: #1a1a1a;
}
.ai-md-content em {
  font-style: italic;
  color: #555555;
}
.ai-md-content a {
  color: var(--primary);
  text-decoration: underline;
}
.ai-md-content code {
  background: #EFF3F8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Menlo', Consolas, monospace;
  color: #c7254e;
  border: 1px solid #E0E6ED;
}
.ai-md-content pre {
  background: #282c34;
  color: #abb2bf;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #3d4350;
}
.ai-md-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border: none;
  border-radius: 0;
}
.ai-md-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 8px 14px;
  margin: 10px 0;
  background: #F8FAFF;
  border-radius: 0 6px 6px 0;
  color: #555555;
}
.ai-md-content hr {
  border: none;
  border-top: 2px solid #EBF3FC;
  margin: 14px 0;
}
.ai-md-content table {
  border-collapse: collapse;
  margin: 10px 0;
  width: 100%;
  font-size: 13px;
}
.ai-md-content th, .ai-md-content td {
  border: 1px solid #DDDDDD;
  padding: 8px 12px;
  text-align: left;
}
.ai-md-content th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}
.ai-md-content td {
  background: #FFFFFF;
}
.ai-md-content tr:nth-child(even) td {
  background: #F8F9FA;
}

/* Received bubble overrides for markdown spacing */
.ai-panel-messages .chat-bubble.received {
  white-space: normal;
  max-width: 88%;
}
.ai-panel-messages .chat-bubble.received .ai-md-content {
  white-space: normal;
  overflow-wrap: break-word;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== Grid layouts ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* ========== Goal Cards ========== */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.goal-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.goal-icon.completed { background: var(--success-light); color: var(--success); }
.goal-icon.in-progress { background: var(--info-light); color: var(--info); }
.goal-icon.pending { background: var(--bg); color: var(--text-muted); }

.goal-title { font-size: 14px; font-weight: 500; }
.goal-desc { font-size: 12px; color: var(--text-secondary); }

/* ========== Goal Card with Tasks — Canvas style ========== */
.goal-card-with-tasks {
  background: var(--surface);
  border: 1px solid #DDDDDD;
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
  user-select: none;
}

.goal-card-with-tasks:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.goal-card-with-tasks.goal-selected {
  border-color: var(--primary);
  background: #EBF3FC;
  box-shadow: 0 2px 6px rgba(26,115,232,0.15);
}

.goal-card-with-tasks .goal-batch-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.goal-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.goal-progress .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ========== Task Priority Tags ========== */
.task-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.task-priority-low {
  background: var(--bg);
  color: var(--text-muted);
}

.task-priority-normal {
  background: var(--info-light);
  color: var(--info);
}

.task-priority-high {
  background: var(--danger-light);
  color: var(--danger);
}

/* ========== Task Goal Tag ========== */
.task-goal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}

/* ========== Timeline ========== */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary-light);
}

.timeline-item .time {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-item .desc {
  font-size: 13px;
  color: var(--text);
  margin-top: 2px;
}

/* ========== Upload — Canvas style ========== */
.upload-area {
  border: 2px dashed #DDDDDD;
  border-radius: 4px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-area:hover {
  border-color: var(--primary);
  background: #EBF3FC;
}

.upload-area .upload-icon {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-area p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== Calendar ========== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-header-cell {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-cell {
  padding: 8px;
  min-height: 60px;
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.calendar-cell:hover { background: #EBF3FC; }
.calendar-cell.today { background: #EBF3FC; border-color: var(--primary); }
.calendar-cell .day-num { font-weight: 500; color: var(--sidebar-bg); }
.calendar-cell .event-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-top: 4px;
}

/* ========== Search ========== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
}

.search-bar input:focus { border-color: var(--primary); }

.search-bar select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--surface);
}

/* ========== School Cards — Canvas style ========== */
.school-card {
  background: var(--surface);
  border: 1px solid #DDDDDD;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.school-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  border-color: var(--primary);
}

.school-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.school-card .school-rank {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

.school-rank.rank-top10 {
  background: linear-gradient(135deg, #ff6b35, #ff9a56);
  color: #fff;
}

.school-rank.rank-top30 {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}

.school-rank.rank-top50 {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #fff;
}

.school-flag {
  font-size: 12px;
  color: var(--text-secondary);
}

.school-card .school-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.school-card .school-short {
  font-size: 13px;
  color: var(--text-secondary);
}

.school-card .school-programs {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.program-tag {
  font-size: 11px;
  background: var(--bg);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.school-card .school-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.school-count {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  align-self: center;
}

/* ========== School Detail Modal ========== */
.school-detail {
  font-size: 14px;
  line-height: 1.6;
}

.school-detail .detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.school-detail .detail-type {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 12px;
}

.school-detail .detail-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.school-detail .detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.school-detail .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.school-detail .detail-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.school-detail .detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.school-detail .req-tag {
  font-size: 12px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ========== Switch toggle ========== */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.switch-row .label { font-size: 14px; color: var(--text); }
.switch-row .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.switch .slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s;
}

.switch .slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

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

/* ========== Step Process ========== */
.steps {
  display: flex;
  margin-bottom: 24px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.step:last-child::after { display: none; }

.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.step.active .step-num { background: var(--primary); color: white; }
.step.done .step-num { background: var(--success); color: white; }

.step-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.step.active .step-label { color: var(--primary); font-weight: 500; }
.step.done .step-label { color: var(--success); }

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
}

.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== Responsive ========== */

}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }

/* Consultant multi-select checkboxes */
.consultant-checkboxes {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 8px;
}
.checkbox-item:hover {
  background: var(--primary-light);
}
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ========== Collapsible Monthly Timeline ========== */
.timeline-month-section {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline-month-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.timeline-month-header:hover {
  background: var(--primary-light);
}

.timeline-month-toggle {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  display: inline-block;
}

.timeline-month-section.collapsed .timeline-month-toggle {
  transform: rotate(-90deg);
}

.timeline-month-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.timeline-month-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.timeline-month-body {
  padding: 8px 16px;
  max-height: 500px;
  overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.timeline-month-section.collapsed .timeline-month-body {
  max-height: 0;
  padding: 0 16px;
  opacity: 0;
  overflow: hidden;
}

.timeline-month-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.timeline-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.timeline-item-source {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.4;
}
.timeline-item-source.source-goal {
  color: #9333ea;
  background: #f3e8ff;
}
.timeline-item-source.source-task {
  color: #2563eb;
  background: #dbeafe;
}
.timeline-item-source.source-consultant {
  color: #d97706;
  background: #fef3c7;
}
.timeline-item-source.source-appointment {
  color: #059669;
  background: #d1fae5;
}

.timeline-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-item-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Timeline item — completed strikethrough */
.timeline-item-done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Timeline status change buttons */
.timeline-status-btns {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
  margin-left: 4px;
}
.timeline-status-btn {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.5;
  transition: all 0.15s;
}
.timeline-status-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Timeline status select - matches table status-select style */
.timeline-status-select {
  display: inline-block;
  padding: 2px 6px 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%236b7280'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  padding-right: 18px;
  outline: none;
  transition: box-shadow 0.15s;
  min-width: 72px;
  text-align: left;
}
.timeline-status-select:hover { box-shadow: 0 0 0 2px rgba(79,70,229,0.2); }
.timeline-status-select:focus { box-shadow: 0 0 0 2px rgba(79,70,229,0.35); }
.timeline-status-select.s-pending { background-color: var(--warning-light); color: var(--warning); }
.timeline-status-select.s-in-progress { background-color: var(--info-light); color: var(--info); }
.timeline-status-select.s-completed { background-color: var(--success-light); color: var(--success); }
.timeline-status-select.s-confirmed { background-color: var(--success-light); color: var(--success); }
.timeline-status-select.s-cancelled { background-color: var(--danger-light); color: var(--danger); }

/* Recurring task tags */
.recurrence-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.recurrence-tag.recurrence-daily {
  background: #fef3c7;
  color: #d97706;
}
.recurrence-tag.recurrence-weekly {
  background: #dbeafe;
  color: #2563eb;
}
.recurrence-tag.recurrence-biweekly {
  background: #cffafe;
  color: #0891b2;
}
.recurrence-tag.recurrence-monthly {
  background: #ede9fe;
  color: #7c3aed;
}
.recurrence-tag.recurrence-bimonthly {
  background: #fce7f3;
  color: #db2777;
}

/* ========== Template Pages ========== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 4px 0 0 4px;
}

.template-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

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

.template-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-left: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.template-card:hover .template-card-actions {
  opacity: 1;
}

.template-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  padding-left: 4px;
}

.template-card-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.template-card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.template-card-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Template detail */
.template-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.template-breadcrumb .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all 0.15s;
  background: none;
  border: none;
}

.template-breadcrumb .back-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.template-breadcrumb .separator {
  color: var(--text-muted);
  font-size: 12px;
}

.template-breadcrumb .current {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.template-desc-bar {
  background: var(--primary-light);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--primary-dark);
  border-left: 3px solid var(--primary);
}

/* Template goal cards */
.tpl-goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}

.tpl-goal-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tpl-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tpl-goal-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpl-goal-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--primary-light);
  flex-shrink: 0;
}

.tpl-goal-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.tpl-goal-actions {
  display: flex;
  gap: 4px;
}

.tpl-goal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 6px 36px;
}

.tpl-goal-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tpl-goal-date span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Template task items (nested in goal) */
.tpl-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.tpl-task-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tpl-task-priority.high { background: var(--danger); }
.tpl-task-priority.normal { background: var(--warning); }
.tpl-task-priority.low { background: var(--success); }

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

.tpl-task-title {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.tpl-task-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.tpl-task-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.tpl-task-item:hover .tpl-task-actions {
  opacity: 1;
}

/* Template task cards (standalone in tasks tab) */
.tpl-task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.2s;
}

.tpl-task-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.tpl-task-card .tpl-task-priority {
  width: 8px;
  height: 8px;
}

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

.tpl-task-card .tpl-task-title {
  font-weight: 500;
  font-size: 14px;
}

.tpl-task-card .tpl-task-meta {
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.tpl-task-card .tpl-task-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.tpl-task-card .tpl-task-goal-link {
  font-size: 12px;
  color: var(--primary);
  cursor: default;
}

.tpl-task-card .tpl-task-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.tpl-task-card .tpl-task-actions {
  opacity: 0;
  transition: opacity 0.15s;
}

.tpl-task-card:hover .tpl-task-actions {
  opacity: 1;
}

/* Template empty states */
.tpl-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.tpl-empty .tpl-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.tpl-empty p {
  font-size: 14px;
  margin-bottom: 16px;
}

.tpl-empty .btn {
  margin-top: 4px;
}

/* ========== School Picker (顾问端选校) ========== */
.school-picker {
  margin-bottom: 4px;
}

.school-picker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 28px;
  align-items: center;
}

.school-picker-tags:empty::after {
  content: '暂未选择院校';
  color: var(--text-muted);
  font-size: 13px;
}

.school-picker-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  animation: tagIn 0.2s ease;
}

.school-picker-tag.reach {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.school-picker-tag.match {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.school-picker-tag.safety {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.school-picker-tag-remove {
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.school-picker-tag-remove:hover {
  opacity: 1;
}

/* Major input inside school-picker tag */
.sp-tag-name {
  white-space: nowrap;
}

.sp-tag-major {
  border: none;
  border-bottom: 1px dashed var(--text-muted);
  background: transparent;
  font-size: 12px;
  padding: 1px 4px;
  width: 100px;
  color: inherit;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.sp-tag-major:focus {
  border-bottom-color: var(--primary);
  width: 140px;
}

.sp-tag-major::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 11px;
}

/* Suggested school item with major input (student side) */
.suggest-item {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.suggest-item .suggest-major {
  border: none;
  border-bottom: 1px dashed var(--text-muted);
  background: transparent;
  font-size: 12px;
  padding: 2px 4px;
  width: 110px;
  outline: none;
  color: var(--text-secondary);
  font-family: inherit;
}

.suggest-item .suggest-major:focus {
  border-bottom-color: var(--primary);
  width: 140px;
}

.suggest-item .suggest-major::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 11px;
}

.school-picker-input-wrap {
  position: relative;
}

.school-picker-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  background: var(--surface);
  box-sizing: border-box;
}

.school-picker-search:focus {
  border-color: var(--primary);
}

.school-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
}

.school-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

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

.school-picker-item:hover {
  background: var(--primary-light);
}

.school-picker-item .sp-item-name {
  font-weight: 500;
  color: var(--text);
}

.school-picker-item .sp-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 12px;
}

.school-picker-item.selected {
  background: var(--bg);
  color: var(--text-muted);
  cursor: default;
}

.school-picker-item.selected .sp-item-name {
  color: var(--text-muted);
}

.school-picker-no-result {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

@keyframes tagIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ========== Batch Operation Toolbar — Canvas style ========== */
.batch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #EBF3FC;
  border: 1px solid #B4D7FB;
  border-radius: 4px;
  margin-bottom: 12px;
  animation: batchToolbarFadeIn 0.3s ease;
}

.batch-toolbar .btn-delete-batch {
  background: #ea4335;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.batch-toolbar .btn-delete-batch:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(234,67,53,0.3);
}

.batch-toolbar .btn-delete-batch:disabled {
  background: #E8E8E8;
  color: #888888;
  cursor: not-allowed;
  box-shadow: none;
}

.batch-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.batch-check:hover {
  box-shadow: 0 0 0 2px var(--primary-light);
  border-radius: 3px;
}

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

/* ========== Student Overview — Canvas LMS Style ========== */

/* Welcome Banner — Canvas clean style with blue accent strip */
.stu-welcome {
  background: var(--surface);
  border-radius: 4px;
  padding: 0;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid #DDDDDD;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stu-welcome::after { display: none; }
.stu-welcome::before { display: none; }
.stu-welcome-accent {
  height: 4px;
  background: var(--primary);
}
.stu-welcome-inner {
  padding: 20px 24px 18px;
}
.stu-welcome-greeting {
  font-size: 20px;
  font-weight: 600;
  color: var(--sidebar-bg);
  margin-bottom: 4px;
  position: static;
  z-index: auto;
}
.stu-welcome-sub {
  font-size: 13px;
  color: #888888;
  margin-bottom: 12px;
  position: static;
  z-index: auto;
}
.stu-welcome-sub span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stu-welcome-sub .dot {
  width: 4px; height: 4px;
  background: #9aa0a6;
  border-radius: 50%;
  display: inline-block;
  margin: 0 8px;
}
.stu-progress-track {
  height: 6px;
  background: #E8E8E8;
  border-radius: 3px;
  overflow: hidden;
  position: static;
  z-index: auto;
}
.stu-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stu-progress-label {
  font-size: 12px;
  color: #888888;
  margin-top: 6px;
  position: static;
  z-index: auto;
}

/* Stat Cards — Canvas LMS style with subtle elevation */
.stu-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .stu-stats { grid-template-columns: repeat(2, 1fr); }
}
.stu-stat-card {
  background: var(--surface);
  border-radius: 4px;
  padding: 16px 20px 14px;
  border: 1px solid #DDDDDD;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.stu-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stu-stat-card.sc-blue::before { background: var(--primary); }
.stu-stat-card.sc-green::before { background: #34a853; }
.stu-stat-card.sc-amber::before { background: #fbbc04; }
.stu-stat-card.sc-red::before { background: #ea4335; }
.stu-stat-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.stu-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--sidebar-bg);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stu-stat-label {
  font-size: 12px;
  color: #888888;
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Two-column layout */
.stu-duo {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 960px) {
  .stu-duo { grid-template-columns: 1fr; }
}

/* Canvas LMS Card base — subtle elevation, flat aesthetic */
.stu-card {
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid #DDDDDD;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}
.stu-card-header {
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F5F6F8;
}
.stu-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sidebar-bg);
  letter-spacing: 0.1px;
}
.stu-card-link {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
.stu-card-link:hover { text-decoration: underline; }
.stu-card-body {
  padding: 0 20px 16px;
}

/* Todo table — Canvas LMS table style with alternating rows */
.stu-todo-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.stu-todo-table colgroup .col-pri { width: 44px; }
.stu-todo-table colgroup .col-title { }
.stu-todo-table colgroup .col-assignee { width: 80px; }
.stu-todo-table colgroup .col-date { width: 96px; }
.stu-todo-table colgroup .col-status { width: 80px; }

.stu-todo-table thead th {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #888888;
  text-transform: none;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #DDDDDD;
  text-align: left;
  background: #F5F6F8;
  white-space: nowrap;
}
.stu-todo-table tbody tr {
  transition: background 0.15s;
}
.stu-todo-table tbody tr:nth-child(even) {
  background: #F9F9F9;
}
.stu-todo-table tbody tr:hover {
  background: #EBF3FC;
}
.stu-todo-table tbody td {
  padding: 10px;
  font-size: 13px;
  color: var(--sidebar-bg);
  border-bottom: 1px solid #E8E8E8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stu-todo-table tbody td.td-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stu-todo-table tbody td.td-date {
  color: #888888;
  font-variant-numeric: tabular-nums;
}
.stu-todo-table tbody td.td-assignee {
  color: #888888;
}

/* Priority dot — Google style */
.stu-pri {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.stu-pri.high { background: #ea4335; }
.stu-pri.normal { background: #fbbc04; }
.stu-pri.low { background: #9aa0a6; }

/* Status chip — Google Material chip */
.stu-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.stu-chip.pending { background: #fef7e0; color: #e37400; }
.stu-chip.in-progress { background: #e8f0fe; color: var(--primary); }
.stu-chip.overdue { background: #fce8e2; color: #c5221f; }
.stu-chip.confirmed { background: #e6f4ea; color: #137333; }

/* Consultant Card — Google style */
.stu-consultant-card {
  padding: 20px;
}
.stu-consultant-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: white;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stu-consultant-name {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 4px;
}
.stu-consultant-specialty {
  font-size: 12px;
  color: #5f6368;
  margin-bottom: 8px;
}
.stu-consultant-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5f6368;
  margin-bottom: 4px;
}
.stu-consultant-contact .icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
}
.stu-msg-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8eaed;
}
.stu-msg-label {
  font-size: 11px;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.stu-msg-preview {
  font-size: 13px;
  color: #202124;
  line-height: 1.5;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  position: relative;
}
.stu-msg-preview::before {
  content: '';
  position: absolute;
  top: -6px; left: 16px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #f8f9fa;
}
.stu-msg-date {
  font-size: 11px;
  color: #9aa0a6;
  margin-top: 4px;
  text-align: right;
}
.stu-no-consultant {
  text-align: center;
  padding: 32px 20px;
  color: #5f6368;
  font-size: 13px;
}
.stu-no-consultant .icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Timeline — Canvas LMS style */
.stu-timeline-section {
  margin-bottom: 0;
}
.stu-tl-month {
  border: 1px solid #DDDDDD;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.stu-tl-month-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #F5F6F8;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.stu-tl-month-header:hover { background: #EBF3FC; }
.stu-tl-toggle {
  font-size: 12px;
  color: #888888;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}
.stu-tl-month.collapsed .stu-tl-toggle { transform: rotate(-90deg); }
.stu-tl-month-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sidebar-bg);
  flex: 1;
}
.stu-tl-count {
  font-size: 11px;
  font-weight: 600;
  color: #888888;
  background: #E8E8E8;
  padding: 2px 10px;
  border-radius: 10px;
}
.stu-tl-body {
  padding: 4px 16px 8px;
  max-height: 600px;
  overflow-y: auto;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s, opacity 0.3s;
}
.stu-tl-month.collapsed .stu-tl-body {
  max-height: 0;
  padding: 0 16px;
  opacity: 0;
  overflow: hidden;
}
.stu-tl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #E8E8E8;
}
.stu-tl-item:last-child { border-bottom: none; }
.stu-tl-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.stu-tl-item-source {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.stu-tl-item-source.src-goal { background: #f3e8ff; color: #7c3aed; }
.stu-tl-item-source.src-task { background: #e8f0fe; color: var(--primary); }
.stu-tl-item-source.src-appointment { background: #e6f4ea; color: #137333; }
.stu-tl-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-bg);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stu-tl-item-date {
  font-size: 12px;
  color: #888888;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Empty state — Google style */
.stu-empty {
  text-align: center;
  padding: 36px 20px;
  color: #9aa0a6;
}
.stu-empty .icon { font-size: 36px; margin-bottom: 8px; }
.stu-empty p { font-size: 13px; }

/* ========== Consultant Student Cards Grid ========== */
.stu-cards-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stu-cards-stats .stu-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stu-cards-stats .stu-stat-card.sc-blue::before { background: #4285f4; }
.stu-cards-stats .stu-stat-card.sc-green::before { background: #34a853; }
.stu-cards-stats .stu-stat-card.sc-amber::before { background: #fbbc04; }

.stu-cards-stats .stu-stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stu-cards-stats .stu-stat-card.sc-blue .stu-stat-icon { background: #e8f0fe; color: var(--primary); }
.stu-cards-stats .stu-stat-card.sc-green .stu-stat-icon { background: #e6f4ea; color: #137333; }
.stu-cards-stats .stu-stat-card.sc-amber .stu-stat-icon { background: #fef7e0; color: #e37400; }

.stu-cards-stats .stu-stat-body { flex: 1; }
.stu-cards-stats .stu-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #202124;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stu-cards-stats .stu-stat-desc {
  font-size: 12px;
  color: #5f6368;
  font-weight: 500;
}

/* Section header */
.stu-cards-section { margin-bottom: 24px; }
.stu-cards-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stu-cards-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin: 0;
}
.stu-cards-count {
  font-size: 12px;
  color: #5f6368;
  font-weight: 500;
}

/* Cards grid */
.stu-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .stu-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stu-cards-grid { grid-template-columns: 1fr; }
}

/* Individual student card */
.stu-cards-grid .stu-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(60,64,67,0.08);
  padding: 18px 20px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.stu-cards-grid .stu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stu-cards-grid .stu-card.sc-green::before { background: #34a853; }
.stu-cards-grid .stu-card.sc-amber::before { background: #fbbc04; }
.stu-cards-grid .stu-card.sc-red::before { background: #ea4335; }
.stu-cards-grid .stu-card:hover {
  box-shadow: 0 2px 8px rgba(60,64,67,0.15), 0 1px 3px rgba(60,64,67,0.1);
  transform: translateY(-2px);
}

/* Card top — avatar + name + group */
.stu-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.stu-card-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(66,133,244,0.25);
}
.stu-card.sc-amber .stu-card-avatar { background: linear-gradient(135deg, #fbbc04, #f9ab00); }
.stu-card.sc-red .stu-card-avatar { background: linear-gradient(135deg, #ea4335, #c5221f); }

.stu-card-info {
  flex: 1;
  min-width: 0;
}
.stu-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.stu-card-degree {
  font-size: 11px;
  color: #5f6368;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.stu-card-group-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  background: #f1f3f4;
  color: #5f6368;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card metrics row */
.stu-card-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.stu-card-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stu-card-metric-label {
  font-size: 10px;
  font-weight: 600;
  color: #9aa0a6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stu-card-metric-val {
  font-size: 16px;
  font-weight: 700;
  color: #202124;
  font-variant-numeric: tabular-nums;
}
.stu-card-metric-val.has-pending {
  color: #ea4335;
}

/* Card progress bar */
.stu-card-progress {
  height: 4px;
  background: #f1f3f4;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.stu-card-progress-bar {
  height: 100%;
  background: #34a853;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stu-card-progress-label {
  font-size: 10px;
  color: #5f6368;
  font-weight: 500;
}

/* Empty state for cards */
.stu-cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #9aa0a6;
  font-size: 13px;
}

/* ========== Activity Timeline Styles ========== */
.activity-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.activity-item:last-child {
  border-bottom: none !important;
}

.activities-container {
  padding: 0;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--sidebar-bg);
}

/* ===== 布局重构样式 ===== */

/* Topbar 变成最小化 — 只保留标题和帮助按钮，去掉用户名和退出 */


/* Sidebar 角色切换 */
.sidebar-role-switch {
  margin-bottom: 10px;
}
.sidebar-role-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
  padding: 0 4px;
}
.sidebar-role-options {
  display: flex;
  gap: 6px;
}
.sidebar-role-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.sidebar-role-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.12);
}
.sidebar-role-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.35);
}

/* Sidebar 底部区域 */
.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  flex-shrink: 0;
}

/* Sidebar 用户信息 */
.sidebar-user-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  margin-top: 8px;
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.sidebar-logout-btn {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  line-height: 1.2;
  transition: color 0.15s;
}
.sidebar-logout-btn:hover {
  color: rgba(255,255,255,0.8);
}




/* ===== main-content 全高 ===== */



*/








/* ===== 布局调整 ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}
.page-content {
  flex: 1;
  overflow-y: auto;
}
.topbar-minimal {
  display: none !important;
}

/* ===== 侧边栏 AI 导航项 + 分隔线 ===== */



/* ===== 侧边栏 AI 助手 - 立体按钮 ===== */
.sidebar-ai-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 14px 6px 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4285f4 0%, #1a56db 100%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(26,86,219,0.35),
    0 1px 3px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.sidebar-ai-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}
.sidebar-ai-btn:hover {
  background: linear-gradient(135deg, #5a95f5 0%, #1a56db 100%);
  box-shadow:
    0 6px 20px rgba(26,86,219,0.45),
    0 2px 6px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.sidebar-ai-btn:active {
  background: linear-gradient(135deg, #3575e8 0%, #1546b8 100%);
  box-shadow:
    0 2px 8px rgba(26,86,219,0.3),
    0 1px 2px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(0);
}
.sidebar-ai-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.sidebar-ai-btn-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-ai-btn-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.sidebar-ai-btn-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

.nav-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 4px 16px;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  
}
@media (max-width: 500px) {
  
  
}

/* ===== 区域标题栏 ===== */


/* ===== 统计卡片（任务管理/申请进度等通用） ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.15s;
}
.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.yellow { background: #fff8e1; }
.stat-icon.blue { background: #e3f2fd; }
.stat-icon.green { background: #e8f5e9; }
.stat-icon.red { background: #fce4ec; }
.stat-icon.purple { background: #f3e8ff; }
.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}
.stat-info p {
  font-size: 13px;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

/* ===== 升学与申请页面 - 全新UI ===== */
.stu-study-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f7f8fc;
  overflow-y: auto;
  box-sizing: border-box;
  width: 100%;
}

/* ===== 两栏面板布局 ===== */
.study-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px 24px 24px 24px;
  flex: 1;
  align-items: start;
}
.study-panel {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
}
.study-panel-header {
  padding: 16px 20px;
  flex-shrink: 0;
}
.study-panel-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.study-panel-header-icon {
  font-size: 22px;
}
.study-panel-header h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}
.study-panel-header .btn-add-app {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 12px;
  padding: 5px 14px;
}
.study-panel-header .btn-add-app:hover {
  background: rgba(255,255,255,0.35);
  box-shadow: none;
  transform: none;
}
.study-panel-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

/* 面板内统计卡片间距缩小 */
.study-panel-body .app-stats-row {
  gap: 8px;
  margin-bottom: 14px;
}
.study-panel-body .app-stat-item {
  padding: 10px 14px;
  border-radius: 10px;
}
.study-panel-body .app-stat-num {
  font-size: 22px;
}
.study-panel-body .app-stat-label {
  font-size: 12px;
}

/* 面板内层级组间距缩小 */
.study-panel-body .tier-groups { gap: 10px; }
.study-panel-body .tier-group { border-radius: 10px; }
.study-panel-body .tier-header { padding: 8px 14px; }
.study-panel-body .tier-body { padding: 4px 10px 10px 10px; }
.study-panel-body .app-card { padding: 10px 12px; margin-bottom: 6px; }

/* 响应式 - 小屏幕上下排列 */
@media (max-width: 960px) {
  .study-panels {
    grid-template-columns: 1fr;
  }
  .study-panel {
    max-height: none;
  }
}

/* 区域块 */
.study-section {
  margin-top: 28px;
}
.study-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.study-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.study-section-title .study-section-icon {
  font-size: 22px;
}
.study-section-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.btn-add-app {
  padding: 8px 18px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-add-app:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* ===== 申请进度 - 统计概览 ===== */
.app-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.app-stat-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  border-left: 4px solid;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.app-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}
.app-stat-label {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}

/* 顾问方案横幅 */
.plan-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  margin-bottom: 20px;
}
.plan-banner-icon { font-size: 24px; }
.plan-banner-text strong { color: #4338ca; font-size: 14px; }
.plan-banner-plans { margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.plan-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #fff;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  font-size: 12px;
  color: #4338ca;
  cursor: pointer;
  transition: background 0.15s;
}
.plan-tag:hover { background: #eef2ff; }

/* ===== 申请进度 - 分层组 ===== */
.tier-groups { display: flex; flex-direction: column; gap: 16px; }
.tier-group {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
}
.tier-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}
.tier-icon { font-size: 18px; }
.tier-count {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}
.tier-suggest-count {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
}
.tier-body { padding: 4px 14px 14px 14px; }

/* ===== 申请卡片 ===== */
.app-card {
  background: #fafbfc;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-left: 4px solid transparent;
  transition: all 0.15s;
}
.app-card:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-card-school {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.app-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}
.app-card-rank {
  font-size: 11px;
  font-weight: 600;
  color: #4f46e5;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
}
.app-card-tier {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.app-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.app-card-del {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.app-card-del:hover {
  background: #fef2f2;
  color: #ef4444;
}
.app-card-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
}

/* ===== 推荐院校 ===== */
.suggest-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.suggest-title {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 600;
}
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.suggest-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.suggest-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}
.suggest-card-bottom {
  display: flex;
  gap: 6px;
  align-items: center;
}
.suggest-major-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}
.suggest-major-input:focus { border-color: #a5b4fc; }
.suggest-apply-btn {
  padding: 4px 12px;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.suggest-apply-btn:hover { opacity: 0.85; }
.tier-empty {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
  font-size: 14px;
}

/* ===== 文书管理 ===== */
.doc-upload-zone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 2px dashed #d1d5db;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.doc-upload-zone:hover {
  border-color: #818cf8;
  background: #faf5ff;
}
.doc-upload-icon { font-size: 28px; }
.doc-upload-text strong { display: block; font-size: 15px; color: #1e293b; }
.doc-upload-text span { font-size: 13px; color: #94a3b8; }

.docs-list { display: flex; flex-direction: column; gap: 8px; }
.docs-empty {
  text-align: center;
  color: #94a3b8;
  padding: 32px;
  font-size: 14px;
}
.docs-empty-icon { font-size: 36px; margin-bottom: 8px; }

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s;
}
.doc-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-ext {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.doc-card-info { flex: 1; min-width: 0; }
.doc-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-card-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
  align-items: center;
}
.doc-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.doc-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.doc-action-btn {
  padding: 6px 14px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.doc-action-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ===== 布局 ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}
.page-content {
  flex: 1;
  overflow-y: auto;
}
.topbar-minimal { display: none !important; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .app-stats-row { grid-template-columns: repeat(2, 1fr); }
  .suggest-grid { grid-template-columns: 1fr; }
  .stu-study-page { padding: 0 16px 16px 16px; }
}


/* ============================================================
   Soft UI Evolution — Ocean Design System Extensions
   ============================================================ */

/* ---------- Welcome Banner ---------- */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 40%, #7C3AED 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.welcome-banner h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.welcome-banner p {
  font-size: 14px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ---------- Kanban Board (Milestones) ---------- */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0;
}
.kanban-column {
  flex: 1;
  min-width: 280px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-light);
}
.kanban-column-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.kanban-column-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban-column-header .dot.todo { background: var(--text-muted); }
.kanban-column-header .dot.in-progress { background: var(--primary); }
.kanban-column-header .dot.done { background: var(--success); }
.kanban-column-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.kanban-column-header .count {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--border);
  color: var(--text-secondary);
}
.kanban-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.kanban-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}
.kanban-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.kanban-card .progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}
.kanban-card .progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width var(--transition-slow);
}
.kanban-card .meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ---------- View Toggle (List / Kanban) ---------- */
.view-toggle {
  display: flex;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 3px;
  border: 1px solid var(--border-light);
}
.view-toggle button {
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.view-toggle button.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-xs);
}
.view-toggle button:hover:not(.active) {
  color: var(--text);
  background: rgba(79,70,229,0.05);
}

/* ---------- Status Badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}
.status-badge.in-progress, .status-badge.review {
  background: var(--info-bg);
  color: var(--info);
}
.status-badge.completed, .status-badge.confirmed, .status-badge.admitted {
  background: var(--success-bg);
  color: var(--success);
}
.status-badge.cancelled, .status-badge.rejected {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- Priority Dots ---------- */
.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.priority-dot.high { background: var(--danger); }
.priority-dot.medium { background: var(--warning); }
.priority-dot.low { background: var(--success); }

/* ---------- School / Application Cards ---------- */
.app-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}
.app-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.app-card .school-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.app-card .program {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.app-card .app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Activity Feed ---------- */
.feed-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.feed-item:last-child { border-bottom: none; }
.feed-item .feed-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.feed-item .feed-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---------- Modal refined ---------- */
.modal-overlay {
  background: rgba(30,27,75,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}

/* ---------- Toast refined ---------- */
.toast {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Page Content Spacing ---------- */
.page-content {
  padding: 32px;
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Form enhancements ---------- */
.form-group input,
.form-group select,
.form-group textarea {
  border-radius: var(--radius);
  border-color: var(--border);
  transition: all var(--transition-fast);
  font-family: var(--font-family);
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--primary-light);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

/* ---------- Button base enhancements ---------- */
.btn {
  font-family: var(--font-family);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }

/* ---------- Tag / Chip ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-lightest);
  color: var(--primary);
}

/* ---------- Timeline refined ---------- */
.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 20px;
  border-left: 2px solid var(--border-light);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
}
.timeline-item:last-child { border-left-color: transparent; }

/* ---------- AI Panel refined ---------- */
.ai-panel-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 768px) {
  .sidebar { width: 64px; min-width: 64px; }
  .sidebar .nav-item { justify-content: center; padding: 0; }
  .sidebar .nav-item span:not(.nav-icon) { display: none; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .kanban-board { flex-direction: column; }
  .kanban-column { min-width: 100%; }
}
