/* ============================================
   EduMind - AI 个性化学习平台
   ============================================ */

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

:root {
  --primary:       #2563eb;
  --primary-light: #dbeafe;
  --primary-dark:  #1e40af;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --success:       #10b981;
  --success-light: #d1fae5;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --purple:        #8b5cf6;
  --purple-light:  #ede9fe;
  --rose:          #f43f5e;
  --rose-light:    #ffe4e6;
  --cyan:          #06b6d4;
  --cyan-light:    #cffafe;

  --text:       #1f2937;
  --text-2:     #4b5563;
  --text-3:     #9ca3af;
  --bg:         #ffffff;
  --bg-alt:     #f8fafc;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --border-2:   #cbd5e1;

  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --shadow:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.1);

  --nav-h:      64px;
  --max-w:      1100px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-alt);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 500;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.logo-icon { font-size: 24px; }
.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display:none; }
.main-nav a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.main-nav a.active {
  background: rgba(37,99,235,0.2);
  color: #93c5fd;
  font-weight: 600;
}

.header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.student-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}
.student-badge:hover {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.15);
}
.stu-avatar {
  font-size: 18px;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
}
.stu-name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 13px;
}

.logout-btn {
  text-decoration: none;
  font-size: 12px;
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  font-weight: 500;
  white-space: nowrap;
}
.logout-btn:hover {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.3);
  transform: translateY(-1px);
}

/* ===== Main ===== */
.app-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 60px;
  min-height: calc(100vh - var(--nav-h) - 120px);
}

/* ===== Footer ===== */
.app-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, #0f172a 0%, #1a2b4a 100%);
  padding: 60px 24px 36px;
  position: relative;
  overflow: hidden;
}
.app-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
  text-align: left;
}
.footer-brand { max-width: 320px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.fl-icon { font-size: 36px; }
.fl-text {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.fl-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
  margin: 0;
}
.footer-links { display: flex; gap: 40px; }
.fl-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}
.fl-group a {
  display: block;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  padding: 4px 0;
  transition: all 0.2s;
}
.fl-group a:hover {
  color: #93c5fd;
  padding-left: 4px;
}
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,0.2), transparent);
  margin-bottom: 24px;
}
.footer-bottom { text-align: center; }
.footer-bottom p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 4px;
}
.footer-copy { font-size: 12px; color: #64748b !important; }
.footer-sub { margin-top: 4px; font-size: 12px; }

@media (max-width: 768px) {
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-brand { max-width: 100%; }
  .footer-links { flex-wrap: wrap; gap: 24px; }
}

/* ===== Shared Components ===== */

/* Page Heading */
.page-head {
  margin-bottom: 28px;
}
.page-head .breadcrumb {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.page-head .breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.page-head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.page-head p {
  color: var(--text-2);
  margin-top: 6px;
  font-size: 15px;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .25s, transform .25s;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .25s;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px 16px;
}
.btn-ghost:hover {
  background: var(--bg-alt);
}
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* Input */
.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-wrap label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.input-wrap input,
.input-wrap textarea,
.input-wrap select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color .2s;
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.input-wrap input:focus,
.input-wrap textarea:focus,
.input-wrap select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--accent-light); color: #92400e; }
.badge-danger  { background: var(--danger-light); color: #991b1b; }
.badge-purple  { background: var(--purple-light); color: #5b21b6; }

/* Tag Group */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 12px;
  background: var(--bg-alt);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* Grid */
.grid-2 { display: grid; gap: 20px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-3 { display: grid; gap: 20px; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-3);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; color: var(--text-2); margin-bottom: 6px; }
.empty-state p { font-size: 14px; }

/* Loading Spinner */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Divider */
.divider { height:1px; background:var(--border); margin:24px 0; }

/* Flex */
.flex-center { display:flex; align-items:center; justify-content:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Text */
.text-sm  { font-size: 13px; }
.text-mid { font-size: 15px; }
.text-2   { color: var(--text-2); }
.text-3   { color: var(--text-3); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ===== Page-Specific: Home ===== */
.home-hero {
  text-align: center;
  padding: 48px 24px 32px;
}
.home-hero h1 { font-size: 32px; font-weight: 700; }
.home-hero p { color: var(--text-2); font-size: 16px; margin-top: 8px; max-width: 600px; margin-left: auto; margin-right: auto; }

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all .3s;
}
.course-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.course-card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
  background: var(--primary-light);
}
.course-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.course-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.course-card .meta { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--text-3); }

.quick-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.quick-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  min-width: 120px;
  transition: all .25s;
}
.quick-actions a:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quick-actions a .qa-icon { font-size: 28px; }
.quick-actions a .qa-label { font-size: 13px; font-weight: 500; }

/* ===== Page-Specific: Profile (Chat) ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 580px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: msgIn .35s ease;
}
@keyframes msgIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.chat-msg.bot .avatar { background: var(--primary-light); }
.chat-msg.user .avatar { background: var(--accent-light); }
.chat-msg .bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
}
.chat-msg.bot .bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}
.chat-msg.user .bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot .bubble { border-bottom-left-radius: 4px; }
.chat-msg .bubble .typing-cursor {
  display: inline-block;
  width: 2px; height: 16px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.chat-input-wrap input:focus { border-color: var(--primary); }
.chat-input-wrap button {
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.chat-input-wrap button:hover { background: var(--primary-dark); }

.profile-summary {
  margin-top: 20px;
}
.profile-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 700px) { .profile-grid { grid-template-columns: 1fr 1fr 1fr; } }
.profile-dim {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.profile-dim .dim-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.profile-dim .dim-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Page-Specific: Resources ===== */
.agent-panel {
  display: grid;
  gap: 16px;
}
@media (min-width: 700px) { .agent-panel { grid-template-columns: 1fr 1fr; } }

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .3s;
}
.agent-card.active { border-color: var(--primary); }
.agent-card.completed { border-color: var(--success); }
.agent-card .agent-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.agent-card .agent-avatar {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.agent-card .agent-name { font-weight: 600; font-size: 15px; }
.agent-card .agent-status {
  margin-left: auto;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 50px;
}
.agent-card .agent-status.pending { background: var(--bg-alt); color: var(--text-3); }
.agent-card .agent-status.working {
  background: var(--primary-light);
  color: var(--primary-dark);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.6; } }
.agent-card .agent-status.done { background: var(--success-light); color: #065f46; }
.agent-card .agent-preview {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.resource-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 700px) { .resource-grid { grid-template-columns: 1fr 1fr; } }

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
}
.resource-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.resource-card .rc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.resource-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.resource-card p { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.resource-card .rc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}

/* ===== Learning Path ===== */
.path-timeline {
  position: relative;
  padding-left: 40px;
}
.path-timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.path-step {
  position: relative;
  padding: 16px 0;
}
.path-step:last-child { padding-bottom: 0; }
.path-step .dot {
  position: absolute;
  left: -32px;
  top: 20px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg);
  z-index: 1;
}
.path-step.completed .dot {
  background: var(--success);
  border-color: var(--success);
}
.path-step.current .dot {
  background: var(--primary);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.path-step .step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: all .25s;
}
.path-step.completed .step-card { border-left: 3px solid var(--success); }
.path-step.current .step-card { border-left: 3px solid var(--primary); background: var(--primary-light); }
.path-step .step-title { font-weight: 600; font-size: 15px; }
.path-step .step-desc { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.path-step .step-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.path-progress {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.path-progress .progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.path-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 4px;
  transition: width .8s ease;
}
.path-progress .progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-2);
}

/* ===== Tutor ===== */
.tutor-container {
  display: grid;
  gap: 24px;
}
@media (min-width: 700px) {
  .tutor-container {
    grid-template-columns: 1fr 280px;
  }
}
.tutor-chat {
  display: flex;
  flex-direction: column;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.tutor-tips {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
}
.tutor-tips h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.tutor-tips ul { list-style: none; padding: 0; }
.tutor-tips li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color .2s;
}
.tutor-tips li:last-child { border-bottom: none; }
.tutor-tips li:hover { color: var(--primary); }

/* ===== Assessment ===== */
.assessment-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 700px) {
  .assessment-grid { grid-template-columns: 1fr 1fr; }
}

.radar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring {
  width: 160px; height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto 16px;
}
.score-ring .score-num { font-size: 36px; font-weight: 700; }
.score-ring .score-label { font-size: 13px; opacity: .7; }

.dim-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dim-bar-item:last-child { margin-bottom: 0; }
.dim-bar-item .dim-label { min-width: 100px; font-size: 13px; font-weight: 500; }
.dim-bar-item .dim-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.dim-bar-item .dim-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
.dim-bar-item .dim-pct { min-width: 36px; font-size: 13px; font-weight: 600; text-align: right; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .app-main { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 22px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 12px; font-size: 13px; }
  .chat-msg { max-width: 90%; }
  .home-hero h1 { font-size: 24px; }
  .quick-actions a { min-width: 80px; padding: 14px 18px; }
  .quick-actions a .qa-icon { font-size: 22px; }
}

/* ===== Print ===== */
@media print {
  .app-header { position: static; }
  body { padding-top: 0; }
}
